desihub / fiberassign

Fiber assignment code for DESI
BSD 3-Clause "New" or "Revised" License
8 stars 8 forks source link

check guide star isolation cuts #284

Open sbailey opened 3 years ago

sbailey commented 3 years ago

From @crockosi:

Expid 66266 tile 80061 from tonight 202012006 has two guide stars that have close friends in the postage stamps.

Check if the GFA_TARGETS isolation cuts are still being applied to the GUIDE_FLAG, PSF_FLAG, ETC_FLAG in fiberassign and whether we may need to be more stringent in isolation criteria.

sbailey commented 3 years ago

FYI was GUIDE2_1 in guide-rois-00066266.fits.fz:

image

I haven't figured out how to track that back to a specific target in the GFA_TARGETS HDU, however, but that would certainly be a useful recipe to know. Observers report ~0.9" seeing, so those two blobs are plausibly more than 5" separated which is the default isolation cut.

araichoor commented 3 years ago

I confirm that the current isolation criterion is 5": https://github.com/desihub/fiberassign/blob/cd79a4b4e32736baa1f848e4a1861c9f09d8bf0d/py/fiberassign/gfa.py#L19-L31 I ve been exploring files in /global/cfs/cdirs/desi/spectro/data/20201206/00066266/, but I am not familiar with those. Where can I find the scripts generating those files?

sbailey commented 3 years ago

Thanks for confirming. I'll followup with the online time to see if this is actually a problem or if they need the isolation cut to be increased.

Those files are the raw data coming off the telescope as minimally processed/formatted by ICS, plus files from Platemaker, but I don't know details about underlying code.

As for the format, the "guide-rois-*.fits.fz" contain the cutout images ("regions of interest", roi) from the GFAs for each guide star. They are a 3D data cube for (number of guide exposures, ny, nx), and HDUs like GUIDE2_1 is the 1 (counting from 0) guide star of the GFA on petal 2. e.g. to make the plot I posted, starting in /global/cfs/cdirs/desi/spectro/data/20201206/00066266:

import numpy as np
import fitsio
import matplotlib.pyplot as plt
images = fitsio.read('guide-rois-00066266.fits.fz', 'GUIDE2_1')
plt.imshow(np.mean(images, axis=0))
plt.show()