peakml.io.xrawfile
Class IXRawfile

java.lang.Object
  extended by peakml.io.xrawfile.IXRawfile

public class IXRawfile
extends java.lang.Object

This class provides a 1-to-1 mapping to the XRawfile DLL of Thermo, for reading the RAW file format. Almost every function that is exposed in this DLL is implemented in this class and has been made Java specific. This means that the awkward interface of the OLE connection is avoided and a clean interface can be used.

The usage of the class is as follows (please read the function documentation for the details):

 IXRawfile rawfile = new IXRawfile();
 rawfile.init();
 int errorcode = rawfile.open("filename.RAW");
 if (errorcode != IXRawfile.SUCCESS)
    System.out.println("[ERROR]: cannot open the file");
 
 rawfile.setCurrentController(IXRawfile.CONTROLLER_MS, 0);
 


Nested Class Summary
static class IXRawfile.Controller
          Central class for collecting all information about a controller.
static class IXRawfile.Label
          Central class for collecting the label data for a mass peak.
static class IXRawfile.Noise
          Central class for collecting the data of a noise-packet.
static class IXRawfile.PrecursorInfo
          Central class for collecting all information about a precursor scan.
static class IXRawfile.ScanHeaderInfo
          Central class for collecting all information about a scan.
 
Field Summary
static int CONTROLLER_AD_CARD
          This code indicates that the controller was a analog-to-digital converter.
static int CONTROLLER_ANALOG
          This code final indicates that the controller was an analog device.
static int CONTROLLER_MS
          This code indicates that the controller was a mass spectrometer.
static int CONTROLLER_NO_DEVICE
          This code indicates that there was no controller available.
static int CONTROLLER_PDA
          This code indicates that the controller was a photo-diode-array device (whole range UV detector).
static int CONTROLLER_UV
          This code indicates that the controller was a UV detector.
static java.lang.String PROGRAMID_MSFILEREADER
          The string that identifies the OLE-application in the windows registry.
static java.lang.String PROGRAMID_XCALIBUR
          The string that identifies the OLE-application in the windows registry.
static int RTCODE_CURRENT_CONTROLLER_INVALID
          This code will be returned if no current controller has been specified.
static int RTCODE_FAILED
          This code indicates that a general error has occurred.
static int RTCODE_FILTER_FORMAT_INCORRECT
          This code will be returned if an incorrectly formatted scan filter is passed in a function call.
static int RTCODE_MASS_RANGE_FORMAT_INCORRECT
          This code will be returned if an incorrectly formatted mass range is passed in a function call.
static int RTCODE_NO_DATA_PRESENT
          This code does not typically indicate an error.
static int RTCODE_OPERATION_NOT_SUPPORTED_ON_CURRENT_CONTROLLER
          This code will be returned if the requested action is inappropriate for the currently defined controller.
static int RTCODE_PARAMETER_INVALID
          This code will be returned if an invalid parameter is passed in a function call to the OCX.
static int RTCODE_RAW_FILE_INVALID
          This code will be returned if no valid raw file is currently open.
static int RTCODE_SUCCESS
          This code indicates that the function call to the OCX was processed without error.
 
Constructor Summary
IXRawfile()
           
 
Method Summary
 void close()
          Closes a raw file and frees the associated memory.
 int dispose()
          Disposes of the OLE connection.
 int getControllerType(int index)
          Returns the type of the device controller registered at the specified index position in the raw file.
 java.lang.String getCreationDate()
          Returns the file creation date in DATE format.
 java.lang.String getCreatorID()
          Returns the creator ID.
 IXRawfile.Controller getCurrentController()
          Gets the current controller type and number for the raw file.
 double getEndTime()
          Gets the start time of the last scan or reading for the current controller.
 java.lang.String getErrorLogItem(int itemnumber)
          Returns the specified error log item information and the retention time at which the error occurred.
 java.lang.String getErrorMessage()
          Returns the last error message that was recorded by the Thermo OLE DLL.
 java.lang.String getFileName()
          Returns the fully qualified path name of an open raw file.
 java.lang.String getFilterForScanNum(int scannumber)
          Returns the closest matching run time that corresponds to nScanNumber for the current controller.
 java.lang.String getFilterForScanRT(double retentiontime)
          Returns the closest matching run time that corresponds to nScanNumber for the current controller.
 java.lang.String[] getFilters()
          Returns the list of unique scan filters for the raw file.
 int getFirstSpectrumNumber()
          Gets the first scan or reading number for the current controller.
 double getHighMass()
          Gets the highest mass or wavelength recorded for the current controller.
 int getInletID()
          Gets the inlet ID number for the current controller.
 java.lang.String getInstChannelLabel(int channelnumber)
          Returns the channel label, if available, at the specified index for the current controller.
 java.lang.String getInstFlags()
          Returns the experiment flags, if available, for the current controller.
 java.lang.String getInstHardwareVersion()
          Returns the current controller hardware or firmware revision information, if available.
 java.lang.String GetInstMethod(int methoditem)
          Returns the channel label, if available, at the specified index for the current controller.
 java.lang.String getInstModel()
          Returns the instrument model, if available, for the current controller.
 java.lang.String getInstName()
          Returns the instrument name, if available, for the current controller.
 int getInstNumChannelLabels()
          Returns the number of channel labels specified for the current controller.
 int getInstrumentID()
          Gets the instrument ID number for the current controller.
 java.lang.String getInstSerialNumber()
          Returns the serial number, if available, for the current controller.
 java.lang.String getInstSoftwareVersion()
          Returns the current controller software revision information, if available.
 java.util.Vector<IXRawfile.Label> getLabelData(int scannumber)
          This method enables you to read the FT-PROFILE labels of a scan represented by the scanNumber.
 int getLastSpectrumNumber()
          Gets the last scan or reading number for the current controller.
 double getLowMass()
          Gets the lowest mass or wavelength recorded for the current controller.
 double[] getMassListFromScanNum(int scannumber, boolean centroid)
          Returns the mass list array.
 double getMassResolution()
          Gets the mass resolution value recorded for the current controller.
 int getMaxIntensity()
          Gets the highest base peak of all the scans for the current controller.
 java.util.Vector<IXRawfile.Noise> getNoiseData(int scannumber)
           
 int getNumberOfControllers()
          Returns the number of registered device controllers in the raw file.
 int getNumberOfControllersOfType(int type)
          Returns the number of registered device controllers of a particular type in the raw file.
 int getNumErrorLog()
          Gets the number of error log entries recorded for the current controller.
 int getNumInstMethods()
          Returns the number of instrument methods contained in the raw file.
 int getNumSpectra()
          Gets the number of spectra acquired by the current controller.
 int getNumStatusLog()
          Gets the number of status log entries recorded for the current controller.
 int getNumTrailerExtra()
          Gets the trailer extra entries recorded for the current controller.
 int getNumTuneData()
          Gets the number of tune data entries recorded for the current controller.
 IXRawfile.PrecursorInfo[] getPrecursorInfoFromScanNum(int scannumber)
          This function is used to retrieve information about the parent scans of a data dependent MSn scan.
 IXRawfile.ScanHeaderInfo getScanHeaderInfoForScanNum(int scannumber)
          For a given scan number, this function returns information from the scan header for the current controller.
 double getStartTime()
          Gets the start time of the first scan or reading for the current controller.
 java.util.HashMap<java.lang.String,java.lang.String> getStatusLogForScanNum(int scannumber)
          Returns the recorded status log entry labels and values for the current controller.
 java.lang.String[] getStatusLogLabelsForScanNum(int scannumber)
          Returns the recorded status log entry labels for the current controller.
 java.lang.String getStatusLogValueForScanNum(int scannumber, java.lang.String label)
          Returns the recorded status log parameter value for the specified status log parameter label for the current controller.
 java.util.HashMap<java.lang.String,java.lang.String> getTrailerExtraForScanNum(int scannumber)
          Returns the recorded trailer extra entry labels and values for the current controller.
 java.util.HashMap<java.lang.String,java.lang.String> getTuneData(int segmentnumber)
          Returns the recorded tune parameter labels and values for the current controller.
 int getVersionNumber()
          Returns the file format version number.
 int init()
          Initializes the OLE connection.
 boolean isCentroidScanForScanNum(int scannumber)
          Returns TRUE if the scan specified by nScanNumber is a centroid scan, FALSE if the scan is a profile scan.
 boolean isProfileScanForScanNum(int scannumber)
          Returns TRUE if the scan specified by nScanNumber is a profile scan, FALSE if the scan is a centroid scan.
 void open(java.lang.String filename)
          Opens a raw file for reading only.
 double rtFromScanNum(int scannumber)
          Returns the closest matching run time or retention time that corresponds to nScanNumber for the current controller.
 int scanNumFromRT(double retentiontime)
          Returns the closest matching scan number that corresponds to dRT for the current controller.
 void setCurrentController(int controllertype, int controllernumber)
          Sets the current controller in the raw file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRAMID_XCALIBUR

