desihub / quicksurvey_example

Documenting the structure to run quicksurvey
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

tile files contain NaN. #10

Open weaverba137 opened 7 years ago

weaverba137 commented 7 years ago

Some tile files contain NaN values for RA, or Dec. For example, the file: users/forero/datachallenge2017/test/quicksurvey_example/output/dark/1/fiberassign/tile_14524.fits.

This file fails the test:

with fits.open(f) as hdulist:
    data = hdulist[1].data
assert not np.any(np.isnan(data['RA']))
weaverba137 commented 7 years ago

The DEC, XFOCAL_DESIGN, and YFOCAL_DESIGN columns also contain NaN.

sbailey commented 7 years ago

@forero can you check this out?

Context for others: those files are written by fiberassign; quicksurvey is just the wrapper that coordinates and spawns fiberassign. I don't know of any good reason why they should have NaNs. Random junk values would be less surprising than actual NaNs. This may spin off into a ticket in the fiberassign repo.

forero commented 7 years ago

This is fiberassign's default behaviour if nothing falls onto that fiber. Should we change it to -1 perhaps?

sbailey commented 7 years ago

Interesting (and problematic). The input sky catalog should provide a high enough density that fiber assignment should always be able to assign something to every fiber, with sky as the last option even if it already has "enough" sky fibers. Having a fiber not cover any targets at all should be a non-fatal error condition (i.e. write out the rest of the assignments, but complain loudly so that a human will notice). We should have fiber assignment QA that catches this.

This implies that the tiles should be strictly within the footprint of the imaging surveys (and mocks, or sky mocks at least) and not hang off the edge. We really don't want fibers being left to point at random locations that might be 5th magnitudes stars just off the imaging footprint (which could happen on the borders at low galactic latitude).