Skip to content

Assigning a prefix to a model after it is declared changes the values of its parameters #773

Answered by reneeotten
jrr-us asked this question in Q&A
Discussion options

You must be logged in to vote

@jrr-us I don't think the way you use set_param_hint is really what you're supposed to do. That is, the set_param_hint belongs to the model and is intended to set, for example, parameter bounds for a certain model to make sure that it physically makes sense (e.g., the linewidth should be positive) and they will be used when doing make_params(). Since you're using one of the built-in models where we already set-up the parameter_hints correctly (i.e., for PseudoVoigModel we set hints for sigma and gama) so there is no reason to call this method again yourself.

It is not intended to set initial parameters and in my opinion you shouldn't use it like that. If you want to set initial parameters…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jrr-us
Comment options

@reneeotten
Comment options

Answer selected by jrr-us
Comment options

You must be logged in to vote
1 reply
@jrr-us
Comment options

Comment options

You must be logged in to vote
1 reply
@jrr-us
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants