Supress warnings when ligofilter is used in combination with EZCA=NO_FAIL
Copied from the LLO ticket https://services1.ligo-la.caltech.edu/FRS/show_bug.cgi?id=28561:
So the emergency down button calls:
EZCA_CA=NOFAIL guardian ISC_LOCK DOWN
There error associated with l1lsc0 being down is:
2023-07-21T15:50:59.001Z ISC_LOCK [DOWN.enter]
2023-07-21T15:51:13.084Z ISC_LOCK W: Traceback (most recent call last):
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/guardian/worker.py", line 494, in run
retval = statefunc()
File "/opt/rtcds/userapps/release/isc/l1/guardian/ISC_LOCK.py", line 478, in main
ezca.switch('LSC-{}_LOCK'.format(stage),'OUTPUT','OFF')
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/ezca/ezca.py", line 521, in switch
return LIGOFilter(sfm_name, self).switch(*args, **kwargs)
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/ezca/ligofilter.py", line 489, in switch
mask |= self.__get_mask('on', switch_actions['ON'])
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/ezca/ligofilter.py", line 600, in __get_mask
for sw_name, current_value in self.get_current_switch_dict().items():
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/ezca/ligofilter.py", line 242, in get_current_switch_dict
return {sw_name: int(getattr(self, '_'+sw_name+'R').get()) for sw_name in const.FILTER_SW_NAMES}
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/site-packages/ezca/ligofilter.py", line 242, in <dictcomp>
return {sw_name: int(getattr(self, '_'+sw_name+'R').get()) for sw_name in const.FILTER_SW_NAMES}
ValueError: cannot convert float NaN to integer
2023-07-21T15:51:13.084Z ISC_LOCK [DOWN.main] USERMSG 0: USER CODE ERROR (see log)
2023-07-21T15:51:13.125Z ISC_LOCK ERROR in state DOWN: see log for more info (LOAD to reset)
2023-07-21T15:51:13.125Z ISC_LOCK ERROR, exiting.
2023-07-21T15:51:13.125Z ISC_LOCK stopping daemon...
2023-07-21T15:51:13.127Z ISC_LOCK worker terminated
2023-07-21T15:51:13.127Z ISC_LOCK daemon stopped.
So it looks like we need to add some try except clauses to the ligofilter python module when the EZCA_CA=NOFAIL is set, so that it doesn't try to read the filter state and just moves on to the next one.
Edited by Jameson Rollins