icecube.daq.domcal
Class Calibrator

java.lang.Object
  extended by icecube.daq.domcal.Calibrator

public class Calibrator
extends java.lang.Object

DOM calibration class. This class makes the XML calibration files produced by the domcal calibrator accessible to Java-enabled programs. It parses the XML into a DOM tree and strips the information from there producing a class with accessor methods to obtain the constants. Typical usage for this class involves constructing a Calibrator class from the *.xdc files emitted by the domcal. This can be done either from a local file or from a URI:

 ...
 Calibrator cal = new Calibrator(new URL("http://the.domcal.net/kool.xdc"))
 ...
 
then you can use the various methods to access the calibration info. Consult these Javadocs. The most useful function is probably atwdCalibrate - it will take a raw ATWD vector and turn it into a voltage waveform. Best used in conjunction with calcAtwdFreq, e.g.:
 ...
 // f is in [MHz]
 double f = cal.calcAtwdFreq(850, 0);
 double[] t = new double[128];
 double[] w, v = cal.atwdCalibrate(atwd_raw, 0, 0);
 // reverse and subtract off the FE bias and divide by
 // amplifier to get signal at the FE input
 for (int i = 0; i < 128; i++) {
     t[i] = i / (freq*1.E+06);
     w[i] = (v[128-i]-frontend_bias)/cal.getAmplifierGain(0);
 }
 

Author:
kael d hanson (kaeld@icecube.wisc.edu)

Constructor Summary
Calibrator(java.io.InputStream is)
          Constructor from initialized InputStream object.
Calibrator(java.io.InputStream is, CalibratorDB calDB)
          Constructor from initialized InputStream object.
Calibrator(java.lang.String mbSerial, java.util.Date date, double temp)
          Load calibration data from the database.
Calibrator(java.lang.String mbSerial, java.util.Date date, double temp, CalibratorDB calDB)
          Load calibration data from the database.
Calibrator(java.net.URL calfile)
          Constructor to obtain from URL location.
 
