TRXASprefitpack.data_process package#

Module contents#

data_process:

subpackage for data processing

copyright

2021 by pistack (Junho Lee).

license

LGPL3.

TRXASprefitpack.data_process.automate_scaling(A: numpy.ndarray, e_ref_index: int, e: numpy.ndarray, t: numpy.ndarray, escan_time: numpy.ndarray, tscan_energy: numpy.ndarray, time_zeros: numpy.ndarray, escan_data: numpy.ndarray, escan_data_eps: numpy.ndarray, tscan_data: numpy.ndarray, tscan_data_eps: numpy.ndarray, warn: Optional[bool] = False) Dict[str, numpy.ndarray][source]#

automate_scaling: Automate scale escan, tscan

Parameters
  • A – array of parameter A for each escan

  • e_ref – index of reference for which scaling escan and tscan

  • e – array of eneriges in which we measured escan

  • t – array of time delays in which we measured tscan

  • escan_time – array of time delays at which we measured escan

  • tscan_energy – array of energies at which we measured tscan

  • time_zeros – array of time zero for each tscan

  • escan_data – data for escan

  • escan_data_eps – standard error of escan data

  • tscan_data – data for tscan

  • tscan_data_eps – standard error of tscan_data

  • warn – whether or not print warning message

Returns

A dictionary of numpy.ndarray for scaled escan and tscan data

{'escan' : scaled data of escan,
 'escan_eps' : scaled standard error of escan data,
 'tscan' : scaled data of tscan,
 'tscan_eps' : scaled standard error of tscan data
}

Note

  1. escan_data should not contain energy range.

  2. tscan_data should not contain time delay range.

  3. If you set warn=True and escan_time[e_ref_index] < 10 ps then warning message will be printed.

TRXASprefitpack.data_process.corr_a_method(e_ref_index: int, e: numpy.ndarray, t: numpy.ndarray, escan_time: numpy.ndarray, ref_tscan_energy: float, ref_time_zeros: float, escan_data: numpy.ndarray, escan_data_eps: numpy.ndarray, ref_tscan_data: numpy.ndarray, ref_tscan_data_eps: numpy.ndarray) Dict[str, numpy.ndarray][source]#

corr_a_method: Corrects the scaling of escan using one time delay scan

Parameters
  • e_ref – index of reference escab used for A-method

  • e – array of energies in which we measured escan

  • t – array of time delays in which we measured tscan

  • escan_time – array of time delays at which we measured escan

  • ref_tscan_energy – reference energy for repairing scale of escan

  • ref_time_zeros – time zero for reference tscan

  • escan_data – data for escan

  • escan_data_eps – standard error of escan data

  • tscan_data – data for reference tscan

  • tscan_data_eps – standard error of reference tscan

Returns

A dictionary of numpy.ndarray for scale corrected escan data

{'escan': scale corrected data for escan,
 'escan_eps': scale corrected standard error of escan
}

Note

  1. escan_data should not contain energy range

  2. tscan_data should not contain time delay range