It can be applied as
> cd /opt/rtcds/userapps/release/omc/k1/guardian
> patch -p1 < patches/OMC_LSC-pylon-camera_260127.patch
and reverted as
> patch -p1 -R < patches/OMC_LSC-pylon-camera_260127.patch.
It will probably help to test full lock with the new pylon-camera-server with short down time.
-----
Though the old camera-server changes an exposure parameter immediately, the new pylon-camera-server adopts a two-step (request and apply) way. So DOWN state will be changed as follows.
@@ -134,8 +134,8 @@ class DOWN(GuardState):
ezca.switch('OMC-LSC_ERR','FM4', 'OFF')
#Set gigE exp. time
- #ezca['CAM-OMC_TRANS_EXP'] = 100
- ezca['CAM-OMC_TRANS_EXP'] = 1000 # OMC TRANS camera exposure time on 27.11.2022 in case of Single arm lock
+ #ezca['CAM-OMC_TRANS_EXP_REQ'] = 100
+ ezca['CAM-OMC_TRANS_EXP_REQ'] = 1000 # OMC TRANS camera exposure time on 27.11.2022 in case of Single arm lock
#Put the servo filters back to the high gain mode
#ezca.switch('OMC-LSC_FB_FLT','FM1','FM3', 'FM4', 'FM5', 'FM7', 'FM8', 'FM9','FM10', 'OFF')
@@ -167,6 +167,8 @@ class DOWN(GuardState):
@AS_LIMIT_SWITCH_check
def run(self):
global sweep_sign
+ if ezca['CAM-OMC_TRANS_EXP'] != ezca['CAM-OMC_TRANS_EXP_REQ']:
+ ezca['CAM-OMC_TRANS_EXP_SET'] = 1
return True
A procedure of taking picture is also slightly changes. Taken images will be saved in data directory (yyyy/mm/dd), so search/remove path will be modified in all FIND_RESOANCE* and OMC*LOCKED* states. Snapshot button is also changed from momentary button (K1:CAM-OMC_TRANS_SNAP) to interval of taking pictures in the unit of minutes (K1:CAM-OMC_TRANS_ARCHIVE_INTERVAL). So when non-zero value are set to take snapshots, it must be 0 by manually after the snapshots process is completed. Following code shows an example of FIND_RESONANCE state. A same modification will be applied also for FIND_RESONANCE_FOR_***.
@@ -246,12 +248,13 @@ class FIND_RESONANCE(GuardState):
elif self.timer['snapshot clean up timer']:
if not (self.analyzing_mode or self.taking_snapshot):
- self.p2 = sp.Popen(['/bin/rm /kagra/camera/images/OMC_TRANS*'], shell=True)
+ self.p2 = sp.Popen(['/bin/rm /kagra/camera/images/[0-9]*/[0-9]*/[0-9]*/OMC_TRANS*'], shell=True)
self.timer['snapshot clean up timer'] = 120
if self.taking_snapshot:
if self.timer['OMC_snapshot_timer']:
- fname = get_latest_file('/kagra/camera/images/OMC_TRANS*')
+ ezca['CAM-OMC_TRANS_ARCHIVE_INTERVAL'] = 0
+ fname = get_latest_file('/kagra/camera/images/[0-9]*/[0-9]*/[0-9]*/OMC_TRANS*')
log(fname)
self.p = sp.Popen(['/opt/rtcds/userapps/trunk/cds/common/scripts/mode', fname],
stdout=sp.PIPE)
@@ -274,7 +277,7 @@ class FIND_RESONANCE(GuardState):
else:
self.analyzing_mode = False
self.taking_snapshot = True
- ezca['CAM-OMC_TRANS_SNAP'] = 1
+ ezca['CAM-OMC_TRANS_ARCHIVE_INTERVAL'] = 1
self.timer['OMC_snapshot_timer'] = 2
else:
notify('Locked to a HOM with mode number = '+str(mode_number))
@@ -291,7 +294,7 @@ class FIND_RESONANCE(GuardState):
elif ezca['OMC-TRANS_DC_SUM_OUTPUT'] >= iscparams.omcLockThresh:
#Check the mode shape
- ezca['CAM-OMC_TRANS_SNAP'] = 1
+ ezca['CAM-OMC_TRANS_ARCHIVE_INTERVAL'] = 1
self.timer['OMC_snapshot_timer'] = 2
self.taking_snapshot = True
@@ -426,7 +429,7 @@ class OMC_LSC_LOCKED(GuardState):
wavfile = '/opt/rtcds/userapps/trunk/omc/k1/guardian/sounds/Pon1.wav'
kagralib.play_wavefile(wavfile)
notify('Cleaning up the snapshot files')
- self.p2 = sp.Popen(['/bin/rm /kagra/camera/images/OMC_TRANS*'], shell=True)
+ self.p2 = sp.Popen(['/bin/rm /kagra/camera/images/[0-9]*/[0-9]*/[0-9]*/OMC_TRANS*'], shell=True)
@OMC_LOCK_check
@AS_LIMIT_SWITCH_check