public static final java.lang.String PROGRAMID_XCALIBUR
The string that identifies the OLE-application in the windows registry.

See Also:
Constant Field Values

PROGRAMID_MSFILEREADER

public static final java.lang.String PROGRAMID_MSFILEREADER
The string that identifies the OLE-application in the windows registry.

See Also:
Constant Field Values

RTCODE_SUCCESS

public static final int RTCODE_SUCCESS
This code indicates that the function call to the OCX was processed without error.

See Also:
Constant Field Values

RTCODE_FAILED

public static final int RTCODE_FAILED
This code indicates that a general error has occurred. This code may be returned whenever an error of indeterminate origin occurs.

See Also:
Constant Field Values

RTCODE_RAW_FILE_INVALID

public static final int RTCODE_RAW_FILE_INVALID
This code will be returned if no valid raw file is currently open.

See Also:
Constant Field Values

RTCODE_CURRENT_CONTROLLER_INVALID

public static final int RTCODE_CURRENT_CONTROLLER_INVALID
This code will be returned if no current controller has been specified.

See Also:
Constant Field Values

RTCODE_OPERATION_NOT_SUPPORTED_ON_CURRENT_CONTROLLER

public static final int RTCODE_OPERATION_NOT_SUPPORTED_ON_CURRENT_CONTROLLER
This code will be returned if the requested action is inappropriate for the currently defined controller.

See Also:
Constant Field Values

RTCODE_PARAMETER_INVALID

public static final int RTCODE_PARAMETER_INVALID
This code will be returned if an invalid parameter is passed in a function call to the OCX. This can occur if a parameter is out of range or initialized incorrectly.

See Also:
Constant Field Values

RTCODE_FILTER_FORMAT_INCORRECT

public static final int RTCODE_FILTER_FORMAT_INCORRECT
This code will be returned if an incorrectly formatted scan filter is passed in a function call.

See Also:
Constant Field Values

RTCODE_MASS_RANGE_FORMAT_INCORRECT

public static final int RTCODE_MASS_RANGE_FORMAT_INCORRECT
This code will be returned if an incorrectly formatted mass range is passed in a function call.

See Also:
Constant Field Values

RTCODE_NO_DATA_PRESENT

public static final int RTCODE_NO_DATA_PRESENT
This code does not typically indicate an error. This code may be returned if optional data is not contained in the current raw file.

See Also:
Constant Field Values

CONTROLLER_NO_DEVICE

public static final int CONTROLLER_NO_DEVICE
This code indicates that there was no controller available.

See Also:
Constant Field Values

CONTROLLER_MS

public static final int CONTROLLER_MS
This code indicates that the controller was a mass spectrometer.

See Also:
Constant Field Values

CONTROLLER_ANALOG

public static final int CONTROLLER_ANALOG
This code final indicates that the controller was an analog device.

See Also:
Constant Field Values

CONTROLLER_AD_CARD

public static final int CONTROLLER_AD_CARD
This code indicates that the controller was a analog-to-digital converter.

See Also:
Constant Field Values

CONTROLLER_PDA

public static final int CONTROLLER_PDA
This code indicates that the controller was a photo-diode-array device (whole range UV detector).

See Also:
Constant Field Values

CONTROLLER_UV

public static final int CONTROLLER_UV
This code indicates that the controller was a UV detector.

See Also:
Constant Field Values
Constructor Detail

IXRawfile

public IXRawfile()
Method Detail

init

public int init()
Initializes the OLE connection.


dispose

public int dispose()
Disposes of the OLE connection. This needs to be called to have a clean finalization of the connection.


getErrorMessage

public java.lang.String getErrorMessage()
                                 throws IXRawfileException
Returns the last error message that was recorded by the Thermo OLE DLL.

Returns:
The last error message.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

open

public void open(java.lang.String filename)
          throws IXRawfileException
Opens a raw file for reading only. This function must be called before attempting to read any data from the raw file.

Parameters:
filename - The fully qualified path name of the raw file to open.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

close

public void close()
           throws IXRawfileException
Closes a raw file and frees the associated memory.

Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getFileName

public java.lang.String getFileName()
                             throws IXRawfileException
Returns the fully qualified path name of an open raw file.

Returns:
The fully qualified path name of an open raw file
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getCreatorID

public java.lang.String getCreatorID()
                              throws IXRawfileException
Returns the creator ID. The creator ID is the logon name of the user when the raw file was acquired.

Returns:
The logon name of the user.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getVersionNumber

public int getVersionNumber()
                     throws IXRawfileException
Returns the file format version number.

Returns:
The file format version number.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getCreationDate

public java.lang.String getCreationDate()
                                 throws IXRawfileException
Returns the file creation date in DATE format.

Returns:
The file creation date in DATE format.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumberOfControllers

public int getNumberOfControllers()
                           throws IXRawfileException
Returns the number of registered device controllers in the raw file. A device controller represents an acquisition stream such as MS data, UV data, etc. Devices that do not acquire data such are autosamplers are not registered with the raw file during acquisition.

Returns:
The number of registered device controllers in the raw file
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumberOfControllersOfType

public int getNumberOfControllersOfType(int type)
                                 throws IXRawfileException
Returns the number of registered device controllers of a particular type in the raw file. See Controller Type in the Enumerated Types section for a list of the available controller types and their respective values.

Parameters:
type - The controller type for which the number of registered controllers of that type are requested.
Returns:
The number of registered device controllers of a particular type in the raw file.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getControllerType

public int getControllerType(int index)
                      throws IXRawfileException
Returns the type of the device controller registered at the specified index position in the raw file. Index values start at 0. See Controller Type in the Enumerated Types section for a list of the available controller types and their respective values.

Parameters:
controllernumber - The index value of the controller for which the type is to be returned.
Returns:
The type of the device controller registered at the specified index position in the raw file.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

setCurrentController

public void setCurrentController(int controllertype,
                                 int controllernumber)
                          throws IXRawfileException
Sets the current controller in the raw file. This function must be called before subsequent calls to access data specific to a device controller (e.g. MS or UV data) may be made. All requests for data specific to a device controller will be forwarded to the current controller until the current controller is changed. The controller number is used to indicate which device controller to use if there are more than one registered device controller of the same type (e.g. multiple UV detectors). Controller numbers for each type are numbered starting at 1. See Controller Type in the Enumerated Types section for a list of the available controller types and their respective values.

Parameters:
controllertype - The type of controller for which information will be subsequently requested.
controllernumber - The number of the controller of the specified type (1-based).
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getCurrentController

public IXRawfile.Controller getCurrentController()
                                          throws IXRawfileException
Gets the current controller type and number for the raw file. The controller number is used to indicate which device controller to use if there are more than one registered device controller of the same type (e.g. multiple UV detectors). Controller numbers for each type are numbered starting at 1. See Controller Type in the Enumerated Types section for a list of the available controller types and their respective values.

Returns:
The current controller type and number for the raw file.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumSpectra

public int getNumSpectra()
                  throws IXRawfileException
Gets the number of spectra acquired by the current controller. For non-scanning devices like UV detectors, the number of readings per channel is returned.

Returns:
The number of spectra acquired by the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumStatusLog

public int getNumStatusLog()
                    throws IXRawfileException
Gets the number of status log entries recorded for the current controller.

Returns:
The number of status log entries recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumErrorLog

public int getNumErrorLog()
                   throws IXRawfileException
Gets the number of error log entries recorded for the current controller.

Returns:
The number of error log entries recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumTuneData

public int getNumTuneData()
                   throws IXRawfileException
Gets the number of tune data entries recorded for the current controller. Tune Data is only supported by MS controllers. Typically, if there is more than one tune data entry, each tune data entry corresponds to a particular acquisition segment.

Returns:
The number of tune data entries recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumTrailerExtra

public int getNumTrailerExtra()
                       throws IXRawfileException
Gets the trailer extra entries recorded for the current controller. Trailer extra entries are only supported for MS device controllers and is used to store instrument specific information for each scan if used.

Returns:
The trailer extra entries recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getMassResolution

public double getMassResolution()
                         throws IXRawfileException
Gets the mass resolution value recorded for the current controller. The value is returned as one half of the mass resolution. For example, a unit resolution controller would return a value of 0.5. This value is only relevant to scanning controllers such as MS.

Returns:
The resolution value recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getLowMass

public double getLowMass()
                  throws IXRawfileException
Gets the lowest mass or wavelength recorded for the current controller. This value is only relevant to scanning devices such as MS or PDA.

Returns:
The lowest mass or wavelength recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getHighMass

public double getHighMass()
                   throws IXRawfileException
Gets the highest mass or wavelength recorded for the current controller. This value is only relevant to scanning devices such as MS or PDA.

Returns:
The highest mass or wavelength recorded for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getStartTime

public double getStartTime()
                    throws IXRawfileException
Gets the start time of the first scan or reading for the current controller. This value is typically close to zero unless the device method contains a start delay.

Returns:
The start time of the first scan or reading for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getEndTime

public double getEndTime()
                  throws IXRawfileException
Gets the start time of the last scan or reading for the current controller.

Returns:
start time of the last scan or reading for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getMaxIntensity

public int getMaxIntensity()
                    throws IXRawfileException
Gets the highest base peak of all the scans for the current controller. This value is only relevant to MS device controllers.

Appears not to work and the int-value is weird for intensity.

Returns:
highest base peak of all the scans for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getFirstSpectrumNumber

public int getFirstSpectrumNumber()
                           throws IXRawfileException
Gets the first scan or reading number for the current controller. This value will always be one if data has been acquired.

Returns:
The first scan or reading number for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getLastSpectrumNumber

public int getLastSpectrumNumber()
                          throws IXRawfileException
Gets the last scan or reading number for the current controller.

Returns:
The last scan or reading number for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstrumentID

public int getInstrumentID()
                    throws IXRawfileException
Gets the instrument ID number for the current controller. This value is typically only set for raw files converted from other files formats.

Returns:
The instrument ID number for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInletID

public int getInletID()
               throws IXRawfileException
Gets the inlet ID number for the current controller. This value is typically only set for raw files converted from other files formats.

Returns:
The inlet ID number for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstName

public java.lang.String getInstName()
                             throws IXRawfileException
Returns the instrument name, if available, for the current controller.

Returns:
The instrument name, if available, for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstModel

public java.lang.String getInstModel()
                              throws IXRawfileException
Returns the instrument model, if available, for the current controller.

Returns:
The instrument model, if available, for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstSerialNumber

public java.lang.String getInstSerialNumber()
                                     throws IXRawfileException
Returns the serial number, if available, for the current controller.

Returns:
The serial number, if available, for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstSoftwareVersion

public java.lang.String getInstSoftwareVersion()
                                        throws IXRawfileException
Returns the current controller software revision information, if available.

Returns:
The current controller software revision information, if available.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstHardwareVersion

public java.lang.String getInstHardwareVersion()
                                        throws IXRawfileException
Returns the current controller hardware or firmware revision information, if available.

Returns:
The current controller hardware or firmware revision information, if available.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstFlags

public java.lang.String getInstFlags()
                              throws IXRawfileException
Returns the experiment flags, if available, for the current controller. The returned string may contain one or more fields denoting information about the type of experiment performed.

Returns:
The experiment flags, if available, for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstNumChannelLabels

public int getInstNumChannelLabels()
                            throws IXRawfileException
Returns the number of channel labels specified for the current controller. This field is only relevant to channel devices such as UV detectors, A/D cards, and Analog inputs. Typically, the number of channel labels, if labels are available, is the same as the number of configured channels for the current controller.

Returns:
The number of channel labels specified for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getInstChannelLabel

public java.lang.String getInstChannelLabel(int channelnumber)
                                     throws IXRawfileException
Returns the channel label, if available, at the specified index for the current controller. This field is only relevant to channel devices such as UV detectors, A/D cards, and Analog inputs. Channel labels indices are numbered starting at 0.

Parameters:
channelnumber - The index value of the channel number field to return.
Returns:
channel label, if available, at the specified index for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getFilters

public java.lang.String[] getFilters()
                              throws IXRawfileException
Returns the list of unique scan filters for the raw file. This function is only supported for MS device controllers. If the function succeeds, pvarFilterArray will point to an array of BSTR fields each containing a unique scan filter and pnArraySize will contain the number of scan filters in the pvarFilterArray.

Returns:
The list of unique scan filters for the raw file.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

scanNumFromRT

public int scanNumFromRT(double retentiontime)
                  throws IXRawfileException
Returns the closest matching scan number that corresponds to dRT for the current controller. For non scanning devices, such as UV, the closest reading number is returned. The value of dRT must be within the acquisition run time for the current controller. The acquisition run time for the current controller may be obtained by calling GetStartTime and GetEndTime.

Parameters:
retentiontime - The run time or retention time, in minutes, for which the closest scan number is to be returned.
Returns:
The closest matching scan number that corresponds to dRT for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

rtFromScanNum

public double rtFromScanNum(int scannumber)
                     throws IXRawfileException
Returns the closest matching run time or retention time that corresponds to nScanNumber for the current controller. For non scanning devices, such as UV, the nScanNumber is taken to be the reading number. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which the closest run time or retention time is to be returned.
Returns:
The closest matching run time or retention time that corresponds to nScanNumber for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getFilterForScanNum

public java.lang.String getFilterForScanNum(int scannumber)
                                     throws IXRawfileException
Returns the closest matching run time that corresponds to nScanNumber for the current controller. This function is only support for MS device controllers. The value of nScanNumber must be within the range of scans for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which the corresponding scan filter is to be returned (1-based).
Returns:
The closest matching run time that corresponds to nScanNumber for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getFilterForScanRT

public java.lang.String getFilterForScanRT(double retentiontime)
                                    throws IXRawfileException
Returns the closest matching run time that corresponds to nScanNumber for the current controller. This function is only support for MS device controllers. The value of nScanNumber must be within the range of scans for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
retentiontime - The scan number for which the corresponding scan filter is to be returned.
Returns:
The closest matching run time that corresponds to nScanNumber for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getMassListFromScanNum

public double[] getMassListFromScanNum(int scannumber,
                                       boolean centroid)
                                throws IXRawfileException
Returns the mass list array. The format of the mass list returned will be an array of double precision values in mass intensity pairs in ascending mass order (e.g. mass 1, intensity 1, mass 2, intensity 2, mass 3, intensity 3, etc.).

This function is only applicable to scanning devices such as MS and PDA. The scan corresponding to pnScanNumber will be returned. The requested scan number must be valid for the current controller. Valid scan number limits may be obtained by calling GetFirstSpectrumNumber and GetLastSpectrumNumber.

To have profile scans centroided, set centroid to TRUE. This parameter is ignored for centroid scans.

Parameters:
scannumber - The mass list array.
centroid - Set to true to have a profile scan centroided.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getPrecursorInfoFromScanNum

public IXRawfile.PrecursorInfo[] getPrecursorInfoFromScanNum(int scannumber)
                                                      throws IXRawfileException
This function is used to retrieve information about the parent scans of a data dependent MSn scan.

The precursor mass info is returned as a list of the IXRawfile.PrecursorInfo instances.

UNTESTED!

Parameters:
scannumber - The scannumber to retrieve the precursor info.
Returns:
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNoiseData

public java.util.Vector<IXRawfile.Noise> getNoiseData(int scannumber)
                                               throws IXRawfileException
Parameters:
scannumber -
Throws:
IXRawfileException

isProfileScanForScanNum

public boolean isProfileScanForScanNum(int scannumber)
                                throws IXRawfileException
Returns TRUE if the scan specified by nScanNumber is a profile scan, FALSE if the scan is a centroid scan. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which the profile data type information is to be returned.
Returns:
TRUE if the scan specified by nScanNumber is a profile scan, FALSE if the scan is a centroid scan.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

isCentroidScanForScanNum

public boolean isCentroidScanForScanNum(int scannumber)
                                 throws IXRawfileException
Returns TRUE if the scan specified by nScanNumber is a centroid scan, FALSE if the scan is a profile scan. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which the profile data type information is to be returned.
Returns:
TRUE if the scan specified by nScanNumber is a centroid scan, FALSE if the scan is a profile scan.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getScanHeaderInfoForScanNum

public IXRawfile.ScanHeaderInfo getScanHeaderInfoForScanNum(int scannumber)
                                                     throws IXRawfileException
For a given scan number, this function returns information from the scan header for the current controller. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

The validity of these parameters depends on the current controller. For example, pdLowMass, pdHighMass, pdTIC, pdBasePeakMass, and pdBasePeakIntensity are only likely to be set on return for MS or PDA controllers. PnNumChannels is only likely to be set on return for Analog, UV, and A/D Card controllers. PdUniformTime, and pdFrequency are only likely to be set on return for UV, and A/D Card controllers and may be valid for Analog controllers. In cases where the value is not set, a value of zero is returned.

Parameters:
scannumber - The scan number for which the scan header information is to be returned.
Returns:
The information from the scan header for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getStatusLogForScanNum

