In file EasyCalibrate/LscCalib.hh:

class LscCalib

Calibration data

Inheritance:


Public Methods

LscCalib (const std::string& name, const std::string& file, const std::string& chan="", const Time& gps=Time(0))
Construct an LscCalib object.
~LscCalib (void)
Destroy an LscCalib object
void clear (void)
Zero all internal fields of the calibration description
const char* getChannel (void) const
Get channel name.
int getDebug (void) const
Get the debug level.
const char* getName (void) const
Get calibration document name.
const char* getVersion (void) const
Get the calibration version.
int getVersionID (void) const
Get the calibration version.
const char* getComment (void) const
Get the comment.
const char* getEXCChannel (void) const
Get the excitation channel name. The
Time getCalibTime (void) const
Get the calibration time.
float getCalLineFreq (void) const
Get the calibration line frequency.
float getCalLineAmplASQ (void) const
Get the nominal calibration line amplitude in AsQ.
float getCalLineAmplEXC (void) const
Get the nominal calibration line excitation amplitude.
double getCavFac (const Time& t) const
Get the cavity factor.
double getOLGFac (const Time& t) const
Get the open-loop gain factor.
Time getStartTime (void) const
Get calibration validity start time.
Interval getDuration (void) const
Get calibration validity duration.
int getNGainChan (void) const
Get the number of gain channels.
const char* getGainChan (int i) const
Get the ith gain channel name.
float getGainRefValue (int i) const
Get the value of the gain channel during the reference calibration measurement
FSeries getResponse (double alpha, double gamma) const
Get the response function for the specified Cavity and Open-Loop gain factors
FSeries getResponse (const Time& t) const
Get the response function at the specified time
FSeries interpSensing (double fMin, double fMax, double df, bool logar=true) const
Interpolate the Sensing function
FSeries interpOpenLoopGain (double fMin, double fMax, double df, bool logar=true) const
Interpolate the open loop gain
void prepare (void)
Assure global consitency of all fields
void read (const std::string& file, const std::string& title, const std::string& chan, const Time& gps=Time(0))
Set the calibration from the specified file
void readFrame (const std::string& file, const std::string& title, const std::string& chan, const Time& gps=Time(0))
read a calibration frame file.
void readXml (const std::string& file, const std::string& title, const std::string& chan)
read an xml file.
void readXml (xsil::Xreader& xw, const std::string& name, const std::string& chan="")
Read an xml stream.
const TSeries& refAlpha (void)
Get alpha time series.
const TSeries& refAlphaBeta (void)
Get alpha*beta time series.
const TSeries& refCavityFactor (void) const
Get the cavity factor time series.
const FSeries& refOpenLoopGain (void)
Get the open loop gain.
const FSeries& refResponseFunction (void)
Get the open loop gain.
const FSeries& refSensingFunction (void)
Get the sensing function.
void setAlpha (const TSeries& a)
Set the open loop gain transfer function
void setAlphaBeta (const TSeries& ab)
Set the open loop gain factors.
void setCalibTime (const Time& t)
Set the calibration time.
void setCalLine (const std::string& exc, float freq, float amplAsq, float amplExc)
Define a calibration line.
void setChannel (const std::string& c)
Set the name of the channel for which the calibration is valid
void setComment (const std::string& c)
Specify comment string.
void setDebug (int lvl)
Set the debug flag
void addGainChan (const std::string& chan, float ampl)
Add a dynamic gain channel and specify its nominal amplitude
void setName (const std::string& n)
Set the document name for this calibration
void setOpenLoopGain (const FSeries& o)
Set the open loop gain transfer function
void setResponseFunction (const FSeries& t)
Set the response function from a frequency series
void setSensingFunction (const FSeries& t)
Set the response function from a frequency series
void setVersion (const std::string& v)
Set the version string for this calibration
void setVersionID (int id)
Set the Calibration groups numeric version ID for this calibration
void writeFrame (const std::string& file, CalibChanList::cal_format fmt=CalibChanList::cfmt_default)
Write the calibration as an Xml document to the specified file
void writeXml (const std::string& file)
Write the calibration as an Xml document to the specified file
void writeXml (xsil::Xwriter& file)
Write the calibration as an Xml document to the specified Xsil writer

