atomcloud.analysis.rescale_params module
- atomcloud.analysis.rescale_params.rescale_1d_params(params, z_indices, x_indices, xscale, zscale)[source]
Rescale fit parameters in a 1d function
- Parameters:
params (list[float]) – list of function parameters
zinds – list of indices which are scaled by zscale
xinds – list of indices which are scaled by xscale
xscale (float) – scale to rescale x parameters by
zscale (float) – scale to rescale z parameters by
z_indices (list[int]) –
x_indices (list[int]) –
- Returns:
list of rescaled parameters
- Return type:
list[float]
- atomcloud.analysis.rescale_params.rescale_2d_params(params, indices, scales, theta_indices=None)[source]
Rescale fit parameters in a 2d function. Must scale along x, y and z additionally some parameters may not lie along the x or y axis and so need to be rescaled differently.
- Parameters:
params (list[float]) – list of function parameters
indices (list[list]) – list of lists of indices which are scaled by the corresponding scale in scales
scales (list) – list of scales to rescale parameters by
theta_indices (list | None) – list of index of the angle parameter corresponding to
tuple (each mixed axis) –
- Returns:
list of rescaled parameters
- Return type:
list[float]
- atomcloud.analysis.rescale_params.rescale_mixed_axis(params, mixed_inds, xscale, yscale, theta_indices=None)[source]
This rescales the major and minor axes which is not super simple if the x and y scale are different. However, is xscale and yscale are the same (i.e. pixel is square) then it’s pretty straight forward.
- Parameters:
params (list) – list of parameters
mixed_inds (list[tuple[int, int]]) – list of tuples of indices which are mixed axes
xscale (float) – scale to rescale x axis by
yscale (float) – scale to rescale y axis by
theta_indices (list[int] | None) – list of index of the angle parameter corresponding to each tuple
- Return type:
list[float]
Returns:
- atomcloud.analysis.rescale_params.rescale_parameters(params, indices, scale)[source]
Rescale the parameters in params at the indices by the scale.
- Parameters:
params (list[float]) – list of function parameters
indices (list[int]) – list of indices which are scaled by scale
scale (float) – scale to rescale parameters by
- Returns:
list of rescaled parameters
- Return type:
list[float]