analyzeStreak

fiducia.main.analyzeStreak(channels, responseFrame, knots, detArr, detArrBoundaryCol, detArrVarianceBoundaryCol, detArrInv, stdDetArrInv, measurementFrame, timeStart, timeStop, timeStep, signalsUncertainty=None, yGuess=0, boundary='y0', nPtsIntegral=100, nPtsSpectrum=100)[source]

Given the response function file and the DANTE measurement data file, run cubic spline analysis to reconstruct spectrum for a given time.

Parameters
  • channels (list, numpy.ndarray) – List or array of relevant DANTE channel numbers.

  • responseFrame (pandas.core.frame.DataFrame) – Pandas dataFrame containing response functions for each DANTE channel. See loadResponses().

  • knots (list, numpy.ndarray) – List or array of knot point photon energy value. See knotFind().

  • detArr (xarray.DataArray) – Matrix representing the spectrally integrated folding of the detector response with a cubic spline interpolation of the x-ray spectrum. 2D array of channels and knot points of shape (n, n).

  • detArrBoundaryCol (xarray.DataArray) – Column of cublic spline matrix corresponding to the knots at the boundary chosen with boundary.

  • detArrVarianceBoundaryCol (xarray.DataArray) – Column of variances in the cublic spline matrix corresponding to the knots at the boundary chosen with boundary.

  • detArrInv (xarray.DataArray) – Inversion of detArr, with the column corresponding to boundary removed so detArr is invertible.

  • stdDetArrInv (xarray.DataArray) – Array of the standard deviation of each element in detArrInv based on variance using the responseUncertaintyFrame propagated with Monte Carlo.

  • measurementFrame (pandas.core.frame.DataFrame) – Pandas dataframe containing DANTE measurement data. See loader.readDanteData() and readDanProcessed().

  • timeStart (float) – Start time for producing temporally streaked DANTE spectra (in ns).

  • timeStop (float) – End time for producing temporally streaked DANTE spectra (in ns).

  • timeStep (float) – Time step size for producing temporally streaked DANTE spectra (in ns).

  • signalsUncertainty (numpy.ndarray, optional) – One dimensional array with each element corresponding to the uncertainty each signal. The default is None.

  • yGuess (float, optional) – Guess for position of boundary knot point. Default is 1e-77.

  • boundary (str, optional) – Choose whether yGuess corresponds to \(y_0\) (lowest photon energy) or \(y_{n+1}\) (highest photon energy) boundary condition. This should correspond to the photon energy value given in knots. Options are y0 or yn+1. Default ‘y0’.

  • nPtsIntegral (int, optional) – Number of points used in computing the integral. Default is 100.

  • nPtsSpectrum (int, optional) – Number of points to use in reconstructing the spectrum. Default is 100.

Returns

Return type

times

energies

spectra

spectraVariance

Notes

Examples