The function to scan the Etalon 2D has been made. The NI will make a ramp and the WI a sine (with a frequency 7 times higher). The test is visible in figure 1.
def Etalon_2D_scan(amplitude,duration):
frequency = 1./duration
frequencySin = 7*frequency
amplitudeSin = 0.5*amplitude
cm_send('LSC_Etalon_Acl','AcRampChSet','NI_ramp_noise',float(frequency),1.0,0.0)
cm_send('LSC_Etalon_Acl','AcSinChSet','WI_sin_noise',float(frequencySin),1.0,0.0,0.0)
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_NOISE',1.0, 1.0,'NI_ramp_noise','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_NOISE',1.0, 1.0,'WI_sin_noise','apply')
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_RH_SET_NOISE',1.0, 1.0,'NI_RH_SET', float(amplitude),'NI_NOISE','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_RH_SET_NOISE',1.0, 1.0,'WI_RH_SET', float(amplitudeSin),'WI_NOISE','apply')
def Etalon_2D_scanOFF():
cm_send('LSC_Etalon_Acl','AcRampChSet','NI_ramp_noise',0.0,0.0,0.0)
cm_send('LSC_Etalon_Acl','AcSinChSet','WI_sin_noise',0.0,0.0,0.0,0.0)
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_NOISE',1.0, 0.0,'NI_ramp_noise','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_NOISE',1.0, 0.0,'WI_sin_noise','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_RH_SET_NOISE',1.0, 1.0,'NI_RH_SET', 0.0,'NI_NOISE','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_RH_SET_NOISE',1.0, 1.0,'WI_RH_SET', 0.0,'WI_NOISE','apply')
The values to be used in the ER are :
Amplitude = 0.4 duration = 604800
1 comment
It has to be noted that the sine starts with a random phase and it could be not so nice if the fist point is +0.4 deg (the heating could be too high). To be checked when the macro starts.
so to avoid that, following the Alain suggestions, the macro has been modified in order to add a phase to the sine to null the starting point of the sine
def Etalon_2D_scan(amplitude,duration,sinPhase):
frequency = 1./duration
frequencySin = 7*frequency
amplitudeSin = 0.5*amplitude
cm_send('LSC_Etalon_Acl','AcRampChSet','NI_ramp_noise',float(frequency),1.0,0.0)
cm_send('LSC_Etalon_Acl','AcSinChSet','WI_sin_noise',float(frequencySin),1.0,0.0,float(sinPhase))
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_NOISE',1.0, 1.0,'NI_ramp_noise','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_NOISE',1.0, 1.0,'WI_sin_noise','apply')
cm_send('LSC_Etalon_Acl','AcSumChSet','NI_RH_SET_NOISE',1.0, 1.0,'NI_RH_SET', float(amplitude),'NI_NOISE','load')
cm_send('LSC_Etalon_Acl','AcSumChSet','WI_RH_SET_NOISE',1.0, 1.0,'WI_RH_SET', float(amplitudeSin),'WI_NOISE','apply')