You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LEGEND ICPC DSP config json file contains processors which take arguments where the data type has to be specified. Two examples are tail_pars and wf_cusp:
The relevant lines are tail_pars(5, 'f') and wf_cusp(round((4.8*us/wf_blsub.period)+2), 'f'). In both cases, the 'f' signifies the data type of the array elements to be float. Using the processors like this does not work universally on all machines. Both build_dsp() and run_one_dsp() return exclusively arrays which are full of zeros for tail_pars and wf_cusp, when running on a local server at TUM.
Using the processors manually via from dspeed.processors import poly_fit, etc. works just fine. The issue only arises when a DSP config is used. I created a jupyter notebook to showcase this problem and attached it here (I cannot upload HTML to GitHub).
Hotfix: If you have a similar problem, the "solution" is to use double as the datatype, i.e. changing the 'f' to a 'd' in both cases above.
Goal: Make dspeed robust(er) against type conversion.
The LEGEND ICPC DSP config json file contains processors which take arguments where the data type has to be specified. Two examples are
tail_pars
andwf_cusp
:The relevant lines are
tail_pars(5, 'f')
andwf_cusp(round((4.8*us/wf_blsub.period)+2), 'f')
. In both cases, the 'f' signifies the data type of the array elements to be float. Using the processors like this does not work universally on all machines. Bothbuild_dsp()
andrun_one_dsp()
return exclusively arrays which are full of zeros for tail_pars and wf_cusp, when running on a local server at TUM.Using the processors manually via
from dspeed.processors import poly_fit
, etc. works just fine. The issue only arises when a DSP config is used. I created a jupyter notebook to showcase this problem and attached it here (I cannot upload HTML to GitHub).Hotfix: If you have a similar problem, the "solution" is to use double as the datatype, i.e. changing the 'f' to a 'd' in both cases above.
Goal: Make dspeed robust(er) against type conversion.
float_conversion_bug_cusp.pdf
The text was updated successfully, but these errors were encountered: