astro-datalab / notebooks-latest

Default set of Data Lab notebooks, by DL team and contributed by users
BSD 3-Clause "New" or "Revised" License
60 stars 48 forks source link

New Extragalactic Tutorial (Milky Way Analogues) #170

Closed sdmork closed 1 year ago

sdmork commented 1 year ago

Added a new Extragalactic tutorial detailing the process of finding Milky Way Analogues in the Legacy Survey.

@kadrlica

kadrlica commented 1 year ago

@simonmork This notebook requires some minor updates before it would be ready to request a Data Lab review. In particular, I think that we might want to see if we can make a version that runs a bit more quickly. Let me know if you'd be interested in pursuing these updates over the summer.

kadrlica commented 1 year ago

@simonmork I've made some updates to the notebook (including changing the name to something more descriptive). Take a look and let me know if this looks ok to you.

kadrlica commented 1 year ago

@jacquesalice and @rnikutta: Both Simon and I have taken another pass through this notebook. Would you have a chance to start a formal review? Thanks!

rnikutta commented 1 year ago

Hi @kadrlica and @simonmork , many thanks! We'll review ASAP (might be next week and the week after though, due to deadlines and travels).

sdmork commented 1 year ago

Hi @jacquesalice,

I have implemented the comments you mentioned in your above message. The only change I did not implement was #9 because the magnitudes that I pull I want to be dereddened and I am unsure if the precomputed colors in the tractor catalog are dereddened.

Let me know if there are any other final changes you want me to make!

-Simon

@kadrlica

kadrlica commented 1 year ago

Thanks Alice and Simon. Sorry about the extra notebook, that was probably my fault. Do we want to commit all the cutout images?

rnikutta commented 1 year ago

Thanks @simonmork . Indeed, the pre-computed colors appear to be using the not-dereddened mags, which can be confirmed like this:

df = qc.query("select mag_g, mag_r, dered_mag_g, dered_mag_r, g_r from ls_dr9.tractor limit 5",fmt='pandas')
df['my_g_r'] = df['mag_g'] - df['mag_r']
df['my_dered_g_r'] = df['dered_mag_g'] - df['dered_mag_r']
df

    mag_g       mag_r       dered_mag_g dered_mag_r g_r        my_g_r     my_dered_g_r
0   25.273912   24.131920   25.204136   24.084917   1.141993   1.141992   1.119219
1   25.448313   25.026280   25.378372   24.979166   0.422033   0.422033   0.399206
2   24.322979   23.566902   24.253012   23.519772   0.756077   0.756077   0.733240
3   26.226358   24.410812   26.156416   24.363699   1.815546   1.815546   1.792717
4   24.746489   24.035713   24.676622   23.988651   0.710775   0.710776   0.687971

I'll add my comments to the NB (if any) in the coming 2-3 days if that's ok.

rnikutta commented 1 year ago

@kadrlica No, please don't commit any outputs other that the NB itself. Thanks.

sdmork commented 1 year ago

@rnikutta I have recommitted changes deleting all exterraneous cutouts. Thank you for clearing up my confusion regarding the precomputed colors and reddening.

galaxyumi commented 1 year ago

Hi @simonmork and @kadrlica, I am a new datalab team member. Thanks for your contribution! It is a very nice NB.

Here are only minor suggestions:

  1. In Goals, "SDSS-identified spiral galaxy Milky Way analogues" -> "SDSS-identified Milky Way analogues" or "SDSS-identified Milky Way-type spiral galaxies"
  2. In Summary, "Milky-Way analogues are a unique class of object" -> "Milky Way analogues are a unique class of objects"
  3. Can you fix the reference numbering to match flow? For example, the second reference appeared in Goals section is numbered as [4], not [2].
  4. Missing unit on y-axis label in color-magnitude plots.
sdmork commented 1 year ago

Hi @simonmork and @kadrlica, I am a new datalab team member. Thanks for your contribution! It is a very nice NB.

Here are only minor suggestions:

  1. In Goals, "SDSS-identified spiral galaxy Milky Way analogues" -> "SDSS-identified Milky Way analogues" or "SDSS-identified Milky Way-type spiral galaxies"
  2. In Summary, "Milky-Way analogues are a unique class of object" -> "Milky Way analogues are a unique class of objects"
  3. Can you fix the reference numbering to match flow? For example, the second reference appeared in Goals section is numbered as [4], not [2].
  4. Missing unit on y-axis label in color-magnitude plots.

Hi @galaxyumi, I have implemented the changes you listed in this message and have pushed them to my branch. Let me know if there is anything else you need.

galaxyumi commented 1 year ago

Thanks @simonmork!

@rnikutta, @jacquesalice - the NB looks good to me.

rnikutta commented 1 year ago

Hi @simonmork and @kadrlica ,

sorry for the stretched-out reviews... I finally found some time to take your NB fr a spin, it's very nice indeed! Thank you so much for contributing it to Data Lab. My comments below; they should be the last ones!

sdmork commented 1 year ago

Hi @rnikutta,

Thank you for your detailed feedback. I have implemented your requested changes, and so the notebook should be ready for a final review and merge. Let me know if there is anything else I need to do. Thanks again!

rnikutta commented 1 year ago

Thanks @simonmork ! A few items have not been addressed though:

ra_width = (RAMAX-RAMIN)/RACHUNKS dec_width = (DECMAX-DECMIN)/DECCHUNKS for ra in np.linspace(RAMIN, RAMIN+ra_width(RACHUNKS-1), RACHUNKS): for dec in np.linspace(DECMIN, DECMIN+dec_width(DECCHUNKS-1), DECCHUNKS):


is simpler than the one I proposed:

width = 20 RAMIN, RAMAX = 90, 130 DECMIN, DECMAX = 40, 80

for ra1 in range(RAMIN,RAMAX,width): for dec1 in range(DECMIN,DECMAX,width):



Why do you prefer it?

- Replace this wording:
" Since we are limited by the amount of data that any one query is allowed to take at any given time"
with
" Since we are limited by the maximum runtime of a query"

- Replace "In order to use the selection cell for arbitrary RA and Dec, change the following values:" with "Change the following values to adjust for your use case:"
- Fix typo in "half-light radiys"

Everything else looks great!
sdmork commented 1 year ago

Hi @rnikutta, sorry about the link mixup and typos, those should be up to snuff now.

As for the loop logic, I've left in place my most recent implementation for three reasons.

Screenshot 2023-09-18 220846

I appreciate your detailed follow-up very much!

kadrlica commented 1 year ago

Congratulations @simonmork! Thank you reviewers for all your detailed feedback!