kslong / kred

Tools for analysing narrow band imaging with DECam
GNU General Public License v3.0
1 stars 0 forks source link

SwarpSetup.py on fields that are missing images in one or more filters #17

Closed SeanPoints closed 1 month ago

SeanPoints commented 1 year ago

Run SwarpSetup.py on a field that is missing data from one (or more) filter. For example,

SwarpSetup.py -all LMC_c02 (No N662 data for this field)

Output: The center of this tile is 73.98664 -66.48691 Ha images : 0 SII images : 104 R images : 100 N708 images : 8

Ha Traceback (most recent call last): File "/home/points/kred/py_progs/SwarpSetup.py", line 455, in steer(sys.argv) File "/home/points/kred/py_progs/SwarpSetup.py", line 438, in steer create_commmands_for_one_tile(field,one,bsub=bsub) File "/home/points/kred/py_progs/SwarpSetup.py", line 378, in create_commmands_for_one_tile xtab=summarize(field,tile) ^^^^^^^^^^^^^^^^^^^^^ File "/home/points/kred/py_progs/SwarpSetup.py", line 105, in summarize xtab['FILTER']='N662'


  File "/home/points/anaconda/envs/kred/lib/python3.11/site-packages/astropy/table/table.py", line 1904, in __setitem__
    self.add_column(value, name=item, copy=True)
  File "/home/points/anaconda/envs/kred/lib/python3.11/site-packages/astropy/table/table.py", line 2173, in add_column
    raise TypeError('Empty table cannot have column set to scalar value')
TypeError: Empty table cannot have column set to scalar value
kslong commented 1 year ago

@SeanPoints This error should now be fixed on main. Please close the issue, once you have confirmed you no long see this error on any of the fields.

kslong commented 1 month ago

The main issue is fixed, but the program now fails at the SwarpEval stage, because it does not recognize the problem:

No N708 image found
[2024-07-10 16:53:21] CleanStars: Finished  LMC_c02 T16 
Beginning LMC_c02 T01
Traceback (most recent call last):
  File "/home/long/kred/py_progs/SwarpEval.py", line 267, in <module>
    steer(sys.argv)
  File "/home/long/kred/py_progs/SwarpEval.py", line 256, in steer
    make_plots(xdir, field,one)
  File "/home/long/kred/py_progs/SwarpEval.py", line 186, in make_plots
    print('No images were found for field %s tile %s in %s' % (field,tile,xdir))
kslong commented 1 month ago

This also seemed to fail for me on LMC_c32

kslong commented 1 month ago

The program no longer falls over when this is the case. I will close this issue shortly.