Documentation

The LscCalib class provides access to the data needed to calibrate the asymmetric port (GW) data.
LscCalib(const std::string& name, const std::string& file, const std::string& chan="", const Time& gps=Time(0))
Construct an LscCalib object using the specified name and file name. The name field contains a document name that is at present ignored. The file name may be specified as a null string (""), in which case, the calibration information will not be read until the read() or readXml() method is called.
Parameters:
name - Name of calibration document
file - File from which the calibration data are to be read.

~LscCalib(void)
Destroy an LscCalib object

void clear(void)
Zero all internal fields of the calibration description

const char* getChannel(void) const
Get the name of the channel to which this calibration applies.

int getDebug(void) const
Get the level of debug printing.

const char* getName(void) const
Get the name of this calibration document.

const char* getVersion(void) const
Get the calibration version. The version is typically a small integer but may contain other information as desired.

int getVersionID(void) const
Get the calibration version. The version is typically a small integer but may contain other information as desired.

const char* getComment(void) const
Get the calibration comment string.

const char* getEXCChannel(void) const
Get the name of the channel containing the calibration reference waveform (assumed to be oneor more sinusoids) injected into the ifo length control feeback loop.

Time getCalibTime(void) const
Get the time at which the calibration was performed.

float getCalLineFreq(void) const
Get the calibration line frequency.

float getCalLineAmplASQ(void) const
Get the calibration line amplitude measured in the asymmetric port signal during the measurement of the nominal calibration.

float getCalLineAmplEXC(void) const
Get the calibration line amplitude measured in the excitation channel during the measurement of the nominal calibration.

double getCavFac(const Time& t) const
Get the cavity gain factor (alpha) at the specified time. A runtime_error exception is thrown if the specified time is outside of the TSeries time range.
Returns:
Cavity gain factor.
Parameters:
t - Time at which the cavity factor is to be evaluated.

double getOLGFac(const Time& t) const
Get the open loop gain factor (gamma) at the specified time. A runtime_error exception is thrown if the specified time is outside of the TSeries time range.
Returns:
Open loop gain factor.
Parameters:
t - Time at which the open-loop gain factor is to be evaluated.

Time getStartTime(void) const
Get the start of the period for which this calibration is valid.

Interval getDuration(void) const
Get the diuration of the period for which this calibration is valid.

int getNGainChan(void) const
Get the number of channels that affect the open loop gain directly.

const char* getGainChan(int i) const
Get the name of the ith gain channel.
Parameters:
i - Gain channel number.

float getGainRefValue(int i) const
Get the value of the gain channel during the reference calibration measurement
Parameters:
i - Gain channel number.

FSeries getResponse(double alpha, double gamma) const
Get the response function for the specified Cavity and Open-Loop gain factors. Note that the response function is defined as

where S is the Sensing function and OLG is the open loop gain. To convert a measured signal to a strain, one multiplies by the Response (R).
Returns:
Response function.
Parameters:
alpha - Cavity gain factor.
gamma - Open Loop Gain factor.

FSeries getResponse(const Time& t) const
Get the response function at the specified time. The cavity and open loop gain factors are looked up at specified time in the internal time series. The response function is then calculated using these factors.
Returns:
Response function.
Parameters:
t - Time at which the response function is to be evaluated.

FSeries interpSensing(double fMin, double fMax, double df, bool logar=true) const
Interpolate the sensing function in the specified frequency range (fMin - fMax) at points separated by the specified frequency spacing (df). The returned frequency series is a single sided series starting at f=0 with the specified spacing and points up to (but not including) fMax. It is non-zero only in the specified range. No interpolation is performed if the sensing function frequency step is equal to the requested step. If interpolation is necessary, it may be performed either linearly or logarithmically as specified by the logar parameter.
Returns:
Interpolated frequency series.
Parameters:
fMin - Minimum non-zero frequency of returned series
fMax - Maximum frequency of returned series
df - Frequency step of returned series.
logar - If true, logarithmic interpolation.

