tsadar.utils.data_handling.calibration#

Functions

get_calibrations(shotNum, tstype, t0, CCDsize)

Contains and loads the appropriate instrument calibrations based off the shot number and type of Thomson scattering performed.

get_scattering_angles(config)

Loads and returns a scattering angle dictionary based off the input deck.

sa_lookup(beam)

Creates the scattering angle dictionary with the scattering angles and their weights based of the chosen probe beam.

tsadar.utils.data_handling.calibration.sa_lookup(beam)Source#

Creates the scattering angle dictionary with the scattering angles and their weights based of the chosen probe beam. All values are precalculated. Available options are P9, B12, B15, B23, B26, B35, B42, B46, B58.

Parameters:

beam – string with the name of the beam to be used as a probe

Returns:

sa – dictionary with scattering angles in the ‘sa’ field and their relative weights in the ‘weights’ field

tsadar.utils.data_handling.calibration.get_calibrations(shotNum, tstype, t0, CCDsize)Source#

Contains and loads the appropriate instrument calibrations based off the shot number and type of Thomson scattering performed. The calibrations loaded are the spectral dispersion, offset for the spectral axis, spectral instrument response functions (as the 1 standard deviation value), and a scale for the x-axis. In the case of temporal data this scale is the time per pixel. In the case of Imaging data the scale is a magnification and there is also an offset based off the TCC location. The calibrated axes are return as well as calibration values that will be needed later.

For non-OMEGA data this function will have to be reworked.

Parameters:
  • shotNum – OMEGA shot number

  • tstype – string with the ype of data, ‘temporal’, ‘imaging’, or ‘angular’

  • CCDsize – list with the CCD size in pixels, for OMEGA data this is [1024, 1024]

Returns: return axisxE, axisxI, axisyE, axisyI, magE, stddev

axisxE: Calibrated x-axis for electron data [time (ps), space(um), or scattering angle(degree)] axisxI: Calibrated x-axis for ion data [time (ps), space(um), or scattering angle(degree)] axisyE: Calibrated spectral/y-axis for electron data in nm axisyI: Calibrated spectral/y-axis for ion data in nm magE: scale for the x-axis (ps/px or um/px) stddev: dictionary with fields ‘spect_stddev_ion’ and ‘spect_stddev_ele’ containing the standard deviation (width) of the ion an electron spectral instrument response function respectively. In the case of angular data the fields ‘spect_FWHM_ele’ and ‘ang_FWHM_ele’ may be present containing the spectral and angular instrumental width in full-width-half-max.

tsadar.utils.data_handling.calibration.get_scattering_angles(config: Dict) DictSource#

Loads and returns a scattering angle dictionary based off the input deck. The scattering angle dictionary has 2 fields ‘sa’ and ‘weights’. The field ‘sa’ is an array of the scattering angles present based off the geometry specified in the input deck. Multiple scattering angles are present due to the finite size of the apertures. The field ‘weights’ is an array of the same size as ‘sa’ with the relative weights of each scattering angle in the final spectrum.

Known geometries are for OMEGA and more would need to be added for another system.

Parameters:

config – Dictionary built from the input deck

Returns:

sa – Dictionary with scattering angles and weights