Calibration (‘stixpy.calibration’)#

The calibration submodule contains functions for calibrating STIX data.

stixpy.calibration Package#

stixpy.calibration.compression Module#

STIX integer compression is a quasi-exponential 1 byte compression of integer data, both positive or negative depending on the parameterization. For the decompression it returns the mid-point value of the possible compressed values that could have given the input.

The compression algorithm is applied to an integer value, V, to yield a compressed value, C, as follows:

  1. If V < 0, set s=1 and set V = -V

  2. If V < 2^(M+1), set C = V and skip to step 6

  3. If V >= 2^(M+1), shift V right until 1s (if any) appear only in LS M+1 bits

  4. Exponent, e = number of shifts+ 1

  5. Mantissa, m = LS M bits of the shifted value.

  6. Set C = m + 2^M * e

  7. If S=1, set msb of C = s

The algorithm family has the following properties:

  • The compressed value is exact for input absolute values up to 2^(M+1)

  • RMS fractional error is in range: 1./(sqrt(12)*2^M) to 1/(sqrt(1/12)*s^(M+1))

  • The maximum absolute value that can be compressed is given by: 2^(2^K-2) x (2^(M+1)-1) The number of bits required to hold the compressed value is S+K+M

References

STIX-TN-0117-FHNW

Functions#

compress(values, *, s, k, m)

Compress values according to parameters.

decompress(values, *, s, k, m[, return_variance])

Compress values according to parameters.

Classes#

CompressionRangeError

Exception raised due to invalid range in the input or output.

CompressionSchemeParameterError

Exception raised for invalid compression scheme parameters.

NonIntegerCompressionError

Exception raised when the input to the compression algorithm is not an integer.

Class Inheritance Diagram#

Inheritance diagram of stixpy.calibration.compression.CompressionRangeError, stixpy.calibration.compression.CompressionSchemeParameterError, stixpy.calibration.compression.NonIntegerCompressionError

stixpy.calibration.detector Module#

Functions#

get_srm()

Return the spectromber response matrix (SRM) by combing the attenuation with the detetor respoonse matrix (DRM)

get_pixel_srm()

get_sci_channels(date)

Get the science energy channels for given date.

stixpy.calibration.energy Module#

Functions#

get_elut(date)

Get the energy lookup table (ELUT) for the given date

correct_counts(product[, method])

Correct count for individual pixel energy calibration

stixpy.calibration.grid Module#

Grid Calibration

Functions#

get_grid_transmission(flare_location)

Return the grid transmission for the 32 sub-collimators corrected for internal shadowing.

_calculate_grid_transmission(grid_params, ...)

Calculate grid transmission accounting for internal shadowing.

stixpy.calibration.livetime Module#

One overriding requirement for STIX is that the incoming photon rate can be determined with high accuracy from the measured count rate. As such the dead time or equivalently the live time must be accurately determined from the trigger rates. The live time fraction is defined as the ratio of the event trigger rate to the photon rate \(R_{trigger}/R_{photon}\). The dead time is primarily controlled by two timescales the readout time \(\tau\) and latency \(\eta\).

These timescales correspond to two distinct contributions to the effective live time of a group of ASICs. First, photons arriving during the read-out sequence of a previously triggered ASIC of that group will not be registered as the trigger circuit is inactive during the readout. Second, of those events that did trigger, a certain fraction will suffer from multiple hits and will be discarded, if one or more additional triggers occur during the latency time before the read-out. The live time fraction the ratio of the event rate to the photon rate is thus given by

\[ \begin{align}\begin{aligned}R_{photon} = \frac{R_{trigger}}{1 - R_{trigger}(\tau+\eta)}\\\text{lifetime fraction} = \frac{e^{-\eta R_{photon}}}{ 1 + R_{photon}(\tau+\eta)}\end{aligned}\end{align} \]

where \(R_{trigger}\) is the observed trigger rate and \(R_{photon}\) is the derived incident photon rate.

The plot below shows the behaviour of the trigger rate taking these effects into account.

(Source code, png, hires.png, pdf)

../_images/calibration-1.png

References

STIX-TN-0015-ETH_I1R0_Caliste_Rates

Functions#

pileup_correction_factor()

Estimate the fractional area of a single large pixel compared with the rest of the detector group.

get_livetime_fraction(trigger_rate, *[, ...])

Return the live time fraction for the given trigger rate.

stixpy.calibration.transmission Module#

Classes#

Transmission([solarblack])

Calculate the energy dependent transmission of X-ray through the instrument

Class Inheritance Diagram#

Inheritance diagram of stixpy.calibration.transmission.Transmission

stixpy.calibration.visibility Module#

Functions#

get_subcollimator_info()

Return resolutions, orientations, and labels for sub-collimators.

create_meta_pixels(pixel_data, time_range, ...)

Create meta-pixels by summing data with in given time and energy range.

create_visibility(meta_pixels)

Create visibilities from meta-pixels

get_uv_points_data(d_det, Unit] =, d_sep, ...)

Return the STIX (u,v) points coordinates defined in [1], ordered with respect to the detector index.

calibrate_visibility(vis, flare_location)

Calibrate visibility phase and amplitudes.