dwvisser.analysis
Class InputSpecification

java.lang.Object
  |
  +--dwvisser.analysis.InputSpecification

public class InputSpecification
extends java.lang.Object

Class for containing processing input specifications for YLSAcalibration.

Author:
Dale Visser

Constructor Summary
InputSpecification(java.io.File inputSpecFile)
          Creates new InputSpecification.
 
Method Summary
 boolean dataExists(int det, int strip)
           
 java.io.File getFile(int det, int str)
          Returns the file reference for the requested detector and strip.
 java.lang.String getName(int det, int str)
          Returns the name of the spectrum in the HDF file for the given detector and strip.
 int getNumberOfDetectors()
           
 double getSignificance()
          Returns the confidence lever for the PeakFinder to use.
 int[] getSpectrum(int detector, int strip)
          Retrieves the spectrum for the given detector and strip from the appropriate HDF file.
 int getStripsPerDetector()
           
 double getWidth(int det, int strip)
          Returns the specified peak width for the PeakFinder to use.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputSpecification

public InputSpecification(java.io.File inputSpecFile)
Creates new InputSpecification. The format of the input file is:
#detectors #stripPerDetector peakWidth significance
#files
filename#n #spectraInFile
spectrumName#n
etc.

Parameters:
inputSpecFile - text file containing specifications
Method Detail

getWidth

public double getWidth(int det,
                       int strip)
Returns the specified peak width for the PeakFinder to use.

Returns:
width in channels of peaks for peak finder to use

getSignificance

public double getSignificance()
Returns the confidence lever for the PeakFinder to use.

Returns:
significance parameter

getSpectrum

public int[] getSpectrum(int detector,
                         int strip)
                  throws SpecNotAvailableException
Retrieves the spectrum for the given detector and strip from the appropriate HDF file.

Parameters:
detector - detector of interest
strip - strip of interest in the detector
Returns:
histogram
Throws:
SpecNotAvailableException - if user never gave an input specification for this detector and strip

getFile

public java.io.File getFile(int det,
                            int str)
Returns the file reference for the requested detector and strip.

Parameters:
det - which detector
str - which strip in the detector
Returns:
file to look in

getName

public java.lang.String getName(int det,
                                int str)
Returns the name of the spectrum in the HDF file for the given detector and strip.

Parameters:
det - which detector
str - which strip in the detector
Returns:
spectrum name

getNumberOfDetectors

public int getNumberOfDetectors()

getStripsPerDetector

public int getStripsPerDetector()

dataExists

public boolean dataExists(int det,
                          int strip)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)