exa.core.util.phase_helper.add_conditional_phase_amplitude#
- add_conditional_phase_amplitude(data_array, target_dataset, phase_coord, conditioned_coord, only_positive_cphase=False, prefix='', add_fit=False)#
Uses
get_phase_array()to calculate phase and amplitude, and then calculates conditional phase by comparing phase values for conditioned=True and conditioned=False. Afterwards, adds them both to the dataset.- Parameters:
data_array (DataArray) – array containing the data, one dimension of which is phase
target_dataset (Dataset) – dataset to add the phase and amplitude arrays to
phase_coord (str) – name of the phase coordinate in the data array
conditioned_coord (str) – name of the conditioned coordinate in the data array
only_positive_cphase (bool | None) – if False, cphase in range (-pi, pi]. If True, cphase in range [0, 2pi). False by default.
prefix (str) – name to attach to the phase and amplitude arrays
add_fit (bool) – whether to also add the fit to the dataset
- Returns:
nothing, modifies the target_dataset