Method Summary
 double[] atwdCalibrate(short[] atwdin, int ch, int offset)
          Calibrate raw ATWD counts passed in array atwdin to calibrated volts.
 double[] atwdCalibrateToPmtSig(short[] atwdin, int ch, int offset, int biasDAC)
          Reconstruct PMT signal given an ATWD array and a bias DAC setting.
 double[] atwdCalibrateToPmtSig(short[] atwdin, int ch, int offset, int biasDAC, int hv)
          Reconstruct PMT signal given an ATWD array and a bias DAC setting.
 short[] atwdDecalibrate(double[] v, int ch, int offset)
          Perform inverse calibration to get back to raw quantities.
 double calcAtwdFreq(int dac, int chip)
          Find the ATWD frequency corresponding to a given DAC value.
 double calcVoltageFromGain(double gain)
          Find the voltage required for specified gain.
 void close()
          Close all open threads, file handles, database connections, etc.
 double[] domtestAtwdCalibrate(double[] domtestAtwdIn, int iChannel)
          Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts.
 double[] domtestAtwdCalibrate(int[] domtestAtwdIn, int iChannel)
          Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts.
 double[] domtestAtwdCalibrate(short[] domtestAtwdIn, int iChannel)
          Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts.
 double[] fadcCalibrate(short[] fadcin, int fadcDAC)
          Calibrate the FADC to voltage given an FADC front-end bias DAC setting.
 int getADC(int ch)
          Return ADC readback values.
 double getAmplifierGain(int ch)
          Obtain the front end amplifier gains.
 double getAmplifierGainError(int ch)
          Obtain error estimate on the amplifier gain.
 java.util.Iterator getATWDFitKeys(int ch, int bin)
          Obtain the keys used to access data from the ATWD channel bin.
 java.lang.String getATWDFitModel(int ch, int bin)
          Obtain the fit model for an ATWD channel.
 double getATWDFitParam(int ch, int bin, java.lang.String param)
          Obtain the fit information for an ATWD channel.
 java.util.Iterator getATWDFrequencyFitKeys(int chip)
          Obtain the keys used to access data from the ATWD frequency chip.
 java.lang.String getATWDFrequencyFitModel(int chip)
          Obtain the model for an ATWD frequency chip.
 double getATWDFrequencyFitParam(int chip, java.lang.String param)
          Obtain the data for an ATWD frequency chip parameter.
 java.util.Calendar getCalendar()
          Get the calibration timestamp - that is, when the calibration happened.
 int getDAC(int ch)
          Return DAC settings on mainboard at startup.
 double getDiscriminatorCharge(double dac, java.lang.String id)
          Obtain discriminator charge corresponding to given DAC setting
 java.util.Iterator getDiscriminatorFitKeys(java.lang.String id)
          Obtain the keys used to access data from the DOM analog front-end discriminator.
 java.lang.String getDiscriminatorFitModel(java.lang.String id)
          Obtain the fit model for the DOM analog front-end discriminator.
 double getDiscriminatorFitParam(java.lang.String param, java.lang.String id)
          Obtain the fit information for the DOM analog front-end discriminator.
 double getDiscriminatorSetting(double charge, java.lang.String id)
          Obtain discriminator setting corresponding to given charge
 int getDOMCalId()
          Get the DOMCalibration database ID.
 java.lang.String getDOMId()
          Obtain the DOM hardware ID (Dallas ID chip on mainboard).
 int getDOMProductId()
          Get the unique database ID for the DOM.
 double getFadcDeltaT()
          Obtain the fadc offset in ns from the ATWD time.
 double getFadcDeltaTError()
          Obtain error estimate on fadc time offset.
 double getFadcFreq()
          Return the constant FADC frequency -- NOT measured
 double getFadcGain()
          Obtain the fadc gain.
 double getFadcGainError()
          Obtain error estimate on fadc gain.
 double getHvGainIntercept()
          Get the gain intercept, if present.
 double getHvGainRegression()
          Get the regression coefficient, if present.
 double getHvGainSlope()
          Get the gain slope, if present.
 HVHistogram getHvHistogram(java.lang.Short key)
          Get the histogram data for the specified key, if present.
 java.util.Iterator getHvHistogramKeys()
          Get the histogram keys, if present.
 int getNumberOfADCs()
          Get the number of ADC channels.
 int getNumberOfAmplifierGainChannels()
          Get the number of amplifier gain channels.
 int getNumberOfATWDBins(int channel)
          Get the number of ATWD bins.
 int getNumberOfATWDChannels()
          Get the number of ATWD channels.
 int getNumberOfATWDFrequencyChips()
          Get the number of ATWD frequency chips.
 int getNumberOfDACs()
          Get the number of DAC channels.
 java.util.Iterator getPulserFitKeys()
          Obtain the keys used to access data from the DOM analog front-end pulser.
 java.lang.String getPulserFitModel()
          Obtain the fit model for the DOM analog front-end pulser.
 double getPulserFitParam(java.lang.String param)
          Obtain the fit information for the DOM analog front-end pulser.
 double getRemnantBaseline(double[] wf, int maxIter)
          Get any remnant baseline in a waveform by iteratively removing peaks.
 double getTemperature()
          Return DOM mainboard temperature.
 double getTransitTime(double voltage)
          Get the transit time of the PMT and the delay board at a given high voltage setting.
 boolean hasHvGainFit()
          Is there gain fit data for this calibration file?
 void save()
          Save the calibration data to the database.
protected  void setADCs(int[] adcs)
          Set the calibration ADC array.
protected  void setAmpGain(double[] gain, double[] error)
          Set the calibration amplifier gain and error arrays.
protected  void setATWDFits(java.util.HashMap[][] atwdFits)
          Set the calibration ATWD fit array.
protected  void setATWDFrequencyFits(java.util.HashMap[] freqs)
          Set the calibration ATWD frequency fit array.
 void setBaselineMode(java.lang.String mode)
          Set mode of baseline subtraction.
protected  void setDACs(int[] dacs)
          Set the calibration DAC array.
 void setDiscriminatorFitModel(java.lang.String model, java.lang.String id)
          Set the fit model for the DOM discriminator.
 void setDiscriminatorFitParam(java.lang.String param, java.lang.String id, double value)
          Set the fit information for the DOM analog front-end pulser.
protected  void setDOMCalId(int id)
          Set the DOMCalibration database ID.
protected  void setDOMProduct(icecube.daq.db.domprodtest.DOMProduct domProd)
          Set the cached database information for the DOM.
