-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
When using a data cube with only one exposure (i.e. cube.shape[0]==1), I encountered two errors in extract_bs():
-
An
IndexErrorif clipping had been done before and rejected the only frame in in the cube andextract_bs()had an empty input.Error message
bs = amical.extract_bs( File "/home/vandal/projects/amical/amical/mf_pipeline/bispect.py", line 1138, in extract_bs ft_arr, n_ps, npix = _construct_ft_arr(cube) File "/home/vandal/projects/amical/amical/mf_pipeline/bispect.py", line 227, in _construct_ft_arr n_pix = cube.shape[1] IndexError: tuple index out of range -
A
ZeroDivisionErrorif no clipping was done andextract_bs()received a cube with one frame.Error message
bs = amical.extract_bs( File "/home/vandal/projects/amical/amical/mf_pipeline/bispect.py", line 1242, in extract_bs v2_quantities = _compute_v2_quantities(v2_arr_unbiased, bias_arr, n_blocks) File "/home/vandal/projects/amical/amical/mf_pipeline/bispect.py", line 537, in _compute_v2_quantities ind2 = (k + 1) * n_ps // (n_blocks - 1) ZeroDivisionError: integer division or modulo by zero
As discussed with @DrSoulain, this should not occur often and is currently not supported. It might still be worth adding an error to catch these two cases in extract_bs and raise a more informative error message to clarify what is happening.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels