For the past three years I have been working on a branch of OMC_scan on the ligo/gitcommon/labutils repository in order to fit single boucne scans carried out with no sidebands on. In order to do this I made another function in the OMC scan class called identify_C02()
This uses the TM01 and TM02 peaks as fitting parameters to fit the non-linearity of the PZT, normally we use the 45MHz sidebands for this but when the sidebands are off we can't and so one needs to change the following variables to say which of the modes (arrange in reverse height order) are the TM01 and TM02 carrier peaks in the scan.
first_order = np.argsort(self.peak_heights)[-4]
second_order = np.argsort(self.peak_heights)[-3]
the first variable denotes the TM01 peak and the index specifies that this is the 4th highest peak in whichever scan we are looking at. The next line denotes the TM02 peak which was the 3rd highest peak in the scan we were looking at.
To specify for the code to use this C02 function, you need to call the code with the -s flag which tells the code that the sidebands were off when the scan was taken.
It is also good to run the -o flag set to 2 as this only uses a polynomial of order 2 to fit the data, otherwise it will not get a good estimate of the pzt hysteresis with only three data points (carrier, first and second order) for the fit.
As part of this merge I accidentally merged in a bunch of old files from my branch and so I have removed them.
I still have some changes to propagate to fit_peak.py and fit_two_peaks.py although since our current OMC does not have enough astigmatism to see a double peak at TM02 this is less urgent.