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

Include proper motion for the LS image cutouts #84

Closed
armengau opened this issue Feb 28, 2023 · 9 comments
Closed

Include proper motion for the LS image cutouts #84

armengau opened this issue Feb 28, 2023 · 9 comments

Comments

@armengau
Copy link
Collaborator

The radec coordinates sent to the legacysurvey site are TARGET_RA/DEC.

They should be corrected for proper motions (at least)
Something like this, following Arjun’s message:
RA(2018)=TARGET_RA + (2015-REF_EPOCH)*PMRA/3600e3

@armengau
Copy link
Collaborator Author

Any comment welcome on what is the exact way to implement the correction. In particular, is there a way to know from spectra files when the corresponding imaging data was taken? (more precisely than “2015”)

@arjundey
Copy link

My first option is that there be two cross-hairs for any target which has non-zero or non-NaN proper motion in the targeting file, one which shows the (TARGET_RA, TARGET_DEC) at the REF_EPOCH, and one which shows the position at the (average) epoch of the DESI spectroscopic observation. That way, any future user could figure out whether the target was properly targeted by DESI in case the proper motion estimate changes (e.g., by Gaia DR4, etc.). In this case, all extragalactic objects would only have a single cross hair. One could modify this simple requirement by only doing this for sources which have PM/err(PM) > 2 sigma.

If you can only place a single cross-hair on the image, then perhaps the least ambiguous thing is to place the cross-hair on the position which was actually observed by DESI at the average DESI spectroscopic epoch, rather than the target position at the epoch of the imaging data. The reason is that this would let the user know what sky position was actually observed, and then it would be their job to figure out whether this was really centered on the target of interest at the epoch of observation, based on the targeting source properties at the time of targeting. My suggestion of two crosses answers this quetion and leaves less work for the user, but this creates less work right now and avoids dealing with the problem of possible bad proper motion values in our targeting catalogs. For high PM sources, this method unfortunately would not mark the “intended” target, but. in most cases that will be the source closest to the cross hair.

@armengau
Copy link
Collaborator Author

armengau commented Apr 11, 2023

@arjundey Hi Arjun, going back on this issue.
I understand you stumbbled on that probably because your targets had REF_EPOCH=2000, while the usual DESI targets from the legacy survey have REF_EPOCH ~ 2015.5 (gaia), right?
If that's true, could you tell me where I can find a spectra file with REF_EPOCH ~ 2000: just to test a possible addition of a second cross-hair when I find that the correction (2015-REF_EPOCH)*PMRA/3600e3 is significant.

Also, just to be sure: in spectra's fibermaps, (TARGET_RA, TARGET_DEC) always refer to coordinates at REF_EPOCH, right? Or to the coordinates at the time of DESI spectro observations?

@arjundey
Copy link

arjundey commented Apr 11, 2023 via email

@armengau
Copy link
Collaborator Author

Hi Eric, Thanks for looking into this. This file: /global/cfs/cdirs/desi/spectro/redux/iron/healpix/main/dark/319/31935/coadd-main-dark-31935.fits contains at least 4 high proper motion targetids: 2253530895220737 2253525023195136 2253525031583746 2253513295921156 Is this what you were asking for? I have a lot of examples, but let me know if this is what you want. Arjun

Hi Arjun, looking at these high-proper motion objects:

  • they look well displayed on the viewer
  • they have REF_EPOCH~2018.15
    So, to do some tests (ie see the offset) I guess I need objects with REF_EPOCH << 2015

@arjundey
Copy link

arjundey commented Apr 12, 2023 via email

@armengau
Copy link
Collaborator Author

@arjundey Here you get an example with the updated code:
(https://data.desi.lbl.gov/desi/spectro/prospect/dev/test_b_proper_motion.html)

  • thick, yellow cross = TARGET_RA/DEC, unchanged, as before
  • thinner, white cross = including PM correction as given by spectra's fibermaps (using 2015.5-REF_EPOCH ; and displaying only if a correction is > 1 arcsec)

It seems to make sense, in particular you have two noise-only spectra (the first and penultimate ones) for which imaging shows fibers certainly were placed at the wrong position.

Any comment welcome, I will start a PR now.

@armengau armengau mentioned this issue Apr 13, 2023
@arjundey
Copy link

@armengau Thanks for this - it looks fantastic! I do have some comments, though, since your image made me think a bit harder about what we might actually want. As i see it, there are three different positions of interest:

  [1] TARGET_RA,TARGET_DEC] which are referred to the REF_EPOCH; 
  [2] the position of the source at the epoch of the spectroscopic observation, corrected for proper motion (i.e., TARGET_RA,TARGET_DEC corrected to NIGHT or MJD listed in the HDU=2 of the COADD file); 
  [3] the position of the source at the epoch of the imaging data (i.e., TARGET_RA,TARGET_DEC corrected to approximately 2016 or so, which is the rough mean of the epoch of our Legacy Surveys imaging observations). 

Unfortunately the imaging epoch for Legacy Surveys imaging is complex and changing. However, what we really want to know is what position the spectroscopy was obtained at, and whether the track of the object from the original refernce position to the observed position goes through the actual source as represented on the imaging data. Hence, we could just mark (1) and (2), or even just mark (2) with a cross and draw a line from (1) to (2). That line should go through the object if the PMRA,PMDEC are correct. I have attached an example below based on Spectrum 2 in your test_b file. Here the purple circle would represent position [2] (i.e., the position at the epoch of the spectroscopic observation) and the dashed line connects the original coordinate epoch (REF_EPOCH position) with that of position [2].

I agree that we should only do this in cases where the MJD - REF_EPOCH correction results in an offset > 1 arcsec.
I also tagging @dstndstn (Dustin Lang) here, in case he has any further suggestions on what to use for the imaging data.

What do you think?

Arjun

HPM_viewer_test

@weaverba137
Copy link
Member

Closed by #85.

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

No branches or pull requests

3 participants