40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log  Not logged in ELOG logo
Message ID: 13109     Entry time: Mon Jul 10 21:31:15 2017
Author: Kaustubh 
Type: HowTo 
Category: Computer Scripts / Programs 
Subject: Details on Cavity Scan Analysis 


The following elog describes the procedure followed for generating a sample simulation for a cavity scan, fitting an actual cavity scan and calculating the relevant paramaters using the cavity scan and fit data.


1. Cavity Scan Simulation:

  1. First, we define the sample cavity parameters, i.e., the reflectivitie,transmissivities of the mirrors, the RoCs of the mirrors and the absolute cavity length.
  2. We then define a frequency range using numpy.linspace function for which we want to take a scan.
  3. We then define a function that returns the tranmission power output of a Fabry-Perot cavity using the cavity equations as follows: P_{t} = \frac{t_{1}t_{2}}{1-r_{1}r_{2}\exp({\frac{4\pi Lf}{c}+(n+m+1)\phi_G)}} where Pt is the transmission power ratio of the output power to input power, t1,t2,r1,r2 are the transmissivities and reflectivities of the two mirrors, L is the absolute cavity length, f is the frequency of the input laser, c is the speed of light, \phi_G = \arccos{g_{1}g_{2}} is the gouy phase shift with g1,g2 being the g-factors for the two cavity mirrors(g=1-L/R). 'n' and 'm' correspond to the TEMnm higher order mode.
  4. We now obtain a cavity scan by giving the above defined function the cavity parameters and by adding the outputs for different higher order mode('n', 'm' values). Appropriate factors for the HOMs need to be chosen. The above function with appropriate coefficients can be used ti also add the modulated sidebands to the total transmission power.
  5. To this obtained total power we can add some random noise using numpy modules random.normal function. We need to normalise the data with respect to the max. power transmission ratio.
  6. We can now perform fitting on the above data using the procedure stated in the next section and then plot the two data sets using matplotlib module.
  7. A similar code to do the above is given here.


2. Fitting a Cavity Scan:

  1. The actual data for a cavity scan can be found in this elog entry or attached below in the zip folder.
  2. We read this data and separate the frequency data and the transmission data.
  3. Using the peakutils module's indexes function, we find the indices of the various peaks in the data set.
  4. These peaks are from the fundamental resonances, sideband resonances(both 11MHz and 55MHz) as well as a few HOMs.
  5. Each of these resonances follows the cavity equations and hence can be modelled as Lorentzian within small intervals around the peak frequencies. A detailed description of how this is possible is given here and is in the atached zip folder('Functionsused.pdf').
  6. We define a Lorentzian function which returns the fo\frac{a}{1+(\frac{\nu - \nu_0}{b})^{2}}llows:  where 'a' is the peak transmission value, 'b' is the 'linewidth' of the Lorentzian and \nu_0 is the peak frequency  about which the cavity equations behave like a lorentzian.
  7. We now, using the Lorentzian function, fit the various identified peaks using the curve_fit function of the scipy module. Remember to turn the 'absolute_sigma' parameter to 'True'.
  8. The parameters now obtained can be evaluated using the procedure given in the next section.
  9. The total transmission power is evaluated by feeding in the above obtained parameters back into the Lorentzian function and adding it for each peak.
  10. We can plot the actual data set and the data obtained using the fit of different peaks in a plot using matplotlib module. We can also plot the residuals for a better depiction of the fit quality.  
  11. The code to analyse the above mentioned cavity scan data is given here and attached below in the zip folder.


3. Calculating Physically Relevant Parameters:

  1. The data obtained from the fitting the peaks in the previous section now needs to be analysed in order to obtain some physically relevant information such as the FSR value, the TMS value, the modulation depths of the sidebands and perhaps even the linear caliberation of the frequency.
  2. First we need to identify the fundamental, TEM00 resonances among all the peaks. This we do by using the numpy.where function. We find the peaks with transmission values more than 0.9(or any suitable value).
  3. Using these indices we will now calculate the FSR and the Finesse of the peaks. A description of the correlation between the Fit Parameters and the FSR and Finesse is given here.
  4. We define a Linear fitting function for fitting the frequency values of the fundamental resonances against the ith fundamental resonance. The slope of this line gives us the value of FSR and the error in it.
  5. The Finesse can be calculated by fitting the linewidth with a constant function.
  6. The cavity length can be calculated using the FSR values as follows: L = \frac{c}{2\nu_{FSR}}.
  7. Now, the approximate positions of the sideband frequncies is given by 11*106%FSR and 55*106%FSR away from the fundamental, carrier resonances.
  8. The modulation depth, 'm', is given as \sqrt{\frac{P_{c}}{P_{s}}} = \frac{J_{0}(m)}{J_{1}(m)} where Pc is the carrier transmission power, Ps is the transmission power of the sideband and Jv is the Bessel Function of order 'v'.
  9. We define a function 'Bessel Ratio' using which we'll fit the transmission power ratio of the carrier to the sideband for the multiple sideband resonances.
  10. We also check for the Linearity in frequency data by plotting Fitting the frequencies corresponding to peaks in the actual data to ones obtained after fitting.
  11. After this we attempt to identify the other HOMs. For this we first determine a rough estimate for the value of TMS using the already known parameters of the mirrors,i.e., the RoC. We then look in small intervals (0.5 MHz) around frequencies where we would expect the HOMs to be, i.e., 1*TMS, 2*TMS, 3*TMS... away from the fundamental resonances. These positions are all modulo FSR.
  12. After identifying the HOMs, we take the difference from the fundamental resonance and then study these modulo the FSR.
  13. We perform a Linear Fit between these obtained values and (n+m).  As 'n','m' are degenerate, we can simply perform the fit against some variable 'k' and obtain the value of TMS as the slope of the linear fit.
  14. The code to do the above stated analysis is given here.


Most of the above info and some smaller details can be found in the markdown readme file in this git repo.

Attachment 1: Attachments.zip  7.781 MB  Uploaded Mon Jul 10 23:24:40 2017
ELOG V3.1.3-