Closed drphilmarshall closed 7 years ago
@drphilmarshall I think I made a graph that calculates rest frame apparent magnitude in r, g, i, z bands.
Would there be any good way to test whether the magnitudes that I calculated are reasonable? Knowing that the HST's limiting magnitude is around 22, I think AGN's apparent magnitude should be at most around 22-23.
I have been pushing the changes to the fork, and the code that calculates the magnitudes is color.py
, and the demo notebook is Graph.ipynb
. color.py
code needs more decompositions, comments, and stylistic improvements because the code is a bit hard to read right now. I will keep working on it!
Thank you so much, and have a nice weekend.
@drphilmarshall Assuming that I calculated the reasonable magnitude above, I modified OM10 code and calculated the magnitude. I pushed all the updates including python codes and notebooks to my fork. I did not make a pull request to your original directory yet.
The demo notebook is Graph.ipynb
, the code used to produce demo notebook is color.py
, and the final notebook showing the colored output is OM10/notebooks/Painting with lenspop.ipynb
. The only problem I have is that the code takes too long time to compute magnitudes for around 15,000 lenses - it took 18 hours to finish running. Still, the magnitude seems reasonable - there are some outliers between 14-16, but most of them are near 20. Could you please check the final results? If everything looks okay, then I will make a pull request.
I will fly back to Korea next Friday, and I think I would have plenty of time to study and work on codes during the vacation. I think this was the only task given to me; would there be anything that I could study on/work on during the winter vacation?
Thank you!
That's great, Jenny! You should start the pull request right away, so that we can easily view and comment on your new code. I took a look at your painting notebook: very good to see that your code is robust enough to cope with all systems. It looks like you have not pushed Graph.ipynb
, but that's OK - let's just work on one notebook, painting with lenspop. First thing will be to make a smaller sample of lenses to work with! (Also, note that when you choose the synthetic
option, you don't need to provide any filenames.)
The first plot you made looked promising to me, but now let's make some more "diagnostic" plots, in the painting with lenspop notebook. The goal is to find the problems with our approach so that we can solve them.
Do the i-band magnitudes of the lens galaxy match the previous estimates, in the APMAG_I
column? You could make a scatter plot of the differences vs 1) the lenspop i-band mag and 2) the redshift.
Are the colors of your lens galaxies reasonable, compared to the SDSS LRGs in data/SDSS_LRGs.txt
? You could make a "corner plot" of a sample of OM10 lenses painted with lenspop (you don't need them all!), choosing the following columns: redshift, i-band magnitude, u-g, g-r, r-i, i-z color. The new OM10 tutorial notebook shows how to do this. Then, you can read in the SDSS LRGs and overlay them, in the same way that overlays are made in the tutorial. You'll have to read the plot_sample
method to see how to use corner
but it's pretty straightforward.
Do the quasar colors reasonable? You could make a corner plot again, with the same axes as for the lens galaxies - but then overlay a sample of SDSS quasars. A better QSO sample is the one from our statistics course here at KIPAC, shown in this notebook. You should be able to give pandas.read_csv
the HTTP URL of the appropriate csv file, to read it in.
To get the updates I made (including the tutorial notebook) you need to git pull
from the base repo. First you make a new remote connection to it, and then pull like this:
git remote add base https://github.com/drphilmarshall/OM10.git
git pull base master
Watch out: if this causes conflicts you will need to read the message carefully, and edit the files that contain conflicts until everything works again. (Search for <<<<<<
and >>>>>>
in the files to make sure you have found them all.)
Closed via #49 !
While figuring out #45 you can make a very short notebook that simply uses the
ABFilterMagnitude
function fromlenspop.stellarpops
to compute apparent magnitudes in the ugrizy filters given an AB absolute magnitude in the rest-framer
band, as computed bylenspop.EarlyTypeRelations
. If you begin this notebook withimport lenspops
you'll then need to edit your local clone ofLensPops
until the functions you need can indeed by imported as a package. For a typical lens galaxy, you can assumevdisp=250.0
andzd=0.4
. For a typical AGN source, you can assume2.0
, and you'll need to figure out howLensPops
assigns quasar sources their absolute magnitudes. Nice if you can lay out the calculation so the K-corrections are separate from the distance moduli. Have fun!