IndexError from parameter model (.ini) file when compute B sensing path
To investigate DAC-driven measurement model, we try some special cases. For example, TIA or whitening bypass measurement. When omc_meas_p_trans_amplifier_uncompensated
or omc_meas_p_whitening_uncompensated_mode1
assignment is empty and try to compute "B" sensing path, the error "IndexError: list index out of range" appears.
For example if omc_meas_p_trans_amplifier_uncompensated
is empty:
omc_meas_p_trans_amplifier_uncompensated =
in H1_20190416.ini. Then compute B path
C.omc_path_response('B',freq)
The error is following:
Traceback (most recent call last):
File "/home/hsiang-yu.huang/test/test.py", line 9, in <module>
a = C.omc_path_response('B',freq)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 421, in omc_path_response
analog_readout_response = self.omc_analog_dcpd_readout_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 295, in omc_analog_dcpd_readout_response
self.omc_dcpd_transimpedence_amplifier_response(name, frequencies))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 141, in omc_dcpd_transimpedence_amplifier_response
self.omc_meas_p_trans_amplifier_uncompensated[idx])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
IndexError: list index out of range
On the other hand, if omc_meas_p_whitening_uncompensated_mode1
is empty:
Traceback (most recent call last):
File "/home/hsiang-yu.huang/test/test.py", line 9, in <module>
a = C.omc_path_response('B',freq)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 421, in omc_path_response
analog_readout_response = self.omc_analog_dcpd_readout_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 299, in omc_analog_dcpd_readout_response
self.omc_dcpd_whitening_response(name, frequencies))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hsiang-yu.huang/pydarm/pydarm/sensing.py", line 231, in omc_dcpd_whitening_response
meas_p_whitening = np.asarray(poles[idx])
~~~~~^^^^^
IndexError: list index out of range
Edited by Hsiang-Yu Huang