njcuk9999 / apero-drs

A PipelinE to Reduce Observations - The DRS for SPIRou (CFHT)
MIT License
12 stars 0 forks source link

apero_ccf_nirps_ha - `IndexError: index 0 is out of bounds for axis 0 with size 0` while running the manual trigger #770

Open leslie-05 opened 1 month ago

leslie-05 commented 1 month ago

Runstring: apero_ccf_nirps_ha.py 2024-07-02 NIRPS_2024-07-03T10_18_37_259_pp_e2dsff_tcorr_A.fits --rv=nan --width=300.0 --step=0.25 --masknormmode=order --database=True --plot=0 --program=CCF[00076] --recipe_kind=rv-tcorr --parallel=True --shortname=CCF --crunfile=online_run.ini

Error Message in logfile: 22:00:53.158-@$|CCF[00076]|W[10-020-00006]: Order 74 CCF mask for this order has no lines. CCF set to NaNs. 22:00:53.160-@$|CCF[00076]| order wavelength: 1923.093 to 1948.890 22:00:53.227-!!|CCF[00076]|E[01-010-00001]: Unhandled error has occurred: Error <class 'IndexError'> 22:00:53.230-!!|CCF[00076]| 22:00:53.232-!!|CCF[00076]|Traceback (most recent call last): 22:00:53.235-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/core/utils/drs_startup.py", line 433, in run 22:00:53.237-!!|CCF[00076]| llmain = func(recipe, params) 22:00:53.239-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/recipes/nirps_ha/apero_ccf_nirps_ha.py", line 215, in main 22:00:53.242-!!|CCF[00076]| rv_props1 = velocity.compute_ccf_science(params, recipe, *cargs) 22:00:53.244-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/science/velocity/gen_vel.py", line 787, in compute_ccf_science 22:00:53.247-!!|CCF[00076]| props = ccf_calculation_stack(params, props, fit_type, fit_params, 22:00:53.249-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/science/velocity/gen_vel.py", line 1241, in ccf_calculation_stack 22:00:53.251-!!|CCF[00076]| bisspan = bisector(params, props['RV_CCF'], ccf_stack_norm, 22:00:53.254-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/science/velocity/gen_vel.py", line 1517, in bisector 22:00:53.256-!!|CCF[00076]| span_top = bisector_cut(rv, ccf2, bs_cut_top) 22:00:53.258-!!|CCF[00076]| File "/cosmos99/nirps/git-bin/apero-drs-online/apero/science/velocity/gen_vel.py", line 1536, in bisector_cut 22:00:53.261-!!|CCF[00076]| lims1 = np.where(yy > cut)[0][[0, -1]] 22:00:53.263-!!|CCF[00076]|IndexError: index 0 is out of bounds for axis 0 with size 0

vandalt commented 1 week ago

Here is one additional runstring (for HE this time) that caused this error

apero_ccf_nirps_he.py 2024-08-11 NIRPS_2024-08-11T23_20_42_832_pp_e2dsff_tcorr_A.fits --rv=nan --width=300.0 --step=0.25 --masknormmode=order --database=True --plot=0 --program=CCF[01128] --recipe_kind=rv-tcorr --parallel=True --shortname=CCF --crunfile=online_run.ini
njcuk9999 commented 1 week ago

So I haven't exactly "fixed" this issue but after fixing #768 and #769 I don't seem to be able to reproduce these errors (I tried both run string). So I'll close this any way and we can look out for any future recipes runs that cause this.

@vandalt did you add these three issues as known issues to the sheet? I think you can meantion that #768 and #769 are fixed and that #770 may be fixed - but all three should still be action=CHECK and reported to github if they happen again.

vandalt commented 1 week ago

@njcuk9999 I think you tagged the wrong Thomas!

But yes it's been added to the Known errors sheet. I'll update the comments there!