protected  void setHvGain(double slope, double intercept, double regression)
          Set the high-voltage slope and intercept data
protected  void setHvHistograms(HVHistogram[] histo)
          Set the high-voltage histogram data
protected  void setMain(int domcalId, java.lang.String mbSerial, icecube.daq.db.domprodtest.DOMProduct domProd, java.util.Date date, double temp)
          Set the main table data from the database.
 void setPulserFitModel(java.lang.String model)
          Set the fit model for the DOM analog front-end pulser.
 void setPulserFitParam(java.lang.String param, double value)
          Set the fit information for the DOM analog front-end pulser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Calibrator

public Calibrator(java.net.URL calfile)
           throws java.io.IOException,
                  DOMCalibrationException
Constructor to obtain from URL location.

Parameters:
calfile - URL reference to the XML file.
Throws:
java.io.IOException - if there is a problem reading the stream
DOMCalibrationException - if there is a formatting error

Calibrator

public Calibrator(java.io.InputStream is,
                  CalibratorDB calDB)
           throws java.io.IOException,
                  DOMCalibrationException
Constructor from initialized InputStream object. The XML stream is read into a DOM tree over this object.

Parameters:
is - an initialized, open InputStream object pointing to the XML file.
Throws:
java.io.IOException - if there is a problem reading the stream
DOMCalibrationException - if there is a formatting error

Calibrator

public Calibrator(java.io.InputStream is)
           throws java.io.IOException,
                  DOMCalibrationException
Constructor from initialized InputStream object. The XML stream is read into a DOM tree over this object.

Parameters:
is - an initialized, open InputStream object pointing to the XML file.
Throws:
java.io.IOException - if there is a problem reading the stream
DOMCalibrationException - if there is a formatting error

Calibrator

public Calibrator(java.lang.String mbSerial,
                  java.util.Date date,
                  double temp)
           throws DOMCalibrationException,
                  java.io.IOException,
                  java.sql.SQLException
Load calibration data from the database.

Parameters:
mbSerial - mainboard serial number of DOM being loaded
date - date of data being loaded
temp - temperature of data being loaded
Throws:
DOMCalibrationException - if an argument is invalid
java.io.IOException - if there is a problem reading the stream
java.sql.SQLException - if there is a database problem

Calibrator

public Calibrator(java.lang.String mbSerial,
                  java.util.Date date,
                  double temp,
                  CalibratorDB calDB)
           throws DOMCalibrationException,
                  java.io.IOException,
                  java.sql.SQLException
Load calibration data from the database.

Parameters:
mbSerial - mainboard serial number of DOM being loaded
date - date of data being loaded
temp - temperature of data being loaded
Throws:
DOMCalibrationException - if an argument is invalid
java.io.IOException - if there is a problem reading the stream
java.sql.SQLException - if there is a database problem
Method Detail

atwdCalibrate

public double[] atwdCalibrate(short[] atwdin,
                              int ch,
                              int offset)
Calibrate raw ATWD counts passed in array atwdin to calibrated volts. Note this function assumes the ATWD input array is in raw order and returns an array with same ordering (time decreasing with increasing array index).

Parameters:
atwdin - input array of shorts
ch - specifies ATWD channel 0-3 ATWD-A, 4-7 ATWD-B
offset - specifies starting offset in ATWD to atwdin[0]. For example, if offset is 40 then atwdin[0] really holds the 40th bin of the ATWD.
Returns:
ATWD array in V

atwdCalibrateToPmtSig

public double[] atwdCalibrateToPmtSig(short[] atwdin,
                                      int ch,
                                      int offset,
                                      int biasDAC)
                               throws DOMCalibrationException
Reconstruct PMT signal given an ATWD array and a bias DAC setting. Note this function assumes the ATWD input array is in raw order and returns an array with same ordering (time decreasing with increasing array index).

Parameters:
atwdin - input array of shorts
ch - specifies ATWD channel 0-3 ATWD-A, 4-7 ATWD-B
offset - specifies starting offset in ATWD to atwdin[0]. For example, if offset is 40 then atwdin[0] really holds the 40th bin of the ATWD.
biasDAC - DAC bias
Returns:
ATWD array in V
Throws:
DOMCalibrationException - if there is a problem with the data

setBaselineMode

public void setBaselineMode(java.lang.String mode)
                     throws DOMCalibrationException
Set mode of baseline subtraction.

Parameters:
mode - string specifying baseline subtraction mode: "none": no remnant baseline subtraction "calibrated" : use calibrated baselines in XML file "dynamic": use dynamic baseline determination
Throws:
DOMCalibrationException

atwdCalibrateToPmtSig

public double[] atwdCalibrateToPmtSig(short[] atwdin,
                                      int ch,
                                      int offset,
                                      int biasDAC,
                                      int hv)
                               throws DOMCalibrationException
Reconstruct PMT signal given an ATWD array and a bias DAC setting. Note this function assumes the ATWD input array is in raw order and returns an array with same ordering (time decreasing with increasing array index).

Parameters:
atwdin - input array of shorts
ch - specifies ATWD channel 0-3 ATWD-A, 4-7 ATWD-B
offset - specifies starting offset in ATWD to atwdin[0]. For example, if offset is 40 then atwdin[0] really holds the 40th bin of the ATWD.
biasDAC - DAC bias
hv - HV setting -- baseline is HV dependent!
Returns:
ATWD array in V
Throws:
DOMCalibrationException - if there is a problem with the data

atwdDecalibrate

public short[] atwdDecalibrate(double[] v,
                               int ch,
                               int offset)
Perform inverse calibration to get back to raw quantities.

Parameters:
v - calibrated ATWD vector
ch - ATWD channel (0-3 A), (4-7 B)
offset - offset of first bin
Returns:
raw ATWD array, cast back to shorts.

calcAtwdFreq

public double calcAtwdFreq(int dac,
                           int chip)
Find the ATWD frequency corresponding to a given DAC value.

Parameters:
dac - the ATWD_TRIGGER_BIAS DAC setting
chip - the ATWD chip 0: 'A', 1: 'B'
Returns:
ATWD frequency

getFadcFreq

public double getFadcFreq()
Return the constant FADC frequency -- NOT measured

Returns:
constant FADC frequency

calcVoltageFromGain

public double calcVoltageFromGain(double gain)
                           throws DOMCalibrationException
Find the voltage required for specified gain. For this to work, the calibration structure must contain a fit of the (log) HV to (log) Gain.

Parameters:
gain - the target PMT gain of the DOM (e.g. 1.0E+07)
Returns:
voltage in Volts
Throws:
DOMCalibrationException - if there is no "gain vs. HV" data

getTransitTime

public double getTransitTime(double voltage)
                      throws DOMCalibrationException
Get the transit time of the PMT and the delay board at a given high voltage setting.

Parameters:
voltage - Voltage applied to PMT
Returns:
transit time for given voltage in ns
Throws:
DOMCalibrationException - if no transit time data is present

fadcCalibrate

public double[] fadcCalibrate(short[] fadcin,
                              int fadcDAC)
                       throws DOMCalibrationException
Calibrate the FADC to voltage given an FADC front-end bias DAC setting.

Parameters:
fadcin - input array of shorts
fadcDAC - front-end bias DAC for the FADC
Returns:
FADC array in V
Throws:
DOMCalibrationException - if no FADC data is present

getRemnantBaseline

public double getRemnantBaseline(double[] wf,
                                 int maxIter)
                          throws DOMCalibrationException
Get any remnant baseline in a waveform by iteratively removing peaks.

Parameters:
wf - input waveform array in volts
maxIter - maximum iterations
Returns:
baseline voltage as double
Throws:
DOMCalibrationException

close

public void close()
Close all open threads, file handles, database connections, etc.


domtestAtwdCalibrate

public double[] domtestAtwdCalibrate(short[] domtestAtwdIn,
                                     int iChannel)
Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts. Domtest format refers to pulses that are positive and time increases with sample index.

Parameters:
domtestAtwdIn - The domtest-formatted and pedestalpattern and baseline subtracted raw waveform in ATWD ticks
iChannel - the channel that was used to record that data
Returns:
an array of doubles, holding the pulse in units of Volts in domtest-format

domtestAtwdCalibrate

public double[] domtestAtwdCalibrate(int[] domtestAtwdIn,
                                     int iChannel)
Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts. Domtest format refers to pulses that are positive and time increases with sample index.

