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
When using a data cube with only one exposure (i.e.
cube.shape[0]==1), I encountered two errors inextract_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
A
ZeroDivisionErrorif no clipping was done andextract_bs()received a cube with one frame.Error message
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_bsand raise a more informative error message to clarify what is happening.