buzzutil¶
buzz.buzzutil
Functions
|
|
|
Calculate the RMS from the ASD. |
|
|
|
Filters the results in the results list by the param_name value being between the high_low values |
|
|
|
Loads the results from a pickle file |
|
Calculate the RMS noise of a state space model by solving the Lyapunov equation. |
|
Traces noise from an OSEM to a target output. |
|
Saves the results to a pickle file |
Details
- cum_sum_rms(ASD, fq)[source]¶
Calculate the RMS from the ASD.
- Parameters:
ASD (array) – Array of the ASD.
fq (array) – Array of the frequencies.
- Returns:
RMS value.
- Return type:
rms (array)
- filtparam(results, param_name, high_low, compare='between', tol=0.0)[source]¶
Filters the results in the results list by the param_name value being between the high_low values
- Parameters:
results (list) – list of results dictionaries that include the param_name
param_name (str) – name of the parameter to filter by
high_low (list or float or int) – list of two values that are the high and low values to filter, or a single value that should be matched, or if compare is ‘outside’ then the value to be outside of, or if compare is ‘eq’ or ‘equal’ then the value or list of values the parameters need to be equal to.
compare (str, optional) – ‘between’ or ‘outside’ or ‘eq’ or ‘equal’ or ‘neq’ or ‘not equal’. Defaults to ‘between’.
tol (float, optional) – tolerance for the comparison. Defaults to 0.0.
- Returns:
list of the results that are within the high_low values
- Return type:
- lyap_rms_cont(model, model_dict: dict, outputs: list, white_noises: list, pkg: str = 'scipy', balance_gain=False)[source]¶
Calculate the RMS noise of a state space model by solving the Lyapunov equation. Note the model must be continuous.
- Parameters:
model (StateSpace) – The model to calculate the RMS noise of.
model_dict (dict) – The input and output dictionary of the model.
outputs (list | np.array) – list of outputs to calculate the RMS noise to.
white_noises (list | np.array) – list of white noise inputs.
pkg (str, optional) – The package to use to solve the Lyapunov equation. Defaults to ‘scipy’.
balance_gain (bool, optional) – Whether the system should be reduced using the controlUtil.balance_sys_gain function. Defaults to False.
- Returns:
dictionary of RMS noise values. the keys of this dictionary are the outputs and the values are the RMS noise values.
- Return type:
- output_noises(model, model_dict, target_outputs, F_Hz, white_noises, in_noises=None)[source]¶
Traces noise from an OSEM to a target output.
- Parameters:
model (control.ss) – The model of the system to trace noise in.
model_dict (dict) – The dictionary of the model.
target_outputs (str) – The name of the output to trace noise to.
F_Hz (frequency_array) – Array of frequencies to trace noise to.
white_noises (dict, optional) – Dictionary of white noise signals to feed noise into.
in_noises (dict, optional) – Dictionary of input noise signals to feed noise into. Defaults to None.
- Returns:
Dictionary of the noise. The Keys are the names of the noises and the values are dictionaries that with two keys: ‘fq’, which is a list of frequencies and ‘asd’, which is a list of the ASD at those frequencies.
- Return type:
noise_dic (dict)