Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

off-footprint stuck skies check in assemble_fibermap #1483

Open
sbailey opened this issue Nov 15, 2021 · 1 comment
Open

off-footprint stuck skies check in assemble_fibermap #1483

sbailey opened this issue Nov 15, 2021 · 1 comment

Comments

@sbailey
Copy link
Contributor

sbailey commented Nov 15, 2021

If/when the backup program tiles use desitarget.skyhealpix (desihub/desitarget#771) to get off-footprint sky locations, that will fail in desispec.io.fibermap.assemble_fibermap that double checks that those stuck positioners are still on sky using desitarget.skybricks (and thus will decide they aren't on sky): Currently this is desispec/py/desispec/io/fibermap.py starting at line 705, but could move a bit after PR #1459 is merged:

https://github.com/desihub/desispec/blob/master/py/desispec/io/fibermap.py#L705

        #- for SKY on stuck positioners, recheck if they are on a blank sky
        #- (e.g. they might be "off" target but still ok for sky)
        log.info('Checking if SKY on stuck positioners are still on SKY locations')
        tilera = fa.meta['TILERA']
        tiledec = fa.meta['TILEDEC']
        tileradius = get_tile_radius_deg()
        skybricks = Skybricks()
        ok = skybricks.lookup_tile(tilera, tiledec, tileradius,
                fibermap['FIBER_RA'][stucksky], fibermap['FIBER_DEC'][stucksky])
...
@araichoor
Copy link
Contributor

I just submitted a fiberassign PR on this topic: desihub/fiberassign#416.
As written in the PR description, I ve added in the fiberassign-TILEID.fits.gz header a LKSKYSRC keyword (for "lookup_sky_source"):

  • if LKSKYSRC=="ls", then one should use $SKYBRICKS_DIR,
  • if LKSKYSRC=="gaia", then one should use $SKYHEALPIXS_DIR, which also has to be defined.

Then you'd have to implement in desispec fibermap.py the same kind of switch as in https://github.com/desihub/fiberassign/blob/299e10a877797dc27d77386acad43698fc6263fc/py/fiberassign/stucksky.py#L96-L117.

Let me know if you'd like the approach to be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants