bjet_mcmc.blazar_plots module

Program purpose: Code for various plots

Parameters are always listed in the following order: [delta, K, n1, n2, gamma_min, gamma_max, gamma_break, B, R]

All parameters are the logarithm of the true value except for delta, n1, and n2


Parameter

Description

Scale

delta

doppler factor

linear

K

particle density [cm^-3]

log

n1

n_1 (first index)

linear

n2

n_2 (second index)

linear

gamma_min

low-energy cutoff

log

gamma_max

high-energy cutoff

log

gamma_break

energy break

log

B

magnetic field strength [G]

log

R

blob radius (cm)

log

Note that data (observed) is expected in linear scale and model data is expected in log scale unless log param is set to False.

bjet_mcmc.blazar_plots.N_e_BknPowLaw(gamma, K, n_1, n_2, gamma_break)

Calculate the effective number of galaxies, N_e, per bin for a broken power law luminosity function.

Parameters:
  • gamma (float) – The value of gamma parameter.

  • K (float) – The value of K parameter.

  • n_1 (float) – The value of n_1 parameter.

  • n_2 (float) – The value of n_2 parameter.

  • gamma_break (float) – The value of gamma_break parameter.

Returns:

The calculated value of N_e using the broken power law formula.

Return type:

float

bjet_mcmc.blazar_plots.cooling_time_Thomson(gamma, U_B, U_syn, U_blr)

Calculates the cooling time for a given particle energy using the Thomson scattering process. (see e.g. [Inoue])

param gamma:

The Lorentz factor of the particle.

type gamma:

float

param U_B:

The energy density of the magnetic field.

type U_B:

float

param U_syn:

The energy density of the synchrotron radiation.

type U_syn:

float

param U_blr:

The energy density of the broad-line region.

type U_blr:

float

return:

The cooling time of the particle according to Thomson scattering.

rtype:

float

[Inoue]

Inoue & Takahara 1996

bjet_mcmc.blazar_plots.corner_plot(values, param_min_vals, param_max_vals, best_params, sigma_below_params, sigma_above_params, title=None, no_title=False, param_names=None, file_name='local_results/corner.svg', save=False, show=True, dpi=300, eic=False, fixed_params=None)

This function generates a corner plot for given values and parameters.

After function call:

mpl plot is shown, if save is true, plot is saved to a file

Parameters:
  • values (numpy.ndarray) – The values to plot on the corner plot. 2D np array of arrays w/ NUM_DIM columns. Flat samples–a list of sets of parameters

  • param_min_vals (list) – The minimum values for each parameter. Array of NUM_DIM floats.

  • param_max_vals (list) – The maximum values for each parameter. Array of NUM_DIM floats.

  • best_params (list) – Parameter values for the model with the best chi squared value. Array of NUM_DIM floats.

  • sigma_below_params (list) – Value for cutoff of lowest param value within 1 sigma for each param.Array of NUM_DIM floats.

  • sigma_above_params (list) – Value for cutoff of highest param value within 1 sigma for each param. Array of NUM_DIM floats.

  • title (str) – The title of the corner plot. (optional)

  • no_title (bool) – If True, the corner plot will not have a title. (optional)

  • param_names (list) – Names of the parameters (param_names for the plot). These should be formatted params for math text. Default is None; then they will be set to FORMATTED_PARAM_NAMES.

  • file_name (str) – Relative path to where the image should be saved; default is “corner.<image_type>”

  • save (bool) – If True, the plot will be saved. (optional, default: False)

  • show (bool) – If True, the plot will be displayed. (optional, default: True)

  • dpi (int) – The DPI (dots per inch) for saving the plot. (optional, default: 300)

  • eic (bool) – If True, the plot will be generated for EIC data. (optional, default: False)

  • fixed_params (dict) – The fixed parameters. (optional)

Returns:

The generated corner plot figure.

Return type:

matplotlib.figure.Figure

bjet_mcmc.blazar_plots.get_min_max_per_point(v_vals, model_params_list, name_stem=None, theta=None, redshift=None, min_freq=None, max_freq=None, torus_temp=None, torus_luminosity=None, torus_frac=None, data_folder=None, executable=None, command_params_full=None, command_params_1=None, command_params_2=None, verbose=False, eic=False, fixed_params=None)
Parameters:
  • v_vals (numpy.ndarray) – The array of values at which to calculate the minimum and maximum.

  • model_params_list (List[numpy.ndarray]) – The list of model parameter arrays from which to calculate the minimum and maximum.

  • name_stem (str) – The prefix for the name of the output files (optional).

  • theta (float) – The viewing angle of the model (optional).

  • redshift (float) – The redshift of the source (optional).

  • min_freq (float) – The minimum frequency of the SED (optional).

  • max_freq (float) – The maximum frequency of the SED (optional).

  • torus_temp (float) – The temperature of the torus (optional).

  • torus_luminosity (float) – The luminosity of the torus (optional).

  • torus_frac (float) – The fraction of the disk luminosity contributed by the torus (optional).

  • data_folder (str) – The folder where the input and output files are stored (optional).

  • executable (str) – The path to the executable for the model calculation (optional).

  • command_params_full (str) – The command-line parameters for the full model calculation (optional).

  • command_params_1 (str) – The command-line parameters for the first stage model calculation (optional).

  • command_params_2 (str) – The command-line parameters for the second stage model calculation (optional).

  • verbose (bool) – Whether to display verbose output (default is False).

  • eic (bool) – Whether to enable emission-inverse Compton (EIC) calculations (default is False).

  • fixed_params (List[float]) – The array of fixed model parameters to be inserted into the model calculations (optional).

Returns:

The arrays of minimum and maximum values per point calculated from the given model parameter arrays.

Return type:

Tuple[numpy.ndarray, numpy.ndarray]

bjet_mcmc.blazar_plots.get_params_1sigma_ranges(flat_samples, indices_within_1sigma, eic=False, fixed_params=None)

Returns the minimum and maximum parameter values within the specified range.

Finds the array of parameters that has the minimum and maximum value for each of the parameters.

For example, with samples [[0, 1, 2], [5, 2, 1], [4, 6, 1], [3, 2, 0]], the minima would be [[0, 1, 2], [0, 1, 2], [3, 2, 0]] and the maxima would be [[5, 2, 1], [4, 6, 1], [0, 1, 2]]

Parameters:
  • flat_samples (numpy.ndarray) – A numpy array of flattened parameter samples.

  • indices_within_1sigma (list) – A list of indices representing samples within the desired range.

  • eic (bool) – A boolean value indicating whether the model properties should be adjusted for electron-ion collisions. Default is False.

  • fixed_params (dict) – A dictionary of fixed parameters. Default is None.

Returns:

A tuple containing the minimum and maximum parameter values within the specified range.

Return type:

tuple

bjet_mcmc.blazar_plots.plot_1sigma(v_data, vFv_data, err_data, indices_within_1sigma, flat_samples, min_chi_squared_index, both=False, extreme=True, title=None, no_title=False, folder=None, file=None, save=False, show=True, serialize=False, lower_adjust_multiplier=None, upper_adjust_multiplier=1.02, max_num_lines_to_graph=1000, dims=None, eic=False, theta=None, redshift=None, min_freq=None, max_freq=None, executable=None, data_folder=None, name_stem=None, command_params_full=None, command_params_1=None, command_params_2=None, torus_temp=None, torus_luminosity=None, torus_frac=None, verbose=False)

Plot the range from models within 1 sigma along with the best model and the data.

Note

  • The parameters within 1 sigma that have the biggest and smallest values for each parameter are found, resulting in 2 arrays of dimension NUM_DIM * NUM_DIM.

  • Models are created from these, and for each frequency value, the minimum and the maximum are found.

  • The graph is made by filling in the space between the minimum and maximum for each frequency value.

  • The best model and the actual data with error bars are plotted on top of this.

Parameters:
  • v_data – The observed values of the frequency.

  • vFv_data – The observed values of the nuFnu.

  • err_data – The error values of the data.

  • indices_within_1sigma – The indices of the samples within 1 sigma.

  • flat_samples – The flat samples obtained from the MCMC algorithm.

  • min_chi_squared_index – The index of the model with minimum chi-squared value.

  • both (bool, optional) – Boolean value indicating whether both extreme and random models should be plotted. Default is False.

  • extreme (bool, optional) – Boolean value indicating whether extreme models should be plotted. Default is True.

  • title (str, optional) – The title of the plot.

  • no_title (bool, optional) – If True, do not display a title on the plot.

  • folder (str, optional) – The folder in which to save the plot.

  • file (str, optional) – The name of the file to save the plot as.

  • save (bool, optional) – If True, save the plot to a file.

  • show (bool, optional) – If True, display the plot.

  • serialize (bool, optional) – Boolean value indicating whether to serialize the plot using pickle. Default is False.

  • lower_adjust_multiplier (float, optional) – The lower adjustment multiplier for scaling the y-axis. If None, the minimum y-value of the observed dependent variable will be used.

  • upper_adjust_multiplier (float, optional) – The upper adjustment multiplier for scaling the y-axis. Default is 1.02.

  • max_num_lines_to_graph (int, optional) – The maximum number of lines to graph for random models. Default is 1000.

  • dims (int, optional) – The number of dimensions in the model.

  • eic (bool, optional) – If True, include the EIC parameter.

  • theta (float, optional) – The theta parameter for the model.

  • redshift (float, optional) – The redshift parameter for the model.

  • min_freq (float, optional) – The minimum frequency for the model.

  • max_freq (float, optional) – The maximum frequency for the model.

  • executable (str, optional) – The path to the executable for the model.

  • data_folder (str, optional) – The path to the folder containing the data.

  • name_stem (str, optional) – The stem of the name of the plot files.

  • command_params_full (str, optional) – The command parameters for the model.

  • command_params_1 (str, optional) – The first set of command parameters for the model.

  • command_params_2 (str, optional) – The second set of command parameters for the model.

  • torus_temp (float, optional) – The torus temperature parameter for the model.

  • torus_luminosity (float, optional) – The torus luminosity parameter for the model.

  • torus_frac (float, optional) – The torus fraction parameter for the model.

  • verbose (bool, optional) – If True, display verbose output.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_1sigma_plots(v_data, vFv_data, err_data, indices_within_1sigma, flat_samples, min_chi_squared_index, both=False, extreme=True, title=None, no_title=False, folder=None, file=None, save=False, show=True, serialize=False, lower_adjust_multiplier=None, upper_adjust_multiplier=1.02, max_num_lines_to_graph=1000, dims=None, eic=False, return_models=False, theta=None, redshift=None, min_freq=None, max_freq=None, executable=None, data_folder=None, command_params_full=None, command_params_1=None, command_params_2=None, name_stem=None, torus_temp=None, torus_luminosity=None, torus_frac=None, verbose=False)

Note

  • The parameters within 1 sigma that have the biggest and smallest values for each parameter are found, resulting in 2 arrays of dimension NUM_DIM * NUM_DIM.

  • Models are created from these, and for each frequency value, the minimum and the maximum are found.

  • The graph is made by filling in the space between the minimum and maximum for each frequency value.

  • The best model and the actual data with error bars are plotted on top of this.

Parameters:
  • v_data (numpy.ndarray) – The observed values for frequency (ν) data.

  • vFv_data (numpy.ndarray) – The observed values for νFν data.

  • err_data (numpy.ndarray) – The error values for νFν data.

  • indices_within_1sigma (numpy.ndarray) – The indices of the samples within 1 sigma.

  • flat_samples (numpy.ndarray) – The flattened MCMC samples.

  • min_chi_squared_index (int) – The index of the minimum chi-squared value.

  • both (bool) – Whether to plot both sets of models (within 1 sigma and extreme). Default is False.

  • extreme (bool) – Whether to plot extreme models within 1 sigma. Default is True.

  • title (str) – The title of the plot. Default is None.

  • no_title (bool) – Whether to display a title on the plot. Default is False.

  • folder (str) – The folder to save the plot in. Default is None.

  • file (str) – The filename to save the plot as. Default is None.

  • save (bool) – Whether to save the plot. Default is False.

  • show (bool) – Whether to display the plot. Default is True.

  • serialize (bool) – Whether to serialize the plot as a pickle file. Default is False.

  • lower_adjust_multiplier (float) – The lower adjustment multiplier for scaling the y-axis. Default is None.

  • upper_adjust_multiplier (float) – The upper adjustment multiplier for scaling the y-axis. Default is 1.02.

  • max_num_lines_to_graph (int) – The maximum number of lines to plot. Default is 1000.

  • dims (int) – The dimensions of the model. Default is None.

  • eic (bool) – Whether to use Extended Isothermal Cone (EIC) model. Default is False.

  • return_models (bool) – Whether to return the generated models. Default is False.

  • theta (float) – The theta value for the model. Default is None.

  • redshift (float) – The redshift value for the model. Default is None.

  • min_freq (float) – The minimum frequency value for the model. Default is None.

  • max_freq (float) – The maximum frequency value for the model. Default is None.

  • executable (str) – The path to the executable file. Default is None.

  • data_folder (str) – The path to the data folder. Default is None.

  • command_params_full (str) – The full command parameters. Default is None.

  • command_params_1 (str) – The first command parameters. Default is None.

  • command_params_2 (str) – The second command parameters. Default is None.

  • name_stem (str) – The name stem for the plots. Default is None.

  • torus_temp (float) – The temperature of the torus. Default is None.

  • torus_luminosity (float) – The luminosity of the torus. Default is None.

  • torus_frac (float) – The fractional size of the torus. Default is None.

  • verbose (bool) – Whether to display verbose output. Default is False.

Returns:

The generated models, if return_models is True.

Return type:

list

bjet_mcmc.blazar_plots.plot_chain(chain, param_names=None, file_name='chain.svg', save=False, show=True, eic=False)

Plot the given chain data.

Parameters:
  • chain (numpy.ndarray) – The chain of samples to plot, usually a 3-dimensional array.

  • param_names (list, optional) – List of parameter names corresponding to the dimensions of the chain. Default is None.

  • file_name (str, optional) – The name of the file to save the plot as. Default is “chain.svg”.

  • save (bool, optional) – Whether to save the plot to a file. Default is False.

  • show (bool, optional) – Whether to display the plot. Default is True.

  • eic (bool, optional) – Whether the chain contains EIC data. Default is False.

Returns:

None

bjet_mcmc.blazar_plots.plot_chi_squared(values, discard_number, use_log_probs=True, plot_type='med', title=None, no_title=False, fmt='', file_name='med_chi_squared_plot.svg', save=False, show=True, clear_plot=True)

This function plots the chi-squared values against the step number. It provides options for customizing the plot type, title, format, file name, saving the plot, showing the plot, and clearing the plot.

Parameters:
  • values (numpy.ndarray) – An array of chi-squared values.

  • discard_number (int) – The number of initial steps to discard.

  • use_log_probs (bool) – Whether to use log probabilities for calculating chi-squared values. Default is True.

  • plot_type (str) – The type of plot to generate. Must be one of “med”, “best”, or “all”. Default is ‘med’.

  • title (str) – The title of the plot. If not provided, a default title will be used depending on the plot_type.

  • no_title (bool) – Determines whether to show the title on the plot. Default is False.

  • fmt (str) – The format string for the plot. Default is an empty string.

  • file_name (str) – The name of the file to save the plot. Default is ‘med_chi_squared_plot.<image_type>’, where <image_type> is the file format specified in the code.

  • save (bool) – Determines whether to save the plot. Default is False.

  • show (bool) – Determines whether to show the plot. Default is True.

  • clear_plot (bool) – Determines whether to clear the plot before generating a new one. Default is True.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_cooling_times(logfile, best_params, fixed_params, file_name='local_results/cooling_times.svg', save=False, show=True, eic=False, redshift=None)

Plots the observed cooling times in the Thomson limit.

Parameters:
  • logfile (str) – The path to the log file.

  • best_params (list) – A list of best fit parameters.

  • fixed_params (list) – A list of fixed parameters.

  • file_name (str) – The name of the output file.

  • save (bool) – Whether to save the plot as an SVG file.

  • show (bool) – Whether to display the plot.

  • eic (bool) – Whether to grep the energy density from bjet.log.

  • redshift (float or None) – The redshift value.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_data(data_file, title=None, no_title=False, adjust_scale=True, lower_adjust_multiplier=None, upper_adjust_multiplier=None, file_name='local_results/data.svg', clear_plot=True, save=False, show=True)

Plots data from a given file.

After function call:

If show is true, the plot is shown. If save is true, the plot is saved as file.