Parameters:
domtestAtwdIn - The domtest-formatted and pedestalpattern and baseline subtracted raw waveform in ATWD ticks
iChannel - the channel that was used to record that data
Returns:
an array of doubles, holding the pulse in units of Volts in domtest-format

domtestAtwdCalibrate

public double[] domtestAtwdCalibrate(double[] domtestAtwdIn,
                                     int iChannel)
Method to calibrate domtest-format, pedestalpattern-subtracted and baseline-subtracted input arrays containing raw data into a pulse in units of Volts. Domtest format refers to pulses that are positive and time increases with sample index.

Parameters:
domtestAtwdIn - The domtest-formatted and pedestalpattern and baseline subtracted raw waveform in ATWD ticks
iChannel - the channel that was used to record that data
Returns:
an array of doubles, holding the pulse in units of Volts in domtest-format

getADC

public int getADC(int ch)
Return ADC readback values.

Parameters:
ch - ADC channel
Returns:
ADC value

getATWDFitKeys

public java.util.Iterator getATWDFitKeys(int ch,
                                         int bin)
Obtain the keys used to access data from the ATWD channel bin.

Parameters:
ch - ATWD channel: channels 0-3 map to physical channels 0-3 of ATWD 'A' and channels 4-7 map to physical channels 0-3 of ATWD 'B'.
bin - Sample bin of the ATWD. Each ATWD has 128 sample bins addressed starting from O.
Returns:
ATWD keys.

getATWDFitParam

public double getATWDFitParam(int ch,
                              int bin,
                              java.lang.String param)
Obtain the fit information for an ATWD channel. This fit allows conversion between ATWD counts and volts.

Parameters:
ch - ATWD channel: channels 0-3 map to physical channels 0-3 of ATWD 'A' and channels 4-7 map to physical channels 0-3 of ATWD 'B'.
bin - Sample bin of the ATWD. Each ATWD has 128 sample bins addressed starting from O.
param - Parameter name. Each fit may have its own set of named fit paramters. Each fit however must support the "model" parameter and the "r" parameter.
Returns:
double value of the fit parameter.

getATWDFitModel

public java.lang.String getATWDFitModel(int ch,
                                        int bin)
Obtain the fit model for an ATWD channel. This fit allows conversion between ATWD counts and volts.

Parameters:
ch - ATWD channel: channels 0-3 map to physical channels 0-3 of ATWD 'A' and channels 4-7 map to physical channels 0-3 of ATWD 'B'.
bin - Sample bin of the ATWD. Each ATWD has 128 sample bins addressed starting from O.
Returns:
ATWD fit model.

getATWDFrequencyFitKeys

public java.util.Iterator getATWDFrequencyFitKeys(int chip)
Obtain the keys used to access data from the ATWD frequency chip.

Parameters:
chip - the ATWD chip 0: 'A', 1: 'B'
Returns:
ATWD frequency keys.

getATWDFrequencyFitModel

public java.lang.String getATWDFrequencyFitModel(int chip)
Obtain the model for an ATWD frequency chip.

Parameters:
chip - the ATWD chip 0: 'A', 1: 'B'
Returns:
model

getATWDFrequencyFitParam

public double getATWDFrequencyFitParam(int chip,
                                       java.lang.String param)
Obtain the data for an ATWD frequency chip parameter.

Parameters:
chip - the ATWD chip 0: 'A', 1: 'B'
param - parameter name
Returns:
parameter value

getAmplifierGain

public double getAmplifierGain(int ch)
Obtain the front end amplifier gains.

Parameters:
ch - Channel number
Channel 0
high-gain
Channel 1
medium gain
Channel 2
low-gain
Returns:
double-valued gain

getAmplifierGainError

public double getAmplifierGainError(int ch)
Obtain error estimate on the amplifier gain.

Parameters:
ch - Channel number
Returns:
the error on the amplifier gain.

getFadcGain

public double getFadcGain()
Obtain the fadc gain.

Returns:
double-valued gain

getFadcGainError

public double getFadcGainError()
Obtain error estimate on fadc gain.

Returns:
the error on the fadc gain.

getFadcDeltaT

public double getFadcDeltaT()
Obtain the fadc offset in ns from the ATWD time.

Returns:
double-valued delta t

getFadcDeltaTError

public double getFadcDeltaTError()
Obtain error estimate on fadc time offset.

