TF parameter limits, fixing and realeasing

I just noticed, that fixing a parameter of TF1/2 sets the limits of parameter to 1,1. Releasing it sets it to 0,0. The original limits set by a user are lost. As this behaviour is not documented (at least I think it is not :slight_smile: ), I wonder if it is a bug or feature. Perhaps original parameter limits could be stored somewhere, and fixing/releasing would not change them?

Another thing is a feature request. Could you implement TF1::FixParameter(Int_t)? I mean the version of fixing parameter that does not require specifing the parameter value and fix to the current parameter value. Implementation, I guess is very simple - just calling FixParameter(parnum, TF1::GetParameter(parnum)). In case of multistage fit where some parameters are just fixed an released this function version would be handy…


it is not a bug and not a feature. It is an internal way to keep track if a parameter is fixed or not. I agree it is not optimal, since the original limits given by the users are lost. The right solution in my opinion is to add an extra boolean flag in TF1 for keeping track if a parameter is fixed or not.
I think also a method like TF1::IsParFixed(int ipar) should be implemented.

I agree also that TF1::FixParameter(int ipar) should be added.
I will try to implement these additions for the next release, 5.27.02

Thank you for your useful feedback
Best Regards


Thanks! Looking forward for implementations.