njcuk9999 / apero-drs

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

0.7.288 error in calib reduction: Error fitting sinc to blaze (20AQ13-Jul07) #750

Open larnoldgithub opened 5 months ago

larnoldgithub commented 5 months ago
***************************************************************************
03:50:47.141-@!|PROC| W[40-503-00019]: Error found for ID='2517'
03:50:47.148-@!|PROC|   apero_flat_spirou.py 20AQ13-Jul07 2499345f_pp.fits 2499346f_pp.fits 2499347f_pp.fits 2499348f_pp.fits 2499349f_pp.fits 2499350f_pp.fits 2499351f_pp.fits 2499352f_pp.fits 2499353f_pp.fits 2499354f_pp.fits 2499355f_pp.fits 2499356f_pp.fits 2499357f_pp.fits 2499358f_pp.fits 2499359f_pp.fits 2499511f_pp.fits 2499512f_pp.fits 2499513f_pp.fits 2499514f_pp.fits 2499515f_pp.fits 2499516f_pp.fits 2499517f_pp.fits 2499518f_pp.fits 2499519f_pp.fits 2499520f_pp.fits 2499521f_pp.fits 2499522f_pp.fits 2499523f_pp.fits 2499524f_pp.fits 2499525f_pp.fits --crunfile=calib_run.ini --program=FF[02517] --recipe_kind=calib-night --shortname=FF --parallel=True
03:50:47.154-  |PROC| ***************************************************************************
03:50:47.161-  |PROC| 
 E[40-015-00009]: Error fitting sinc to blaze. Order = 45 Fiber = A Iteration =
        -1
 Guess: amp=203450.3048311245 period=7056.0 lin=1233.0 slope=0 quad=0 (cube=0)
         Lower: amp=0 period=0.0 lin=0.0 slope=-inf quad=-inf (cube=-1e-20) 
 Upper: amp=305175.45724668674 period=inf lin=4087 slope=inf quad=inf
        (cube=1e-20)
 Error <class 'RuntimeError'>: Optimal parameters not found: Number of calls to
        function has reached maxfev = 1200.
         Function = science.extract.extraction.py.calculate_blaze_flat_sinc()
03:50:47.173-  |PROC| 
03:50:47.180-  |PROC| 
03:50:47.187-  |PROC| ***************************************************************************

This is the only error I got afetr reprocessing all SPI calibrations from 18B to 24AQ01 (Feb01). Apparently an algorithm didn't converge correctly, and simply redoing the command that failed above ended with no error !

00:30:57.328-  |FF[02517]| Saving blaze file:
00:30:57.328-  |FF[02517]|      /data/spirou3/apero-data/temptest/red/20AQ13-Jul07/BBC69E5A2C_pp_blaze_C.fits
00:30:57.454-  |FF[02517]| Saving flat file:
00:30:57.454-  |FF[02517]|      /data/spirou3/apero-data/temptest/red/20AQ13-Jul07/BBC69E5A2C_pp_flat_C.fits
00:30:57.589-  |FF[02517]| calibration: Copy to database successful. File =
00:30:57.589-  |FF[02517]|      /data/spirou3/apero-data/temptest/calib/BBC69E5A2C_pp_blaze_C.fits
00:30:57.865-  |FF[02517]| calibration: Copy to database successful. File =
00:30:57.865-  |FF[02517]|      /data/spirou3/apero-data/temptest/calib/BBC69E5A2C_pp_flat_C.fits
00:30:58.472-**|FF[02517]| Creating summary latex document
00:30:58.507-**|FF[02517]| Creating summary html document
00:31:00.198-**|FF[02517]| ***************************************************************************
00:31:00.206-**|FF[02517]| Recipe apero_flat_spirou has been successfully completed
00:31:00.214-**|FF[02517]| ***************************************************************************
njcuk9999 commented 5 months ago

Yes there seems to be some edge cases to this that we don't understand, so this is a known error. I have a re-trial within the code that normally catches it again but I guess you hit the edge case twice!