Returns:
the error on the fadc time offset.

getDiscriminatorSetting

public double getDiscriminatorSetting(double charge,
                                      java.lang.String id)
                               throws DOMCalibrationException
Obtain discriminator setting corresponding to given charge

Parameters:
charge - Discriminator threshold charge
Returns:
discriminator setting corresponding to the charge
Throws:
DOMCalibrationException

getDiscriminatorCharge

public double getDiscriminatorCharge(double dac,
                                     java.lang.String id)
                              throws DOMCalibrationException
Obtain discriminator charge corresponding to given DAC setting

Parameters:
dac - Discriminator DAC setting
Returns:
charge corresponding to discriminator DAC setting
Throws:
DOMCalibrationException

getCalendar

public java.util.Calendar getCalendar()
Get the calibration timestamp - that is, when the calibration happened.

Returns:
Java Calendar object.

getDAC

public int getDAC(int ch)
Return DAC settings on mainboard at startup.

Parameters:
ch - channel of DAC (0=ATWD_TRIGGER_BIAS, ...)
Returns:
DAC value

getDOMCalId

public int getDOMCalId()
Get the DOMCalibration database ID.

Returns:
id database ID

getDOMId

public java.lang.String getDOMId()
Obtain the DOM hardware ID (Dallas ID chip on mainboard).

Returns:
String id which is currently 12-bit hex number.

getDOMProductId

public int getDOMProductId()
Get the unique database ID for the DOM.

Returns:
DOM prod_id (or -1 if product ID has not been set)

getHvGainRegression

public double getHvGainRegression()
Get the regression coefficient, if present.

Returns:
Double.NaN if gain fit data is not present.

getHvGainIntercept

public double getHvGainIntercept()
Get the gain intercept, if present.

Returns:
Double.NaN if gain fit data is not present.

getHvGainSlope

public double getHvGainSlope()
Get the gain slope, if present.

Returns:
Double.NaN if gain fit data is not present.

getHvHistogram

public HVHistogram getHvHistogram(java.lang.Short key)
Get the histogram data for the specified key, if present.

Parameters:
key - Short key
Returns:
null if histogram is not found

getHvHistogramKeys

public java.util.Iterator getHvHistogramKeys()
Get the histogram keys, if present.

Returns:
list of histogram keys

getNumberOfADCs

public int getNumberOfADCs()
Get the number of ADC channels.

Returns:
number of channels

getNumberOfATWDBins

public int getNumberOfATWDBins(int channel)
Get the number of ATWD bins.

Parameters:
channel - ATWD channel
Returns:
number of bins in the specified channel

getNumberOfATWDChannels

public int getNumberOfATWDChannels()
Get the number of ATWD channels.

Returns:
number of channels

getNumberOfATWDFrequencyChips

public int getNumberOfATWDFrequencyChips()
Get the number of ATWD frequency chips.

Returns:
number of chips

getNumberOfAmplifierGainChannels

public int getNumberOfAmplifierGainChannels()
Get the number of amplifier gain channels.

Returns:
number of channels

getNumberOfDACs

public int getNumberOfDACs()
Get the number of DAC channels.

Returns:
number of channels

getPulserFitKeys

public java.util.Iterator getPulserFitKeys()
Obtain the keys used to access data from the DOM analog front-end pulser.

Returns:
pulser keys.

getPulserFitModel

public java.lang.String getPulserFitModel()
Obtain the fit model for the DOM analog front-end pulser.

Returns:
pulser fit model value, null if pulser calibration data is absent

getPulserFitParam

public double getPulserFitParam(java.lang.String param)
Obtain the fit information for the DOM analog front-end pulser. It describes the relation between the pulser DAC setting and the peak pulse amplitude in volts.

Parameters:
param - Named fit paramter. See the description of the ATWD fit parameters.
Returns:
pulser fit parameter value

getDiscriminatorFitKeys

public java.util.Iterator getDiscriminatorFitKeys(java.lang.String id)
                                           throws DOMCalibrationException
Obtain the keys used to access data from the DOM analog front-end discriminator.

Returns:
pulser keys.
Throws:
DOMCalibrationException

getDiscriminatorFitModel

public java.lang.String getDiscriminatorFitModel(java.lang.String id)
                                          throws DOMCalibrationException
