Raw Dante Data Processing (fiducia.rawProcess)

Created on Wed Mar 13 16:43:39 2019

Utilities for processing raw DANTE data. Typical steps include:
  • attenuator correction

  • background shot subtraction

  • channel alignment (via e.g. peak finding)

  • temporal axis calibration

@author: Pawel M. Kozlowski

Functions

noScope(hf)

Given a header frame, return a list of channels with no scope.

noXRD(hf)

Given a header frame, return a list of channels with no XRD.

onChannels(hf)

Given a header frame, return a list of which dante channels were on for the shot.

timesScope(hf)

Given a headerFrame, returns a timesFrame containing an array of oscilloscope times for each channel and background shot in the headerFrame.

voltageScale(hf, df)

Scales voltage (vertical) axis of dante signals based on information contained in the header.

bkgCorrect(df, timesFrame)

Give a Dante data frame containing measurement data and background shot data, remove the background from the data and return the corrected data as a dataframe.

offsetCorrect(df, timesFrame, offsetsFile)

Reads given offset correction file (.xls) and applies offsets to dante measurement data given in dataframe.

attenuationFactors(hf, channels, attenuatorsPath)

Given a header frame, return the attenuation factors applied to each channel.

attenuationCorrect(attenuatorsFile, hf, df, …)

Given a Dante data frame and header frame, return a data frame with attenuation corrections applied to each channel.

timeAvgBkg(times, signals, timeStart, timeEnd)

Calculates time averaged background for given data.

avgBkgCorrect(timesFrame, df, channels[, …])

Applies background correction to bring the signal down to zero, based on averaging the signal background over a section of time from earliest time contained in timesFrame to earliest time plus timeLength.

polyBkg(time, signal, lowerEdge, upperEdge)

Fit polynomial function to ends of the signal as an estimate of the background signal + hyesteresis.

signalEdges(timesFrame, df, channels[, …])

Determines locations and widths of peaks above the mean of the signal for each dante channel.

polyBkgFrame(timesFrame, df, edgesFrame, …)

param timesFrame

A dataframe containing time axis values corresponding to signals in

highestPeak(signal, peakIdxs)

Find the highest peak, and return list of peaks with the highest peak removed from the list.

highestN(signal, peakIdxs[, peaksNum])

Select the N tallest peaks.

getPeaks(timesFrame, df, channels[, …])

param timesFrame

A dataframe containing time axis values corresponding to signals in

alignPeaks(timesFrame, df, peaksFrame, channels)

param timesFrame

A dataframe containing time axis values corresponding to signals in

constructMeasurementFrame(timesFrame, df, …)

Takes out put timesFrame and dataFrame from rawProcess.py functions and generates a measurementFrame that can be passed to analyzeStreak() and other main.py functions.

loadCorrected(danteFile, attenuatorsFile, …)

Given a dante data file, an attenuators file, and an offsets file, reads the file and applies background correction, attenuation correction, and channel offset correction.

hysteresisCorrect(timesFrame, df, channels)

Corrects for hysteresis by detecting edges of signal containing region and fitting a polynomial background to regions that do not belong to signal.

align(timesFrame, df, channels[, peaksNum, …])

Aligns dante signals based on peak finding.