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

restore w1/w2 flux argument to iselg_colors #514

Merged
merged 4 commits into from
Jun 28, 2019
Merged

restore w1/w2 flux argument to iselg_colors #514

merged 4 commits into from
Jun 28, 2019

Conversation

moustakas
Copy link
Member

Near-trivial fix for an unintended change to the isELG API introduced in #513.

Copy link
Contributor

@geordie666 geordie666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick work on this. One comment:

I think you'll need the exact same changes in py/desitarget/sv1/sv1_cuts.py? Specifically here:

https://github.com/desihub/desitarget/blob/elg-w12flux/py/desitarget/sv1/sv1_cuts.py#L903

A second comment:

You'll also need to pass w1flux and w2flux to isELG(). Here:

https://github.com/desihub/desitarget/blob/elg-w12flux/py/desitarget/sv1/sv1_cuts.py#L853-L854

and in the sv1_cuts.py code.

@geordie666
Copy link
Contributor

I think this will work, now. Strictly, for completeness, you might want to pass w1flux and w2flux in the main survey cuts code, too:

def isELG(gflux=None, rflux=None, zflux=None, gsnr=None, rsnr=None, zsnr=None,

That's your call (I think the code will work without failing, either way). Feel free to merge at your leisure.

@moustakas
Copy link
Member Author

Although I accidentally retriggered tests, I'm going to go ahead and merge. I tested select_mock_targets with these changes with all target classes for both the main and sv1 surveys.

Thanks for your help, @geordie666.

@moustakas moustakas merged commit d4598ea into master Jun 28, 2019
@moustakas moustakas deleted the elg-w12flux branch June 28, 2019 19:42
@geordie666
Copy link
Contributor

Excellent. If you don't think the mocks are going to fail on maskbits now being passed out of _prepare_optical_wise:

# ADM process the Legacy Surveys columns for Target Selection.
photsys_north, photsys_south, obs_rflux, gflux, rflux, zflux, \
w1flux, w2flux, rfiberflux, objtype, release, \
gfluxivar, rfluxivar, zfluxivar, \
gnobs, rnobs, znobs, gfracflux, rfracflux, zfracflux, \
gfracmasked, rfracmasked, zfracmasked, \
gfracin, rfracin, zfracin, gallmask, rallmask, zallmask, \
gsnr, rsnr, zsnr, w1snr, w2snr, \
dchisq, deltaChi2, brightstarinblob, maskbits = \
_prepare_optical_wise(objects, colnames=colnames)

Then we should be good to go.

Apologies for breaking this at such short notice.

@geordie666
Copy link
Contributor

Sorry, missed your last comment. If select_mock_targets works, then all is good.

qmxp55 pushed a commit to qmxp55/desitarget that referenced this pull request Feb 12, 2020
restore w1/w2 flux argument to iselg_colors
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

Successfully merging this pull request may close these issues.

2 participants