resistics.calibrate.data module

class resistics.calibrate.data.CalibrationData(filename: str, freqs: numpy.ndarray, magnitude: numpy.ndarray, phase: numpy.ndarray, staticGain: float = 1, chopper: bool = False, serial: int = 1, sensor: str = '')[source]

Bases: resistics.common.base.ResisticsBase

Class for holding calibration data

Calibration data should be given in the frequency domain and has a magnitude and phase component (in radians). Calibration data is the impulse response for an instrument or sensor and is usually deconvolved (division in frequency domain) from the time data.

Notes

Calibration data for magnetic channels is given in mV/nT. Because this is deconvolved from magnetic time data, which is in mV, the resultant magnetic time data is in nT.

Attributes
filenamestr

The filename the calibration data was read from

numSamplesint

The number of samples in the calibration data

freqsnp.ndarray

The frequency points where calibration data is defined

magnitudenp.ndarray

The magnitude data

magnitudeUnitstr

The magnitude unit, defaulted to mV/nT

phasenp.ndarray

The phase data in radians

phaseUnitstr

The phase unit, defaulted to radians

chopperbool

Boolean flag to note whether chopper is on or not

Methods

__init__(kwargs)

Initialise the calibration data

view(kwargs)

View the calibration data

printList()

Class status returned as list of strings

printList(self) → List[str][source]

Class information as a list of strings

Returns
outList[str]

List of strings with information

view(self, **kwargs) → matplotlib.figure.Figure[source]

Plot of the calibration function

Parameters
staticgainbool, optional

Boolean flag for having static gain on, default is True

degreesbool, optional

Plot phase in degreesm default is False

figmatplotlib.pyplot.figure, optional

A figure object

plotFontsDict, optional

A dictionary of plot fonts

labelstr, optional

Label for the plots

xlimList, optional

Limits for the x axis

ylim_magList, optional

Limits for the magnitude y axis

ylim_phaseList, optional

Limits for the phase y axis

legenedbool

Boolean flag for adding a legend

Returns
plt.figure

Matplotlib figure object