emlinecat_new.py fails when no sources are found

Issue #3 resolved
Tanya Urrutia created an issue

In the event that no sources are found that satisfy your requirements, the recipe crashes

lsdcat/candels-cdfs-20> emlinecat_new.py -i s2n_med_cc_v300_eff_candels-cdfs-20.fits --sncube --tabvalues=ID,RA_SN,DEC_SN,LAMBDA_SN,DETSN_MAX,NPIX -T 3 -t 5 --npixmin=2000 -o DATACUBE_eff_candels-cdfs-20_v0.2.fits --fluxhdu=2 --varhdu=3 --catalog=catalog_s2n_med_cc_v300_eff_candels-cdfs-20_ext.cat --groupcoords sn_weighted -r 1.0
emlinecat_new.py version 0.7.1alpha s2n_med_cc_v300_eff_candels-cdfs-20.fits: Using 6-connected voxel connetivity
s2n_med_cc_v300_eff_candels-cdfs-20.fits: Opening datacube with formal detection significances  ... (HDU1) (0.0s)
s2n_med_cc_v300_eff_candels-cdfs-20.fits: Detecting emission lines using (initial) threshold 3.0 ... (10.3s)
s2n_med_cc_v300_eff_candels-cdfs-20.fits: There are 93265 detections above a detection threshold of 3.00 (21.94s)
s2n_med_cc_v300_eff_candels-cdfs-20.fits: Thrown away 93265 detection clusters, because they have less than 2000 voxels (24.19s)
s2n_med_cc_v300_eff_candels-cdfs-20.fits: Using a second threshold of 5.00 (24.19s)
s2n_med_cc_v300_eff_candels-cdfs-20.fits: Thrown away 0 detection clusters, because they dont have a single voxel with SN>5.0 (25.179s)
Traceback (most recent call last):
  File "/home/tanya/muse-python/emlinecat_new.py", line 526, in <module>
    max_label = new_obj_num
NameError: name 'new_obj_num' is not defined
lsdcat/candels-cdfs-20>

Comments (2)

  1. Log in to comment