Skip to content

Commit

Permalink
base modified to include rescale
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhxszo committed Aug 28, 2024
1 parent fc03c47 commit cdfb159
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/cdsaxs/simulations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ def convert_to_dataframe(self, fitparams):
returns:
df (pandas.DataFrame): a DataFrame containing the fitparams in a readable format.
"""

def rescale_fit_params(self, fitparams):
"""
This is a obligatory method that should be implemented by the Geometry class.
The values incoming from the fitter are normalized in the range of -sigma to sigma they need to be rescaled.
so this method's job is to take the arrays of fitparams and rescale them based on the initial guess given by the user.
the formula used should be something like this:
rescaled_fitparams = fitparams * multiplier + initial_guess
multiplier and initial_guess are the values given by the user. if you find that a certain set of multiplier works
better you can hardcode them as well but it is not recommended as it will make the code less flexible.
Parameters:
fitparams (list): an array returned by the fitter that contains the population to be evaluated.
returns:
fitparams (list): an array containing the rescaled fitparams.
...
Expand Down

0 comments on commit cdfb159

Please sign in to comment.