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

Export the SFR of a galaxy #168

Closed
Antoine-epfl opened this issue Apr 22, 2020 · 4 comments
Closed

Export the SFR of a galaxy #168

Antoine-epfl opened this issue Apr 22, 2020 · 4 comments
Labels

Comments

@Antoine-epfl
Copy link

Hi
I’m trying to export the SFR of a galaxy using the parametric_sfh template library but I have issues in adding the sfr parameter in the model parameters.
During the minimization, I receive the following error: “ValueError: Method 'lm' doesn't work when the number of residuals is less than the number of variables.”

I can’t find how to solve this issue, do you have any idea?

@bd-j
Copy link
Owner

bd-j commented Apr 22, 2020

Hi, sorry I'm still not sure what you're trying to do. Can you include a code snippet showing how you "add the sfr parameter in the model parameters"?

@Antoine-epfl
Copy link
Author

I want to obtain a SFR estimation of a galaxy. I used the Demo code and tried to adapt it to get the SFR in output, which is not given by the paramtric_sfh model.

Code_snippet

@bd-j
Copy link
Owner

bd-j commented Apr 22, 2020

An "sfr" parameter has no meaning for the non-parametric SFH (or indeed any of the SFHs), just adding it to the model_params will not affect the model in any way. You have to use the non-parametric SFH parameters to compute the SFR. See #166

It's hard to optimize a parameter which has no affect on the model SED, but I suspect the actual issue with Levenberg-Markwardt optimization ('lm') is that you have very few photometric points, and many SFH bins. In this case you could either skip the optimization or reduce the number of bins you use.

@Antoine-epfl
Copy link
Author

Ok thanks a lot! Sorry for the misundertanding, I will take a look at #166.

@bd-j bd-j added the question label Apr 29, 2020
@bd-j bd-j closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants