EranOfek / AstroPack

Astronomy & Astrophysics Software Pacakge
Other
17 stars 4 forks source link

modeVar_LogHist error leads to throwing away the whole visit #412

Open agioffe opened 7 months ago

agioffe commented 7 months ago

Sometimes the modeVar_LogHist function employed to estimate the background is unable to find Mod and this causes an exception which leads to moving of all the visit data into the failed folder. Probably, in such relatively rare cases we should use some other measure of the background and not throw away the whole visit?

EranOfek commented 7 months ago

when you see such a case - please add here the names of the images...

On Mon, Mar 4, 2024 at 9:42 AM Alexander Krassilchtchikov < @.***> wrote:

Sometimes the modeVar_LogHist function employed to estimate the background is unable to find Mod and this causes an exception which leads to moving of all the visit data into the failed folder. Probably, in such relatively rare cases we should use some other measure of the background and not throw away the whole visit?

— Reply to this email directly, view it on GitHub https://github.com/EranOfek/AstroPack/issues/412, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4N3AK7YKUEH3JP5BZLYWQQWNAVCNFSM6AAAAABEEXCJRWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DMMJUGU2TCMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

agioffe commented 7 months ago

Will try to figure out -- it was not mentioned in that log.

agioffe commented 7 months ago

One of the images that caused an error in modeVar_LogHist is last06e:/last06e/data2/archive/LAST.01.06.0/failed/LAST.01.06.02_20230911.231610.220_clear_1323_019_001_001_sci_raw_Image_1.fits I inspected it by eye, and it does not look pathological, except for some strange band at the bottom. Probably, it is that band that caused the crash?

agioffe commented 7 months ago

Another example is this visit:

/last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193014.692_clear_1098_001_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193034.693_clear_1098_002_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193054.688_clear_1098_003_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193114.709_clear_1098_004_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193134.699_clear_1098_005_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193154.709_clear_1098_006_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193214.709_clear_1098_007_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193234.731_clear_1098_008_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193254.733_clear_1098_009_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193314.727_clear_1098_010_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193334.740_clear_1098_011_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193354.753_clear_1098_012_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193414.751_clear_1098_013_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193434.770_clear_1098_014_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193454.772_clear_1098_015_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193514.770_clear_1098_016_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193534.772_clear_1098_017_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193554.795_clear_1098_018_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193614.787_clear_1098_019_001_001_sci_raw_Image_1.fits /last03e/data1/archive/LAST.01.03.01/failed/LAST.01.03.01_20240226.193634.807_clear_1098_020_001_001_sci_raw_Image_1.fits

Here the LogHist error pops out at the coadd step (in field 7):

Feb 27 22:09:46 last03e last-pipeline1[678713]: [INF] procMergeCoadd: coadding field 7 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.942 [ERR] pipeline.DemonLAST try error: Unable to find Mode - need to debug: Mode=NaN Var=Inf / funname: modeVar_LogHist @ line: 156 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] pipeline.DemonLAST try error: Unable to find Mode - need to debug: Mode=NaN Var=Inf / funname: modeVar_LogHist @ line: 156 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.950 [ERR] Exception: id= msg=Unable to find Mode - need to debug: Mode=NaN Var=Inf Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] Exception: id= msg=Unable to find Mode - need to debug: Mode=NaN Var=Inf Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.952 [ERR] stack: Ind=1; FunName=modeVar_LogHist; line=156 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=1; FunName=modeVar_LogHist; line=156 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.954 [ERR] stack: Ind=2; FunName=background; line=138 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=2; FunName=background; line=138 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.957 [ERR] stack: Ind=3; FunName=background; line=131 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=3; FunName=background; line=131 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.959 [ERR] stack: Ind=4; FunName=procMergeCoadd; line=232 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=4; FunName=procMergeCoadd; line=232 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.961 [ERR] stack: Ind=5; FunName=multiRaw2procCoadd; line=507 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=5; FunName=multiRaw2procCoadd; line=507 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.963 [ERR] stack: Ind=6; FunName=DemonLAST.main; line=2192 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=6; FunName=DemonLAST.main; line=2192 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.965 [ERR] stack: Ind=7; FunName=startBatchLASTPipeline; line=31 Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] stack: Ind=7; FunName=startBatchLASTPipeline; line=31 Feb 27 22:09:48 localhost last-pipeline[678713]: 22:09:48.967 [ERR] pipeline.DemonLAST: 20 images moved to failed directory Feb 27 22:09:48 last03e last-pipeline1[678713]: [ERR] pipeline.DemonLAST: 20 images moved to failed directory