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

Photo mags #367

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Photo mags #367

wants to merge 13 commits into from

Conversation

andrew-saydjari
Copy link
Collaborator

This PR attempts to validate integrating Korg spectra against photometric filter curves. I have uploaded simple grizY DECam curves and done tests versus some MARCS spectra. In my initial commit, I followed code from E.Schlafly that I translated/reimplemented and was not super careful about units because it only cares about colors. I also made an initial attempt at a "get_radius" function that might be something to call and propagate as part of the named tuple result from synthesize if we want to report an intrinsic magnitude. TBD.

@andrew-saydjari andrew-saydjari marked this pull request as draft November 18, 2024 20:07
@andrew-saydjari
Copy link
Collaborator Author

Comparisons for Teff = 5750, logg = 4.5, and M_H = 0 to MARCS are below. They depends somewhat on radiative transfer keywords, specifically tau_scheme.

compute_magnitude(marcs_flux,marcs_wave,DECam_g_trans,DECam_g_wave)
compute_magnitude(ex_spec.flux./(1e8),ex_spec.wavelengths,DECam_g_trans,DECam_g_wave)

The results are:

  • -38.130 MARCS
  • -38.156 default Korg
  • -38.155 (I_scheme="bezier")
  • -38.121 (tau_scheme="bezier")
  • -38.121 (I_scheme="bezier", tau_scheme="bezier")

The comparison using default radiative transfer parameters over the DECam g-band is below, with Korg in blue and MARCS in red.

image

@andrew-saydjari
Copy link
Collaborator Author

Summary, MARCS and Korg differ for solar on the order of 26 mmag, but slightly different radiative transfer treatments within Korg differ by 35 mmag.

@andrew-saydjari
Copy link
Collaborator Author

I have computed over a large marcs grid the difference in the photometry. Please request plots @ajwheeler. The simplest thing I made was just M_H = 0, A_M = 0, difference in g-band mag.

image
image

Adam will like the linear scale, that shows nothing until temperatures below 4k. I like the log scaled plot so you can see how many mmag difference there is, though cases that go up to at most -10 mmag are dropped by the log. Thoughts? More slices?

andrew-saydjari and others added 8 commits November 19, 2024 01:43
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/photo_mags.jl Outdated Show resolved Hide resolved
@andrew-saydjari
Copy link
Collaborator Author

So, I lied, and have more plots. I created an interesting representation where I map this ~ 4D grid onto 2D using

marcs_x = marcs_teff .+ 100 .*marcs_a_m
marcs_y = marcs_logg .+ 0.1 .*marcs_m_H

I think we should be worried anywhere there is a change in > 10-20 mmag. @ajwheeler thoughts?

image
image

image
image

image
image

image
image

image
image

I also did one color

image
image

Part of me thinks a lot of this is explained by the lower res of the marcs spectra being just not great for the cooler stars, but I think it is worth trying to make sure we understand and trust metallicity/alpha behavior or have a path to validate it if we are worried.

@ajwheeler
Copy link
Owner

Part of me thinks a lot of this is explained by the lower res of the marcs spectra being just not great for the cooler stars, but I think it is worth trying to make sure we understand and trust metallicity/alpha behavior or have a path to validate it if we are worried.

Agreed that it's good to express healthy skepticism towards both codes. What linelist did you use for this? It mildly surprises me that the metal-poor stars are worse.

@andrew-saydjari
Copy link
Collaborator Author

I guess you could ask me to repeat the test synthesizing at the MARCS wavelength resolution using Korg and comparing.

To answer your question
lines = Korg.get_VALD_solar_linelist()

@ajwheeler
Copy link
Owner

Synthesizing on the MARCS wavelength grid is a pretty good idea, but I don't think that's main source of the disagreement here. I'd bet with high confidence that it's the linelist, which will have hardly any molecular lines. I would expect that to mess up the cool stars substantially.

What's happening with the metal-poos stars is another Q. I see no reason why resolution effects would impact them differently, so there must be something else going on. Off the top of my head, it might be the lack of true scattering in Korg.

@ajwheeler
Copy link
Owner

Quick Q: get_radius is currently not used anywhere. Do I compute with compute_mags then adjust with the radius?

@andrew-saydjari
Copy link
Collaborator Author

That is the idea. If the units in compute_mags were right, you would just use the get_radius to convert to the correct unitful absolute magnitude. However, while the units in get_radius are right, I think the units in compute_mags are not (they are fine for colors, but someone needs to revisit them for them to combine with get_radius to give the correct absolute magnitude).

@ajwheeler ajwheeler mentioned this pull request Dec 2, 2024
@andrew-saydjari
Copy link
Collaborator Author

@schlafly

@schlafly
Copy link

schlafly commented Dec 16, 2024

That's pleasantly good agreement for the g-r colors of blue-ish stars. Here's the relevant comparison from Schlafly+2011 (sorry, old!). There colors start to run away at the ~0.1 mag level in g-r at about 4500 K, but are pretty good (~0.01 mag?) for warmer temperatures. I think I read this agreement to be a little worse than that.
https://iopscience.iop.org/article/10.1088/0004-637X/737/2/103#apj398709f2

@andrew-saydjari
Copy link
Collaborator Author

@schlafly Thanks for pointing to that figure. I am not exactly sure that I think the plot in this PR looks "a little worse." But it isn't really apples-apples I guess.

One comment is that in your paper, you are comparing observed-MARCS_predicted and here I am plotting MARCS-Korg. So I would expect observed - Korg to be roughly (observed-MARCS) + (MARCS-Korg).

It seems to me like for the 4500-4000K region, (observed-MARCS) = -0.1 and (MARCS-Korg)= 0.1 for approximately solar metallicity. That is very rough, but just to say that the signs seem to work out in a compensating way, such that the deviation of MARCS and Korg could be a good thing. This might mean I should grab some real, unredened photometry and try to make these plots.

@schlafly
Copy link

Yes. It's hard for me to estimate from the colors of the points; happy to go with your eyeballs rather than mine. It's also worth adding that for the comparisons with observed data one relies on the calibration of the spectroscopic parameters; for this kind of analysis, it was never clear to me to what extent the residuals in the photometry were driven by imperfect synthetic spectra vs imperfect stellar parameters.

@ajwheeler
Copy link
Owner

Noting that I intend to return to this when I have an easy story for a built-in realistic optical linelist and that I am following the discussion.

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.

3 participants