FSeries interpOpenLoopGain(double fMin, double fMax, double df, bool logar=true) const
Interpolate the open loop gain in the specified frequency range. The meaning of the arguments is identical to those in interpSensing.
Returns:
Interpolated frequency series.
Parameters:
fMin - Minimum non-zero frequency of returned series
fMax - Maximum frequency of returned series
df - Frequency step of returned series.
logar - If true, logarithmic interpolation.

void prepare(void)
Assure global consitency of all fields

void read(const std::string& file, const std::string& title, const std::string& chan, const Time& gps=Time(0))
Set the calibration from the specified file. When frame data are defined, this method will automatically determin the file type (frame or xml) and call the appropriate method.

void readFrame(const std::string& file, const std::string& title, const std::string& chan, const Time& gps=Time(0))
Set the calibration from the specified frame file.

void readXml(const std::string& file, const std::string& title, const std::string& chan)
Set the calibration from the specified xml file.

void readXml(xsil::Xreader& xw, const std::string& name, const std::string& chan="")
Set the calibration from the xml document in the specified stream.

const TSeries& refAlpha(void)
Return a reference to a time series containing Alpha values.

const TSeries& refAlphaBeta(void)
Return a reference to a time series containing Alpha*Beta values.

const TSeries& refCavityFactor(void) const
Return a reference to a time series containing the cavity factor (alpha) time series. Note that this is identical to refAlpha().

const FSeries& refOpenLoopGain(void)
Return a reference to the open loop gain function frequency series. Note that the open-loop gain could be calculated from the response function and the Sensing function if it is not specified explicitly. The refOpenLoopGain function is not const to allow a future implementation of this calculation.
Returns:
A constant reference to the Open Loop Gain FSeries.

const FSeries& refResponseFunction(void)
Return a reference to the response function frequency series. Note that the response function could be calculated from the open loop gain and the Sensing function if it is not specified explicitly. The refResponseFunction method is not const to allow a future implementation of this calculation.
Returns:
A constant reference to the Respoinse Function FSeries.

const FSeries& refSensingFunction(void)
Return a reference to the sensing function (Frequency series).

void setAlpha(const TSeries& a)
Set the open loop gain transfer function

void setAlphaBeta(const TSeries& ab)
Set the open loop gain factor time series.
Parameters:
ab - Gain factor time series.

void setCalibTime(const Time& t)
Set the calibration measurement time.
Parameters:
t - Calibration time.

void setCalLine(const std::string& exc, float freq, float amplAsq, float amplExc)
Specify all the parameters of a calibration line.
Parameters:
exc - Excitation channel name.
freq - Calibrationline frequency.
amplAsq - Nominal line amplitude in the calibrated channel.
amplExc - Nominal line amplitude in the excitation channel.

void setChannel(const std::string& c)
Set the name of the channel for which the calibration is valid

void setComment(const std::string& c)
Specify a comment describing this calibration.
Parameters:
c - Comment string.

void setDebug(int lvl)
Set the debug flag

void addGainChan(const std::string& chan, float ampl)
Add a dynamic gain channel and specify its nominal amplitude

void setName(const std::string& n)
Set the document name for this calibration

void setOpenLoopGain(const FSeries& o)
Set the open loop gain transfer function

void setResponseFunction(const FSeries& t)
Set the response function from a frequency series

void setSensingFunction(const FSeries& t)
Set the response function from a frequency series

void setVersion(const std::string& v)
Set the version string for this calibration

void setVersionID(int id)
Set the Calibration groups numeric version ID for this calibration

void writeFrame(const std::string& file, CalibChanList::cal_format fmt=CalibChanList::cfmt_default)
Write the calibration as an Xml document to the specified file

void writeXml(const std::string& file)
Write the calibration as an Xml document to the specified file

void writeXml(xsil::Xwriter& file)
Write the calibration as an Xml document to the specified Xsil writer


This class has no child classes.
Author:
J. Zweizig
Version:

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++