spa-on-python icon indicating copy to clipboard operation
spa-on-python copied to clipboard

Adjusted offsets for OMNIC Paradigm 2.8

Open DaXLR opened this issue 5 months ago • 1 comments

In the off-chance this might help someone else in the future, I had to figure out new offsets for this code to work on .spa files output by OMNIC Paradigm version 2.8, here are the updated addresses

        f.seek(1588) #Original was 564
        Spectrum_Pts = np.fromfile(f, np.int32,1)[0]

        f.seek(1600) #Original was 576
        Max_Wavenum=np.fromfile(f, np.single, 1)[0]
        Min_Wavenum=np.fromfile(f, np.single, 1)[0]
        Wavenumbers = np.flip(np.linspace(Min_Wavenum, Max_Wavenum, Spectrum_Pts))

Thanks for that code btw, you saved us a lot of trouble!

DaXLR avatar Jul 29 '25 17:07 DaXLR

Thanks for the suggestion, I gonna include this in a new PR

lerkoah avatar Aug 02 '25 01:08 lerkoah