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

Priors for metallicity-related variables #25

Open
cgarling opened this issue Mar 12, 2024 · 2 comments
Open

Priors for metallicity-related variables #25

cgarling opened this issue Mar 12, 2024 · 2 comments

Comments

@cgarling
Copy link
Owner

For CMDs with significant contamination, fitting age-metallicity relation variables (i.e., with what is now fit_templates_mdf) can result in very unphysical results. Should include some default weak priors to hopefully prevent these errors. These priors would ideally be user-facing via keyword arguments so they could be overwritten if desired. Problem with using any arbitrary user-provided function is that they need to be differentiable for use in the solvers. I suppose we could rely on autodiff, and for analytic differentials I believe there are standard APIs for this (maybe rrule and frule from ChainRulesCore.jl)?

@cgarling
Copy link
Owner Author

Tried adding priors on the MDF parameters to fit_templates_mdf in aeb0730, didn't seem to help convergence. Indicates there may not be a well-defined global maximum likelihood towards which we can converge for this MDF model.

An iterative approach might work better; alternate fixing either the SFH parameters or the MDF parameters and refitting the maximum likelihood until a convergence is achieved. If there is a minimum in the vicinity of the initial guess, this approach may be more robust.

@cgarling
Copy link
Owner Author

It seems like the Gaussian MDF width sigma goes to relatively high values (e.g., 0.3) when freely fit with real data. These fits do not look good. I think it is preferable to fix sigma rather than allow it to be fit in most cases.

Additionally for CMDs with contamination to the red of the RGB, these stars should be removed or the Hess diagram should be masked; otherwise red contamination will result in fits with higher mean metallicities.

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

No branches or pull requests

1 participant