public java.util.HashMap<java.lang.String,java.lang.String> getStatusLogForScanNum(int scannumber)
                                                                            throws IXRawfileException
Returns the recorded status log entry labels and values for the current controller. The value of scannumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

On return, the label RT will contain the retention time at which the status log entry was recorded. This time may not be the same as the retention time corresponding to the specified scan number but will be the closest status log entry to the scan time.

Parameters:
scannumber - The scan number for which status log information is to be returned.
Returns:
The recorded status log entry labels and values for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getStatusLogLabelsForScanNum

public java.lang.String[] getStatusLogLabelsForScanNum(int scannumber)
                                                throws IXRawfileException
Returns the recorded status log entry labels for the current controller. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which status log information is to be returned.
Returns:
The recorded status log entry labels for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getStatusLogValueForScanNum

public java.lang.String getStatusLogValueForScanNum(int scannumber,
                                                    java.lang.String label)
                                             throws IXRawfileException
Returns the recorded status log parameter value for the specified status log parameter label for the current controller. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

To obtain a list of the status log parameter labels, call GetStatusLogLabelsForScanNum.

Parameters:
scannumber - The scan number for which status log information is to be returned.
label - A string containing the label for which the status log parameter value is to be returned.
Returns:
The recorded status log parameter value for the specified status log parameter label for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getTrailerExtraForScanNum

public java.util.HashMap<java.lang.String,java.lang.String> getTrailerExtraForScanNum(int scannumber)
                                                                               throws IXRawfileException
Returns the recorded trailer extra entry labels and values for the current controller. This function is only valid for MS controllers. The value of nScanNumber must be within the range of scans or readings for the current controller. The range of scan or readings for the current controller may be obtained by calling GetFirstScanNumber and GetLastScanNumber.

Parameters:
scannumber - The scan number for which trailer extra information is to be returned.
Returns:
The recorded trailer extra entry labels and values for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getErrorLogItem

public java.lang.String getErrorLogItem(int itemnumber)
                                 throws IXRawfileException
Returns the specified error log item information and the retention time at which the error occurred. The value of nItemNumber must be within the range of one to the number of error log items recorded for the current controller. The number of error log items for the current controller may be obtained by calling GetNumErrorLog.

Parameters:
itemnumber - The error log item number for which information is to be returned.
Returns:
The specified error log item information and the retention time at which the error occurred.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getTuneData

public java.util.HashMap<java.lang.String,java.lang.String> getTuneData(int segmentnumber)
                                                                 throws IXRawfileException
Returns the recorded tune parameter labels and values for the current controller. This function is only valid for MS controllers. The value of nSegmentNumber must be within the range of one to the number of tune data items recorded for the current controller. The number of tune data items for the current controller may be obtained by calling GetNumTuneData.

Parameters:
segmentnumber - The acquisition segment for which tune information is to be returned.
Returns:
The recorded tune parameter labels and values for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getNumInstMethods

public int getNumInstMethods()
                      throws IXRawfileException
Returns the number of instrument methods contained in the raw file. Each instrument used in the acquisition for which a method was created in Instrument Setup (e.g. autosampler, LC, MS, PDA) will have its instrument method contained in the raw file.

Returns:
The number of instrument methods contained in the raw file.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

GetInstMethod

public java.lang.String GetInstMethod(int methoditem)
                               throws IXRawfileException
Returns the channel label, if available, at the specified index for the current controller. This field is only relevant to channel devices such as UV detectors, A/D cards, and Analog inputs. Channel labels indices are numbered starting at 0.

Returns the instrument method, if available, at the index specified in methoditem. The instrument method indicies are numbered starting at 0. The number of instrument methods can be obtained by calling GetNumInstMethods.

Parameters:
methoditem - A long variable containing the index value of the instrument method to be returned.
Returns:
The channel label, if available, at the specified index for the current controller.
Throws:
IXRawfileException - 1 if successful; otherwise, see Error Codes.

getLabelData

public java.util.Vector<IXRawfile.Label> getLabelData(int scannumber)
                                               throws IXRawfileException
This method enables you to read the FT-PROFILE labels of a scan represented by the scanNumber. The label data contains values of mass (double), intensity (double), resolution (float), baseline (float), noise (float) and charge (int). The flags are returned as unsigned char values. There are the flags saturated, fragmented, merged, exception, reference and modified.

Parameters:
scannumber - The scan number for which the corresponding label data are to be returned.
Returns:
Throws:
IXRawfileException