Obtain the fit model for the DOM analog front-end discriminator.

Returns:
pulser fit model value
Throws:
DOMCalibrationException

getDiscriminatorFitParam

public double getDiscriminatorFitParam(java.lang.String param,
                                       java.lang.String id)
                                throws DOMCalibrationException
Obtain the fit information for the DOM analog front-end discriminator. It describes the relation between the discriminator DAC setting and charge threshold

Parameters:
param - Named fit paramter. See the description of the ATWD fit parameters.
Returns:
pulser fit parameter value
Throws:
DOMCalibrationException

getTemperature

public double getTemperature()
Return DOM mainboard temperature.

Returns:
double-valued temperature (degrees C).

hasHvGainFit

public boolean hasHvGainFit()
Is there gain fit data for this calibration file?

Returns:
true if there is gain slope/intercept data

save

public void save()
          throws DOMCalibrationException,
                 java.io.IOException,
                 java.sql.SQLException
Save the calibration data to the database.

Throws:
DOMCalibrationException - if there is a problem with the data
java.io.IOException - if there is a filesystem probelm
java.sql.SQLException - if there is a database problem

setADCs

protected void setADCs(int[] adcs)
Set the calibration ADC array.

Parameters:
adcs - ADC array

setATWDFits

protected void setATWDFits(java.util.HashMap[][] atwdFits)
Set the calibration ATWD fit array.

Parameters:
atwdFits - ATWD fit array

setATWDFrequencyFits

protected void setATWDFrequencyFits(java.util.HashMap[] freqs)
Set the calibration ATWD frequency fit array.

Parameters:
freqs - ATWD frequency fit array

setAmpGain

protected void setAmpGain(double[] gain,
                          double[] error)
Set the calibration amplifier gain and error arrays.

Parameters:
gain - amplifier gain array
error - amplifier error array

setDACs

protected void setDACs(int[] dacs)
Set the calibration DAC array.

Parameters:
dacs - DAC array

setDOMCalId

protected void setDOMCalId(int id)
Set the DOMCalibration database ID.

Parameters:
id - database ID

setDOMProduct

protected void setDOMProduct(icecube.daq.db.domprodtest.DOMProduct domProd)
Set the cached database information for the DOM.

Parameters:
domProd - database DOM information

setHvGain

protected void setHvGain(double slope,
                         double intercept,
                         double regression)
Set the high-voltage slope and intercept data

Parameters:
slope - slope
intercept - intercept

setHvHistograms

protected void setHvHistograms(HVHistogram[] histo)
Set the high-voltage histogram data

Parameters:
histo - histogram array

setMain

protected void setMain(int domcalId,
                       java.lang.String mbSerial,
                       icecube.daq.db.domprodtest.DOMProduct domProd,
                       java.util.Date date,
                       double temp)
Set the main table data from the database.

Parameters:
domcalId - DOMCalibration database ID
mbSerial - DOM ID (main board hardware serial number)
domProd - database DOM information
date - DOMCalibration date
temp - DOMCalibration temperature

setPulserFitModel

public void setPulserFitModel(java.lang.String model)
Set the fit model for the DOM analog front-end pulser.

Parameters:
model - pulser fit model value

setPulserFitParam

public void setPulserFitParam(java.lang.String param,
                              double value)
                       throws DOMCalibrationException
Set the fit information for the DOM analog front-end pulser.

Parameters:
param - Named fit paramter. See the description of the ATWD fit parameters.
value - pulser fit parameter value
Throws:
DOMCalibrationException - if an argument is invalid

setDiscriminatorFitModel

public void setDiscriminatorFitModel(java.lang.String model,
                                     java.lang.String id)
                              throws DOMCalibrationException
Set the fit model for the DOM discriminator.

Parameters:
model - pulser fit model value
Throws:
DOMCalibrationException

setDiscriminatorFitParam

public void setDiscriminatorFitParam(java.lang.String param,
                                     java.lang.String id,
                                     double value)
                              throws DOMCalibrationException
Set the fit information for the DOM analog front-end pulser.

Parameters:
param - Named fit paramter. See the description of the ATWD fit parameters.
value - pulser fit parameter value
Throws:
DOMCalibrationException - if an argument is invalid


Copyright © 2006 IceCube Collaboration. All Rights Reserved.