Parameters:
  • data_file (str) – Path to the data file.

  • title (str, optional) – Title of the plot. Default is None.

  • no_title (bool, optional) – Whether to include a title in the plot. Default is False.

  • adjust_scale (bool, optional) – Whether to adjust the y-axis scale of the plot. Default is True.

  • lower_adjust_multiplier (float, optional) – Lower multiplier for adjusting the y-axis scale. Default is None.

  • upper_adjust_multiplier (float, optional) – Upper multiplier for adjusting the y-axis scale. Default is None.

  • file_name (str, optional) – Name of the output file to save the plot. Default is “<RESULTS_FOLDER>/<data>.<IMAGE_TYPE>”.

  • clear_plot (bool, optional) – Whether to clear the current plot before plotting. Default is True.

  • save (bool, optional) – Whether to save the plot as an image file. Default is False.

  • show (bool, optional) – Whether to display the plot. Default is True.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_likelihood_profiles(flat_samples, flat_log_probs, best_params, min_1sigma_params, max_1sigma_params, save=False, show=True, fixed_params=None, eic=False, folder_path='/home/docs/checkouts/readthedocs.org/user_builds/bjet-mcmc/checkouts/latest//local_results')
Parameters:
  • flat_samples (array-like) – The flattened samples of the parameters obtained from the MCMC sampling.

  • flat_log_probs (array-like) – The flattened log-probability values corresponding to the samples.

  • best_params (array-like) – The best-fit parameter values obtained from the MCMC sampling.

  • min_1sigma_params (array-like) – The parameter values at the lower 1-sigma confidence interval obtained from the MCMC sampling.

  • max_1sigma_params (array-like) – The parameter values at the upper 1-sigma confidence interval obtained from the MCMC sampling.

  • save (bool, optional) – Flag indicating whether to save the plotted likelihood profiles. Default is False.

  • show (bool, optional) – Flag indicating whether to display the plotted likelihood profiles. Default is True.

  • fixed_params (dict, optional) – The fixed parameter values that are not varied during the MCMC sampling. Default is None.

  • eic (bool, optional) – Flag indicating whether the model is an EIC model. Default is False.

  • folder_path (str, optional) – The path to the folder where the plot will be saved. Default is BASE_PATH + RESULTS_FOLDER.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_model(model, title=None, no_title=False, line=True, points=True, point_style='.', line_style='-', line_alpha=1.0, file_name='local_results/model.svg', clear_plot=True, save=False, show=True, log=True)

Plot Model

Parameters:
  • model (tuple) – The model data to plot. The first two elements are 1D numpy arrays of floats. Only the first 2 elements are used. results[0] should be logv values and results[1] logvFv values.

  • title (str) – Optional title for the plot.

  • no_title (bool) – If True, no title will be displayed on the plot.

  • line (bool) – If True, a line plot will be created.

  • points (bool) – If True, scatter points will be plotted.

  • point_style (str) – Marker style for the scatter points.

  • line_style (str) – Line style for the line plot.

  • line_alpha (float) – Alpha value for the line plot.

  • file_name (str) – File name to save the plot.

  • clear_plot (bool) – If True, clears the existing plot before creating a new one.

  • save (bool) – If True, saves the plot to a file.

  • show (bool) – If True, displays the plot.

  • log (bool) – If True, applies logarithmic scaling to the model data before plotting.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_model_and_data(model, data_file, flat_samples, indices_within_1sigma, redshift, eic, title=None, no_title=False, adjust_scale=True, lower_adjust_multiplier=None, upper_adjust_multiplier=None, file_name='local_results/model_and_data.svg', save=False, show=True, log=True, fixed_params=None, verbose=False)

Create a plot with data and model data

After function call:

If show is true, the plot is shown. If save is true, the plot is saved as file.

