-
Notifications
You must be signed in to change notification settings - Fork 30
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
red sequence validation test #101
Conversation
Hmm, looks travis has an issue with how I'm loading the redmapper catalog in the test that wasn't showing up in my runs. @yymao do you have a preferred way for me to do this. |
Thanks, @j-dr! Indeed, while the code you post here can actually be run without issue, our design is that the tests should agnostic about the catalogs and the tests should not need to know how to import/load catalogs, and that's why (cc @EiffL because he's writing tests for add-on catalogs as well) |
descqa/RedSequence.py
Outdated
except: | ||
return TestResult(skipped=True) | ||
print(redmapper) | ||
redmapper = redmapper.get_quantities(['galaxy_id']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@j-dr is the only thing you need in this test the galaxy_id in redmapper?
… well as means and scatters in mass bins. No longer needs redmapper catalogs
I just updated this PR to use the base extragalactic catalogs only. It now shows the full distribution of colors for centrals, and the mean and scatter of the color distributions in mass bins. This will be more useful for eyeballing and identifying issues like ones that have come up with discontinuities in g-r with mass and the like. See test output at https://portal.nersc.gov/project/lsst/descqa/v2/?run=2018-07-27_18&test=RedSequence_DES_Y1&catalog=protoDC2_test. Not very pretty yet, but you get the idea. @erykoff @yymao @evevkovacs @aphearin |
Responding to this earlier comment #101 (comment) : we now finally have really redmapper add-on that we can use (e.g. I can take a stab to make the necessary changes. @j-dr, is that ok with you? |
Sorry, mis-hitted the close button.. |
@j-dr The new composite catalog allows you to access the main catalog and the redmapper add-on with a single catalog input, and hence remove the need of loading another catalog during the test. In particular: import GCRCatalogs
gc = GCRCatalogs.load_catalog('proto-dc2_v4.3_addon_redmapper')
# to obtain quantities from the main protoDC2 catalog, use `gc.master`
gc.master.get_quantities(['galaxy_id'])
# to obtain quantities from only entries that are redmapper galaxies
gc.get_quantities(['galaxy_id']) # you will obtain a dictionary of masked arrays
# use `.compressed()` to make a masked array regular array, with masked entries removed.
gc.get_quantities(['galaxy_id'])['galaxy_id'].compressed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments to simplify some of the code
descqa/RedSequence.py
Outdated
'mag_true_{}_sdss', | ||
) | ||
self.possible_mag_fields = [[f.format(self.bands[i]) for f in possible_mag_fields] | ||
for i in range(len(self.bands))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify Lines 55-56:
self.possible_mag_fields = [[f.format(band) for f in possible_mag_fields] for band in self.bands]
descqa/RedSequence.py
Outdated
mag_fields = [] | ||
for i in range(len(self.bands)): | ||
mag_fields.append(gc.first_available(*self.possible_mag_fields[i])) | ||
quantities_needed.add(mag_fields[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify Lines 78-81
mag_fields = [gc.first_available(*fields) for fields in self.possible_mag_fields]
quantities_needed.update(mag_fields)
Co-authored-by: Yao-Yuan Mao <yymao.astro@gmail.com>
Co-authored-by: Yao-Yuan Mao <yymao.astro@gmail.com>
Co-authored-by: Yao-Yuan Mao <yymao.astro@gmail.com>
Sorry for the delay in reviewing this. The email got lost in my stack. |
Co-authored-by: Yao-Yuan Mao <yymao.astro@gmail.com>
I've implemented a red sequence validation test as discussed in #41. The latest run of this test can be found here: https://portal.nersc.gov/project/lsst/descqa/v2/?run=2018-04-08_16&test=RedSequence_DES_Y1&catalog=proto-dc2_v3.0.
I'm currently comparing to DES Y1, but don't have concrete validation criteria implemented yet. I'm using the actual redmapper catalog as run on protoDC2_v3.0 in order to calculate the red sequence. This is not totally ideal, since if the red-sequence training has issues as it does in this case, then this is not a totally accurate measure of the red sequence.
Pinging @erykoff, @aphearin, @yymao as interested parties.
[Edited by @yymao: This PR fixes #41 ]