Closed wmwv closed 4 years ago
Dust Extinction package Dust map packages I found after some brief search:
https://github.com/gregreen/dustmaps
May require two external utilities: 1 = get E(B-V) from dust map using some utility (like one of the ones mentioned above), and 2 = get A_lambda given E(B-V) and R_v for a given dust law. e.g., https://github.com/jmeyers314/ImageSimulationRecipes/blob/master/python/utensils/extinction.py has a few dust laws. I thought CatSim uses the CCM dust law with R_v=3.1 for the Milky Way, but obviously we need to confirm.
@danielsf What's the dust map infrastructure within lsst_sims
?
We should probably just use the same here, more for simplicity of software support than correctness (we don't know truth for the Universe).
The sims used the dust map from Schlegel, Finkbeiner, and Davis with the Cardelli, Clayton, and Mathis extinction law applied.
There is a (somewhat clunky) utility in lsst_sims to get E(B-V) from the SFD maps. It works something like
from lsst.sims.catUtils.dust import EBVbase
ebv_gen = EBVbase()
ebv = ebv_gen.calculateEbv(equatorialCoordinates=(my_ra, my_dec))
What did you use to implement CCM?
If the computation time is low, we can just add Ebv as quantity modifiers (i.e. modifying ra and dec). If the computation time is high, we can store them on disk and provide it as composite catalog.
@wmwv @yymao Has there been any decision on this? Photo-z will need galaxies dereddened of MW dust in order to compute photo-z's. In my opinion, it seems like a composite catalog with quantites dereddened would be a good idea, as almost everyone in DESC, I assume, will be using those rather than "raw" magnitudes, so this dereddening would be done on almost all queries for galaxy samples. Plus, if left to the user there is a possibility of mistakes if they use the wrong dust law (Calzetti vs Cardelli, Clayton, Mathis, for example) or the wrong Rv values.
Sorry I didn't see Michael's last question (from four months ago...)
We implemented CCM ourselves here
https://github.com/lsst/sims_photUtils/blob/master/python/lsst/sims/photUtils/Sed.py#L921
the addDust
method in that same file actually applies the dust extinction to an SED.
@wmwv @rmandelb @sschmidt23 This MW extinction thing had high priority once upon a time, but we seem to lose the momentum. I'm assigning it with a medium priority but I wonder if it is still a desired feature in gcr-catalogs?
I think it would still be useful to have for the run[x].[y] catalogs, you do need it compute correct color cuts, photo-z's, etc... A few months ago I put together a demo notebook on how to deredden in the DC2-analysis repo by reverse engineering what Scott did to add the reddening, though I don't think I ever merged it: https://github.com/LSSTDESC/DC2-analysis/blob/u/sschmidt23/mwdust/contributed/Deredden_MW_dust.ipynb (I'll create a PR and ask someone to review the notebook there). But, maybe this notebook would be helpful in figuring out how to best expose some dereddening functionality to users?
Thanks @sschmidt23 --- I think then the question is whether this notebook is enough to serve those who need dereddening, or if we still need this functionality in GCR. (cc @JoanneBogart)
I'll be happy to be assigned and brainstorm on the question of where it goes and in what form.
It seems like we will not be adding MW extinction via GCR (users can calculate them following the tutorial notebook @sschmidt23 made).
Closing this now unless people feel strongly that we should add MW extinction via GCR.
Add MW extinction to
dc2_object_*
catalogs.