Package jspecview.source
Class JDXDataObject
java.lang.Object
jspecview.source.JDXHeader
jspecview.source.JDXDataObject
- Direct Known Subclasses:
Spectrum
spectrum data AS READ FROM FILE
- Author:
- Bob Hanson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
static final double
Error number that is returned when a min value is undefineddouble
JDXReader onlydouble
JDXReader onlyint
JDXReader onlydouble
double
boolean
protected Spectrum
static final int
static final int
static final int
static final int
double
Also used in JDXExportprotected String
protected String
array of x,y coordinatesdouble
Also used in JDXExportprotected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
void
for JDXReader onlyvoid
copyTo
(JDXDataObject newObj) Object[]
int
double
Returns the delta XThe path to the filedouble
Returns the first X valuedouble
Returns the first Y valuestatic double
String[][]
int
double
getLastX()
Returns the last X valuedouble
getLastY()
Returns the last Y valuedouble
getMaxX()
Calculates and returns the maximum x value in the list of coordinates Fairly expensive operationdouble
getMaxY()
Calculates and returns the maximum y value in the list of coordinates Fairly expensive operationdouble
getMinX()
Calculates and returns the minimum x value in the list of coordinates Fairly expensive operationdouble
getMinY()
Calculates and returns the minimum y value in the list of coordinates Fairly expensive operationstatic int
getNominalSpecFreq
(String nuc, double freq) int
double
Returns the observed frequency (for NMR Spectra)^1H, ^13C, for exampledouble[]
getPeakListArray
(Measurement m, double[] last, double maxY) double
Returns the original x factorReturns the units for x-axis when spectrum is displayeddouble
getY2D()
double
double
Returns the original y factordouble
getYRef()
Returns the units for y-axis when spectrum is displayedboolean
is1D()
boolean
boolean
boolean
Returns true if spectrum is continuousboolean
isGC()
boolean
isHNMR()
Determines if a spectrum is an HNMR spectrumboolean
Determines if the spectrum should be displayed with abscissa unit of Part Per Million (PPM) instead of Hertz (HZ)boolean
boolean
boolean
isMS()
boolean
isNMR()
boolean
boolean
boolean
boolean
Returns true if the spectrum is increasing; used by SVGExporter onlyvoid
normalizeSimulation
(double max) void
setBlockID
(double id) void
setContinuous
(boolean val) Sets value to true if spectrum is continuousvoid
setFilePath
(String filePath) void
setHydrogenCount
(int nH) void
setHZtoPPM
(boolean val) Sets the value to true if the spectrum should be displayed with abscissa unit of Part Per Million (PPM) instead of Hertz (HZ)void
setIncreasing
(boolean val) Sets value to true if spectrum is increasingvoid
setInlineData
(String data) void
setNucleusAndFreq
(String nuc, boolean isX) void
setNumDim
(int n) void
setObservedFreq
(double observedFreq) Sets the Observed Frequency (for NMR Spectra)void
setObservedNucleus
(String value) void
setVarName
(String name) From ##VARNAMEvoid
setXFactor
(double xFactor) Sets the original xfactor, from JDXReader and XMLReadervoid
void
Sets the units for the x axisvoid
setXYCoords
(Coordinate[] coords) Sets the array of coordinatesvoid
setY2D
(double d) void
setY2DUnits
(String units) void
setYFactor
(double yFactor) Sets the original y factor, from JDXReader and XMLReadervoid
void
Sets the units for the y axisboolean
Determines if the plot should be displayed decreasing by defaultMethods inherited from class jspecview.source.JDXHeader
getDataClass, getDataType, getDate, getHeaderRowDataAsArray, getHeaderTable, getJcampdx, getLongDate, getOrigin, getOwner, getQualifiedDataType, getTime, getTitle, setDataClass, setDataType, setDate, setHeaderTable, setJcampdx, setLongDate, setOrigin, setOwner, setTime, setTitle
-
Field Details
-
ERROR
public static final double ERRORError number that is returned when a min value is undefined- See Also:
-
REF_TYPE_UNSPECIFIED
public static final int REF_TYPE_UNSPECIFIED- See Also:
-
REF_TYPE_STANDARD
public static final int REF_TYPE_STANDARD- See Also:
-
REF_TYPE_BRUKER
public static final int REF_TYPE_BRUKER- See Also:
-
REF_TYPE_VARIAN
public static final int REF_TYPE_VARIAN- See Also:
-
sourceID
-
isSimulation
public boolean isSimulation -
blockID
protected double blockID -
xyCoords
array of x,y coordinates -
fileFirstX
public double fileFirstXJDXReader only -
fileLastX
public double fileLastXJDXReader only -
fileNPoints
public int fileNPointsJDXReader only -
xFactor
public double xFactorAlso used in JDXExport -
yFactor
public double yFactorAlso used in JDXExport -
nucleusX
-
nucleusY
-
freq2dX
public double freq2dX -
freq2dY
public double freq2dY -
y2DUnits
-
parent
-
xUnits
-
yUnits
-
xLabel
-
yLabel
-
-
Constructor Details
-
JDXDataObject
public JDXDataObject()
-
-
Method Details
-
setInlineData
-
getInlineData
-
setFilePath
-
getFilePath
The path to the file- Returns:
- path to file or [inline] (if loaded inline)
-
getFilePathForwardSlash
-
setBlockID
public void setBlockID(double id) -
checkJDXRequiredTokens
for JDXReader only- Throws:
JSVException
-
setXFactor
public void setXFactor(double xFactor) Sets the original xfactor, from JDXReader and XMLReader- Parameters:
xFactor
- the x factor
-
getXFactor
public double getXFactor()Returns the original x factor- Returns:
- the original x factor
-
setYFactor
public void setYFactor(double yFactor) Sets the original y factor, from JDXReader and XMLReader- Parameters:
yFactor
- the y factor
-
getYFactor
public double getYFactor()Returns the original y factor- Returns:
- the original y factor
-
setVarName
From ##VARNAME- Parameters:
name
-
-
isImaginary
public boolean isImaginary() -
setXUnits
Sets the units for the x axis- Parameters:
xUnits
- the x units
-
getXUnits
Returns the units for x-axis when spectrum is displayed- Returns:
- the units for x-axis when spectrum is displayed
-
setYUnits
Sets the units for the y axis- Parameters:
yUnits
- the y units
-
getYUnits
Returns the units for y-axis when spectrum is displayed- Returns:
- the units for y-axis when spectrum is displayed
-
setXLabel
-
setYLabel
-
setObservedNucleus
-
getObservedNucleus
^1H, ^13C, for example- Returns:
- observedNucl
-
setObservedFreq
public void setObservedFreq(double observedFreq) Sets the Observed Frequency (for NMR Spectra)- Parameters:
observedFreq
- the observed frequency
-
getObservedFreq
public double getObservedFreq()Returns the observed frequency (for NMR Spectra)- Returns:
- the observed frequency (for NMR Spectra)
-
setHydrogenCount
public void setHydrogenCount(int nH) -
getHydrogenCount
public int getHydrogenCount() -
is1D
public boolean is1D() -
getNumDim
public int getNumDim() -
setNumDim
public void setNumDim(int n) -
setY2D
public void setY2D(double d) -
getY2D
public double getY2D() -
setY2DUnits
-
getY2DPPM
public double getY2DPPM() -
setNucleusAndFreq
-
getNominalSpecFreq
-
getGyromagneticRatio
-
isTransmittance
public boolean isTransmittance() -
isAbsorbance
public boolean isAbsorbance() -
canSaveAsJDX
public boolean canSaveAsJDX() -
canIntegrate
public boolean canIntegrate() -
isAutoOverlayFromJmolClick
public boolean isAutoOverlayFromJmolClick() -
isGC
public boolean isGC() -
isMS
public boolean isMS() -
isStackable
public boolean isStackable() -
isScalable
public boolean isScalable() -
getYRef
public double getYRef() -
isInverted
public boolean isInverted() -
canConvertTransAbs
public boolean canConvertTransAbs() -
canShowSolutionColor
public boolean canShowSolutionColor() -
isHZtoPPM
public boolean isHZtoPPM()Determines if the spectrum should be displayed with abscissa unit of Part Per Million (PPM) instead of Hertz (HZ)- Returns:
- true if abscissa unit should be PPM
-
setHZtoPPM
public void setHZtoPPM(boolean val) Sets the value to true if the spectrum should be displayed with abscissa unit of Part Per Million (PPM) instead of Hertz (HZ)- Parameters:
val
- true or false
-
setIncreasing
public void setIncreasing(boolean val) Sets value to true if spectrum is increasing- Parameters:
val
- true if spectrum is increasing
-
isXIncreasing
public boolean isXIncreasing()Returns true if the spectrum is increasing; used by SVGExporter only- Returns:
- true if the spectrum is increasing
-
shouldDisplayXAxisIncreasing
public boolean shouldDisplayXAxisIncreasing()Determines if the plot should be displayed decreasing by default- Returns:
- true or false
-
setContinuous
public void setContinuous(boolean val) Sets value to true if spectrum is continuous- Parameters:
val
- true if spectrum is continuous
-
isContinuous
public boolean isContinuous()Returns true if spectrum is continuous- Returns:
- true if spectrum is continuous
-
getHeaderRowDataAsArray
-
getDefaultUnitPrecision
public int getDefaultUnitPrecision() -
setMeasurementText
-
isNMR
public boolean isNMR() -
isHNMR
public boolean isHNMR()Determines if a spectrum is an HNMR spectrum- Returns:
- true if an HNMR, false otherwise
-
setXYCoords
Sets the array of coordinates- Parameters:
coords
- the array of Coordinates
-
invertYAxis
-
getFirstX
public double getFirstX()Returns the first X value- Returns:
- the first X value
-
getFirstY
public double getFirstY()Returns the first Y value- Returns:
- the first Y value
-
getLastX
public double getLastX()Returns the last X value- Returns:
- the last X value
-
getLastY
public double getLastY()Returns the last Y value- Returns:
- the last Y value
-
getMinX
public double getMinX()Calculates and returns the minimum x value in the list of coordinates Fairly expensive operation- Returns:
- the minimum x value in the list of coordinates
-
getMinY
public double getMinY()Calculates and returns the minimum y value in the list of coordinates Fairly expensive operation- Returns:
- the minimum x value in the list of coordinates
-
getMaxX
public double getMaxX()Calculates and returns the maximum x value in the list of coordinates Fairly expensive operation- Returns:
- the maximum x value in the list of coordinates
-
getMaxY
public double getMaxY()Calculates and returns the maximum y value in the list of coordinates Fairly expensive operation- Returns:
- the maximum y value in the list of coordinates
-
normalizeSimulation
public void normalizeSimulation(double max) -
getDeltaX
public double getDeltaX()Returns the delta X- Returns:
- the delta X
-
copyTo
-
getTypeLabel
-
getDefaultAnnotationInfo
-
getPeakListArray
-