Parameters:
  • model (Any) – The data for the model; only the first 2 elems are used, which are logv and logvFv

  • data_file (str) – The data file to plot.

  • flat_samples (Any) – The flat samples.

  • indices_within_1sigma (Any) – The indices within 1 sigma.

  • redshift (Any) – The redshift value.

  • eic (Any) – The eic value.

  • title (str, default=None) – The title of the plot. (optional)

  • no_title (bool, default=False) – Whether to exclude the title from the plot. (optional)

  • adjust_scale (bool, default=True) – Whether to adjust the scale of the plot. True = the plot should use the scale of the data. False = scaled to the model. (optional)

  • lower_adjust_multiplier (Any, default=1.1) – How far below the data the plot should be scaled. (optional)

  • upper_adjust_multiplier (Any, default=1.1) – How far above the data the plot should be scaled. (optional)

  • file_name (str, default=RESULTS_FOLDER + "/model_and_data." + image_type) – Relative path to where the image should be saved. (optional)

  • save (bool, default=False) – Whether to save the plot to a file. (optional)

  • show (bool, default=True) – Whether to show the plot. (optional)

  • log (bool, default=True) – Whether to use a logarithmic scale on the plot. (optional)

  • fixed_params (Any, default=None) – The fixed parameters. (optional)

  • verbose (bool, default=False) – Whether to display verbose output. (optional)

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.plot_particle_spectrum(best_params, min_1sigma_params, max_1sigma_params, fixed_params, file_name='/home/docs/checkouts/readthedocs.org/user_builds/bjet-mcmc/checkouts/latest//local_results/particle_spectrum.svg', save=False, show=True)

Plot the broken power-law particle spectrum with 1sigma contour based on Bjet_MCMC outputs

Array of best parameters found by the MCMC fit. For simple SSC without fixed parameters, the order is: [delta, K, n_1, n_2, gamma_min, gamma_max, gamma_break, B, R] Additional description:

Parameter

Description

Scale

delta

Doppler factor

Linear

K

Particle density [cm^-3]

Log

n1

alpha_1 (first index)

Linear

n2

alpha_2 (second index)

Linear

gamma_min

Low-energy cutoff

Log

gamma_max

High-energy cutoff

Log

gamma_break

Energy break

Log

B

Magnetic field strength [G]

Log

R

Blob radius [cm]

Log

Additional params for EIC

Parameter

Description

Scale

bb_temp

Black body temp of disk [K]

Log

l_nuc

Nucleus luminosity [ergs/s]

Log

tau

Fraction of luminosity scattered

Log

blob_dist

Distance of blob [cm]

Log

Note the errors of gamma_min and gamma_max are not included in the contour

Parameters:
  • best_params (numpy array (shape: (6,))) – The best-fit parameters for the particle spectrum.

  • min_1sigma_params (numpy array (shape: (6,))) – Array of 1 sigma lower boundary of free parameters found by the MCMC fit. The order should match the one of best_params

  • max_1sigma_params (numpy array (shape: (6,))) – Array of 1 sigma upper boundary of free parameters found by the MCMC fit. The order should match the one of best_params

  • fixed_params (numpy array (shape: (9,))) – List of user-fixed parameters. If no fixed parameters in simple SSC model: fixed_params = [-inf, -inf, -inf, -inf, -inf, -inf, -inf, -inf, -inf]

  • file_name (str) – Absolute path and name for the saved plot.The default is BASE_PATH + RESULTS_FOLDER + “/particle_spectrum.svg”.

  • save (bool) – Flag to save the plot of the particle spectrum. Default is False.

  • show (bool) – Flag to show the plot of the particle spectrum. Default is True.

Returns:

None

Return type:

None

This function plots the particle spectrum based on the given best-fit parameters, lower and upper bounds of the 1-sigma confidence interval, and fixed parameters. The plot is saved as an SVG file if the “save” flag is set to True. The plot is also displayed if the “show” flag is set to True.

bjet_mcmc.blazar_plots.residual_plot(data, best_model, lowest_per_point, highest_per_point)

This function generates a residual plot for given data and model parameters.

Parameters:
  • data (tuple or list) – The data used for generating the residual plot.

  • best_model (tuple or list) – The best-fit model used for generating the plot.

  • lowest_per_point (tuple or list) – The lower error bound for each data point.

  • highest_per_point (tuple or list) – The upper error bound for each data point.

Returns:

None

Return type:

None

bjet_mcmc.blazar_plots.scale_to_values(values, upper_adjust_multiplier=None, lower_adjust_multiplier=None)

Scales the given values to new minimum and maximum values based on the upper and lower adjust multipliers.

Parameters:
  • values (list, numpy.ndarray) – The input values to be scaled.

  • upper_adjust_multiplier (int or float) – Optional. The multiplier to adjust the upper range. If not provided, the default value is 5.

  • lower_adjust_multiplier (int or float) – Optional. The multiplier to adjust the lower range. If not provided, the default value is 5.

Returns:

The scaled minimum and maximum values.

Return type:

tuple