issue with calcs.compute_epics_records() at LLO, not at LHO
@evan-goetz @joseph-betzwieser
I'm running into an error running the report generation at LLO. The issue seems to stem from calcs.compute_epics_records()
.
generating GDS filters...
Traceback (most recent call last):
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/base/envs/cds-py39-2023050802/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/louis.dartez/repos/pydarm/pydarm/__main__.py", line 80, in <module>
main()
File "/home/louis.dartez/repos/pydarm/pydarm/__main__.py", line 74, in main
func(args)
File "/home/louis.dartez/repos/pydarm/pydarm/cmd/report.py", line 1335, in main
fig_gds_filt = gds_filter_generation(report)
File "/home/louis.dartez/repos/pydarm/pydarm/cmd/report.py", line 1056, in gds_filter_generation
fir_filter_gen = FIRFilterFileGeneration(report.model_file)
File "/home/louis.dartez/repos/pydarm/pydarm/fir.py", line 327, in __init__
self._compute_epics(endstation)
File "/home/louis.dartez/repos/pydarm/pydarm/fir.py", line 394, in _compute_epics
EPICS = self.calcs.compute_epics_records(gds_pcal_endstation=endstation, exact=True)
File "/home/louis.dartez/repos/pydarm/pydarm/calcs.py", line 1002, in compute_epics_records
PCAL_OVER_DARM_LINE10_CORRECTION = (pcal_correction_x[freq_indicies['f_pcal10']] /
IndexError: index 14 is out of bounds for axis 0 with size 14
Stepping through the code in a debugger, it looks like the error is caused by cal_line_sys_pcalx_frequencies
in the [calcs]
section of the LLO ini file only having 5 frequencies defined rather than 6 as in the on eat LHO.
lines from debug session:
ipdb> freq_indices
*** NameError: name 'freq_indices' is not defined
ipdb> freq_indicies
{'f_pcal1': 0, 'f_uim': 1, 'f_pum': 2, 'f_tst': 3, 'f_pcal2': 4, 'f_pcal3': 5, 'f_pcal4': 6, 'f_pcalx_cmp': 7, 'f_pcaly_cmp': 8, 'f_pcal5': 9, 'f_pcal6': 10, 'f_pcal7': 11, 'f_pcal8': 12, 'f_pcal9': 13, 'f_pcal10': 14}
ipdb> len(freq_indicies.keys())
15
ipdb> darm_advance
array([0.99998046+6.25093100e-03j, 0.99998323+5.79074511e-03j,
0.99998187+6.02083822e-03j, 0.999979 +6.48102346e-03j,
0.98612408+1.66009927e-01j, 0.91496964+4.03522684e-01j,
1. +3.83495197e-05j, 0.99409945+1.08472520e-01j,
0.99410361+1.08434396e-01j, 0.99991535+1.30116249e-02j,
0.99978423+2.07724407e-02j, 0.99955001+2.99963291e-02j,
0.99924059+3.89647504e-02j, 0.99409945+1.08472520e-01j])
ipdb> len(darm_advance)
14
ipdb> darm_advance.shape
(14,)
ipdb> pcal_correction_x.shape
(14,)
ipdb> pcal_correction_ref.shape
(14,)
ipdb> freq.shape
(14,)
L1 ini:
cal_line_sys_pcalx_frequencies = 33.93, 54.17, 78.23, 101.63, 283.41
H1 ini:
cal_line_sys_pcalx_frequencies = 33.43, 53.67, 77.73, 102.13, 283.91, 410.2
So, are we missing a ~410 Hz frequency in the L1 ini file or do we need to tweak calcs.compute_epics_records()
not require a minimum of 6 frequencies defined in cal_line_sys_pcalx_frequencies
?