Fortran Runtime Error

searches the input images for sources that are brighter than the expected background fluctuations at a given image position.
Post Reply
GarrettZills
Posts: 1
Joined: Mon Apr 08, 2024 2:50 pm

Fortran Runtime Error

Post by GarrettZills »

Hello all,

When I run the following set of commands:

erbox
compress_flag="N"
detmask_flag=Y
expima_flag=Y
emin=500
emax=10000
bkgima_flag=N
ecf=1
boxsize=20
images="image_comb.fits"
boxlist="boxlist_comb.fits"
expimages="expmap_comb.fits"
detmasks="detmask_comb.fits"


I am just selecting a region of interest and generating an image, exposure map, and detmask, then running the erbox command with the specified files and receiving this error.

Index '10' of dimension 1 of array mask above upper bound of 9

Error termination. Backtrace:
#0 0x55aad1faed8d in ???
#1 0x55aad1faefc5 in ???
#2 0x55aad1faf397 in ???
#3 0x55aad1f1b593 in __eboxdet_MOD_msrbkg
at ../../task/erbox/eboxdet_mod.f90:1300
#4 0x55aad1f20cf8 in __eboxdet_MOD_mdetec
at ../../task/erbox/eboxdet_mod.f90:942
#5 0x55aad1ef2883 in erbox
at ../../task/erbox/erbox_main.f90:89
#6 0x55aad1ef2883 in main
at ../../task/erbox/erbox_main.f90:33


Thank you
Garrett
GeorgLamer
Posts: 3
Joined: Wed Mar 08, 2023 11:01 am

Re: Fortran Runtime Error

Post by GeorgLamer »

Dear Garrett,

it seems you have discovered a bug in erbox which causes a crash when a large value of the task parameter boxsize is used.
This parameter sets the size of the detection box (side_length = 2*boxsize+1).
We recommend to use the default value boxsize=5. In case you need larger detection boxes (e.g. for the detecion of extended sources) you may set the parameter nruns to e.g. =3. With this setting erbox will perform 3 consecutive runs and apply a 2x2 rebining of the input image between the runs.
With the default setting boxsize=4 and nruns=3 the effective box sizes are 9, 18, and 36 image pixels.

I hope this answer solves your problem.

Best regards,
Georg Lamer
Post Reply