public class SpectralSimpleCube extends SimpleCube implements Spectral3d, SpectrumContainer<Double3d>
Some instantiations of SpectralSimpleCube might contain an error cube instead of a weight cube.
In order to make the spectrum toolboxes (ia.toolbox.spectrum) work there are provisions to convert these errors
into weights. These automatically kick in when getWeight()
is requested and no weight column could be found
but only an error column.
The toolbox operations would operate with the weights (possibly transforming them too) and then write back the
(transformed) flux and the error (after being on-the-fly converted from the weight).
See setWeight(herschel.ia.numeric.Double3d)
.
This behaviour can be turned off by using setAutoConversion(boolean)
. The default of autoConversion is True.
Product.DatasetProductLinkedHashMap
COVERAGE, EXPOSURE, IMAGE
ATTRIBUTES, CREATION_DATE, CREATOR, DESCRIPTION, END_DATE, FORMATV, FORMATV_DESCRIPTION, FORMATV_INIT_VALUE, HISTORY, INSTRUMENT, MODEL_NAME, START_DATE, TYPE, UNKNOWN
CLASS, OPERATIONS
Constructor and Description |
---|
SpectralSimpleCube()
Default Constructor.
|
SpectralSimpleCube(SimpleCube cube)
Copy Constructor from SimpleCube.
|
SpectralSimpleCube(SpectralSimpleCube original)
Copy Constructor.
|
SpectralSimpleCube(SpectrumContainer<?> s)
Constructor from a SpectrumContainer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
append(PointSpectrum spectrum)
Append a PointSpectrum to the container.
|
SpectralSimpleCube |
copy()
Copy from a SpectralSimpleCube.
|
ArrayData |
error2Weight(Double3d error)
Returns a weight, given an error, as weight = 1/error^2.
|
Set<String> |
getAttributeNames()
Returns the names of the attributes that can be looked up for all the
PointSpectrum 's
contained in the SpectrumContainer . |
int |
getColumnCount()
Returns the number of columns in a cube.
|
boolean |
getColumnFirst()
Returns the value of ColumnFirst.
|
String |
getCoordinateSystem()
Returns the Coordinate system.
|
String |
getDescription(String name)
Returns the Description of the Subset with name.
|
double |
getEquinox()
Returns the Epoch of the coordinate system.
|
Double3d |
getError()
Returns a reference to the error as a 3dim array.
|
Short2d |
getFlag(double wave)
Returns a copy of the flags pertaining to a 2-dim image nearest to wave.
|
Short1d |
getFlag(double lon,
double lat)
Returns a copy of the flags pertaining to a 1-dim spectrum nearest
to (lon,lat).
|
short |
getFlag(double lon,
double lat,
double wave)
Returns the flag of a pixel nearest to given positions.
|
Short2d |
getFlag(int depth)
Returns a copy of the flags pertaining to a 2-dim image at a depth.
|
Short1d |
getFlag(int row,
int col)
Returns a copy of the flags pertaining to a 1-dim spectrum at a (row,col).
|
short |
getFlag(int depth,
int row,
int col)
Returns the flag of a pixel at the given position.
|
Short3d |
getFlagArray()
Returns a reference to the flag as a 3dim integer array.
|
String |
getFlagDescription()
Returns the description of the flag.
|
Double3d |
getFlux()
Returns a reference to the flux as a 3dim array.
|
Numeric2dData |
getFlux(double wave)
Returns a copy of the flux of a 2-dim image nearest spectral position.
|
Numeric1dData |
getFlux(double lon,
double lat)
Returns a copy of the flux of a 1-dim spectrum nearest (lon,lat).
|
Number |
getFlux(double lon,
double lat,
double wave)
Returns the flux of a pixel at the given position.
|
Double2d |
getFlux(int depth)
Returns a copy of the flux of a 2-dim image at the given depth.
|
Double1d |
getFlux(int row,
int col)
Returns a copy of the flux of a 1-dim spectrum at the given (row,col).
|
Number |
getFlux(int depth,
int row,
int col)
Returns the flux of a pixel at the given position.
|
String |
getFluxDescription()
Returns the description of the flux.
|
Unit<?> |
getFluxUnit()
Returns the units of the flux.
|
int |
getIndex(int row,
int col)
Returns the index corresponding to [row,col].
|
SpectralSimpleCube |
getOutputTemplate()
Returns a copy of this container without the attribute objects.
|
SpectralSimpleCube |
getOutputTemplate(int size)
Return suitably initialized new instance of the given data structure.
|
SpectralSimpleCube |
getOutputTemplate(int[] imageSize)
Returns a container with given imagesize.
|
SpectralSimpleCube |
getOutputTemplate(int[] imageSize,
int[] spectralSize)
Returns a container with given imagesize and spectralsize.
|
SpectralSimpleCube |
getOutputTemplate(int[] imageSize,
int[] spectralSize,
int[] segmentIdx)
Returns a container with given imagesize and spectralsize.
|
SpectralSimpleCube |
getOutputTemplate(int size,
int[] segmentShape)
Return suitably initialized new instance of the given data structure.
|
SpectralSimpleCube |
getOutputTemplate(int size,
int[] segmentShape,
int[] segmentIdx)
Return suitably initialized new instance of the given data structure.
|
int |
getPlaneCount()
Returns the number of (image)planes in a cube.
|
PointSpectrum |
getPointSpectrum(int index)
Returns the PointSpectrum at the given index.
|
PointSpectrum |
getPointSpectrum(int row,
int col)
Returns the PointSpectrum at the given position.
|
int |
getPointSpectrumCount()
Returns the number of PointSpectrums present in the container.
|
int[] |
getPointSpectrumDimension()
Returns the dimensions of the image [nrow,ncol].
|
Iterator<PointSpectrum> |
getPointSpectrumIterator()
Returns a iterator over the PointSpectrums.
|
int |
getRank()
Rank of this spectral object.
|
int[] |
getRowCol(int index)
Returns the [row,col] corresponding to index.
|
int |
getRowCount()
Returns the number of rows in a cube.
|
int |
getSegmentCount()
Returns s the number of segments within this Spectrum implementation.
|
Set<String> |
getSegmentedNames()
Returns the Set of Segmented Attribute names.
|
int[] |
getSegmentIndices()
Returns a list of SpectralSegment indices in the PointSpectrum.
|
List<PointSpectrum> |
getSelection(SelectionModel selectionModel)
Returns a list of PointSpectrums present in the SelectionModel.
|
int |
getSize()
Returns the dimensions of the image [nrow,ncol].
|
SpectralSegment |
getSpectralSegment()
Get access to the first spectral segment within this Spectrum.
|
SpectralSegment |
getSpectralSegment(int index)
Get access to a specific spectral segment within this Spectrum.
|
SpectralSegment |
getSpectralSegment(int row,
int col)
Get access to a specific spectral segment within this Spectrum.
|
Iterator<SpectralSegment> |
getSpectralSegmentIterator()
Returns an iterator over SpectralSegment.
|
Iterator<SpectralSegment> |
getSpectralSegmentIterator(int index)
Returns iterator starting at this index.
|
Iterator<SpectralSegment> |
getSpectralSegmentIterator(int row,
int col)
Returns iterator starting at this row and col.
|
Spectrum1d |
getSpectrum1d(int row,
int col)
Returns the Spectrum1d at the given position.
|
ArrayDataset |
getSubset(String name)
Returns the subset (ArrayDataset); null if not found.
|
int |
getSubsetCount()
Returns the number of subsets.
|
String1d |
getSubsetNames()
Returns the names of the subsets.
|
Unit<?> |
getUnit()
Returns the unit of the cube.
|
Unit<?> |
getUnit(String name)
Returns the Unit of the Subset with name.
|
UnitInformation |
getUnitInformation()
Returns interface that provides access to the unit information of the data included in the container.
|
Double1d |
getWave()
Returns a copy the wave as a 1-dim array.
|
Double1d |
getWave(double lon,
double lat)
Returns the wave of a 1-dim spectrum nearest (lon,lat).
|
double |
getWave(int depth)
Returns the wave at the given depth.
|
Double1d |
getWave(int row,
int col)
Returns the wave of a 1-dim spectrum at the given (row,col).
|
double |
getWave(int depth,
int row,
int col)
Returns the wave of a pixel at the given position.
|
Double1d |
getWave(Unit<?> unit)
Returns a copy the wave as a 1-dim array in the requested unit.
|
String |
getWaveDescription()
Returns the description of the wave.
|
Unit<?> |
getWaveUnit()
Returns the units of the wave.
|
Double3d |
getWeight()
Returns a reference to the weight as a 3dim array.
|
Double2d |
getWeight(double wave)
Returns a copy of the weight of a 2-dim image nearest spectral position.
|
Double1d |
getWeight(double lon,
double lat)
Returns a copy of the weight of a 1-dim spectrum nearest (lon,lat).
|
double |
getWeight(double lon,
double lat,
double wave)
Returns the weight of a pixel at the given position.
|
Double2d |
getWeight(int depth)
Returns a copy of the weight of a 2-dim image at the given depth.
|
Double1d |
getWeight(int row,
int col)
Returns a copy of the weight of a 1-dim spectrum at the given (row,col).
|
double |
getWeight(int depth,
int row,
int col)
Returns the weight of a pixel at the given position.
|
String |
getWeightDescription()
Returns the description of the weight.
|
boolean |
hasError()
Returns true if a error dataset is present.
|
boolean |
hasSubset(String name)
Returns true if it has a subset of name.
|
boolean |
hasWeight()
Returns true if a weight dataset is present.
|
boolean |
include(PointSpectrum spectrum)
Include a PointSpectrum at its own location.
|
boolean |
include(PointSpectrum spectrum,
int index)
Include a PointSpectrum at a given index.
|
Iterator<SpectralSegment> |
iterator()
An iterator over all spectral segments.
|
int[] |
nearestPixels(double lon,
double lat)
Returns the nearest image pixels to a given (lon,lat).
|
int |
nearestPlane(double otherWave)
Returns the nearest (image)plane to a given wave.
|
void |
setAutoConversion(boolean val)
set automatic conversion from error to weight.
|
void |
setColumnFirst(boolean columnFirst)
Set the segment counter to Column first.
|
void |
setDescription(String name,
String desc)
Set the description of name.
|
void |
setError(Double3d error)
Set the error cube.
|
void |
setFlag(int row,
int col,
Int1d flag)
Set the flag of a 1-dim spectrum at the given (row,col).
|
void |
setFlag(int depth,
int row,
int col,
short flag)
Set the flag of a pixel at the given position.
|
void |
setFlag(int row,
int col,
Short1d flag)
Set the flag of a 1-dim spectrum at the given (row,col).
|
void |
setFlag(int depth,
Short2d flag)
Set the flag of a 2-dim image at the given depth.
|
void |
setFlag(Short3d flag)
Set the flag cube.
|
void |
setFlagDescription(String description)
Set the description of the flag.
|
void |
setFlux(Double3d flux)
Set the flux (==Image) cube.
|
void |
setFlux(int row,
int col,
Double1d flux)
Set the flux of a 1-dim spectrum at the given (row,col).
|
void |
setFlux(int depth,
int row,
int col,
Number flux)
Set the flux of a pixel at the given position.
|
void |
setFlux(int depth,
Numeric2dData flux)
Set the flux of a 2-dim image at the given depth.
|
void |
setFluxDescription(String description)
Set the description of the flux.
|
void |
setFluxUnit(Unit<?> unit)
Set the unit of the flux.
|
void |
setUnit(String name,
Unit<?> unit)
Set the units of name.
|
void |
setUnit(Unit<?> unit)
Sets the unit of the cube.
|
void |
setWave(Double1d wave)
Set the wave.
|
void |
setWave(Double1d double1d,
Unit<?> unit)
Set the wave.
|
void |
setWave(DoubleArray wave)
Set the wave.
|
void |
setWave(int depth,
double wave)
Set the wave of a 2-dim image at the given depth.
|
void |
setWave(int row,
int col,
Double1d wave)
Throws IndexOutOfBoundsException.
|
void |
setWave(int depth,
int row,
int col,
Number wave)
Throws IndexOutOfBoundsException.
|
void |
setWaveDescription(String description)
Set the description of the wave.
|
void |
setWaveUnit(Unit<?> unit)
Set the unit of the wave.
|
void |
setWeight(Double3d weight)
Set the weight cube.
|
void |
setWeight(int depth,
Double2d weight)
Set the weight of a 2-dim image at the given depth.
|
void |
setWeight(int row,
int col,
Double1d weight)
Set the weight of a 1-dim spectrum at the given (row,col).
|
void |
setWeight(int depth,
int row,
int col,
double weight)
Set the weight of a pixel at the given position.
|
void |
setWeightDescription(String description)
Set the description of the weight.
|
protected IndexIterator |
slice1d(int row,
int col,
int[] dim)
Returns a 1d slice of a cube at a image position.
|
protected IndexIterator |
slice2d(int depth,
int[] dim)
Returns a 2d slice of a cube at a spectral position.
|
ArrayData |
weight2Error(ArrayData weight)
Returns a error, given an weight, as error = 1/ SQRT(weight).
|
getCoverage, getDataset, getDepth, getDimensions, getExposure, getFlag, getHeight, getImage, getIntensity, getIntensityWorldCoordinates, getPixel, getPreview, getSimpleImage, getWcs, getWidth, hasCoverage, hasExposure, hasFlag, removeCoverage, removeError, removeExposure, removeFlag, setCoverage, setCoverage, setCoverage, setError, setError, setExposure, setExposure, setExposure, setFlag, setFlag, setImage, setImage, setImage, setIntensity, setUnit, setUnit, setWcs
accept, addProductListener, contentsToString, equals, getCreationDate, getCreator, getDefault, getDescription, getDuration, getDurationText, getEndDate, getFormatVersion, getHistory, getInstrument, getModelName, getOwner, getSets, getStartDate, getType, hashCode, removeProductListener, setCreationDate, setCreator, setDescription, setEndDate, setFormatVersion, setHistory, setInstrument, setMeta, setModelName, setOwner, setStartDate, setType
__getitem__, __setitem__, containsKey, get, getDataWrappers, getMeta, isEmpty, keySet, remove, set, size, targetChanged
getEventSupport, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
__add__, __div__, __iadd__, __idiv__, __imul__, __isub__, __mul__, __radd__, __rdiv__, __rmul__, __rsub__, __sub__, getSpectrumClass
getMeta, setMeta
forEach, spliterator
getDescription, setDescription
public SpectralSimpleCube()
public SpectralSimpleCube(SpectralSimpleCube original)
original
- the SpectralSimpleCube to be copiedpublic SpectralSimpleCube(SimpleCube cube)
cube
- the SimpleCube to be copiedpublic SpectralSimpleCube(SpectrumContainer<?> s)
s
- SpectrumContainer to be copied and converted into a Spectrum1dpublic SpectralSimpleCube copy()
public Iterator<SpectralSegment> iterator()
getSpectralSegmentIterator()
.public int getRank()
public int getSegmentCount()
getSegmentCount
in interface Spectral<Double3d>
public Iterator<SpectralSegment> getSpectralSegmentIterator()
getSpectralSegmentIterator
in interface Spectral<Double3d>
public Iterator<SpectralSegment> getSpectralSegmentIterator(int index)
index
- at this indexpublic Iterator<SpectralSegment> getSpectralSegmentIterator(int row, int col)
row
- at this rowcol
- at this columnpublic SpectralSegment getSpectralSegment(int index)
getSpectralSegment
in interface Spectral<Double3d>
index
- of the segmentpublic SpectralSegment getSpectralSegment(int row, int col)
row
- at this row (latitude)col
- at this column (longitude)public SpectralSegment getSpectralSegment()
public void setColumnFirst(boolean columnFirst)
columnFirst
- true for columns firstpublic final boolean getColumnFirst()
getColumnFirst
in interface Spectral3d
public int getIndex(int row, int col)
row
- the row (lat index)col
- the column (lon index)public int[] getRowCol(int index)
index
- the indexpublic ArrayDataset getSubset(String name)
public boolean hasSubset(String name)
public int getSubsetCount()
getSubsetCount
in interface Spectral<Double3d>
public String1d getSubsetNames()
getSubsetNames
in interface Spectral<Double3d>
public int getPlaneCount()
public int getRowCount()
getRowCount
in interface Spectral3d
public int getColumnCount()
getColumnCount
in interface Spectral3d
public Spectrum1d getSpectrum1d(int row, int col)
row
- the row (1st) indexcol
- the column (2nd) indexpublic Double3d getFlux()
public Double2d getFlux(int depth)
depth
- spectral depthpublic Double1d getFlux(int row, int col)
getFlux
in interface Spectral3d
row
- row indexcol
- col indexpublic Number getFlux(int depth, int row, int col)
depth
- spectral indexrow
- the row index of the imagecol
- the column indexpublic Numeric2dData getFlux(double wave)
wave
- spectral position to be searched for.public Numeric1dData getFlux(double lon, double lat)
lon
- longitude to be searched for.lat
- latitude to be searched for.public Number getFlux(double lon, double lat, double wave)
lon
- longitude to be searched for.lat
- latitude to be searched for.wave
- spectral position to be searched for.public void setFlux(Double3d flux)
public void setFlux(int depth, Numeric2dData flux)
depth
- spectral indexflux
- for the imagepublic void setFlux(int row, int col, Double1d flux)
setFlux
in interface Spectral3d
row
- the row indexcol
- the column indexflux
- for the spectrumpublic void setFlux(int depth, int row, int col, Number flux)
depth
- spectral indexrow
- the row indexcol
- the column indexflux
- for the pixelpublic Double1d getWave(Unit<?> unit)
unit
- the unit to return the wave in.public Double1d getWave()
public double getWave(int depth)
depth
- spectral indexpublic Double1d getWave(int row, int col)
getWave
in interface Spectral3d
row
- the row indexcol
- the column indexpublic double getWave(int depth, int row, int col)
depth
- spectral indexrow
- the row indexcol
- the column indexpublic Double1d getWave(double lon, double lat)
lon
- longitude to be searched for.lat
- latitude to be searched for.public void setWave(Double1d double1d, Unit<?> unit)
double1d
- assuming it is NOT equidistant (otherwise change Wcs).unit
- the unit in which the wave is given.public void setWave(Double1d wave)
setWave
in interface Spectral3d
wave
- assuming it is NOT equidistant (otherwise change Wcs).public void setWave(DoubleArray wave)
public void setWave(int depth, double wave)
depth
- spectral indexwave
- for the imagepublic void setWave(int row, int col, Double1d wave)
It is not possible to set the wave of a 1-dim spectrum at a given (row,col).
setWave
in interface Spectral3d
row
- the row indexcol
- the column indexwave
- for the spectrumIndexOutOfBoundsException
- It is not possible to set wave
at specific image locations.public void setWave(int depth, int row, int col, Number wave)
It is not possible to set the wave of a pixel at a given position.
depth
- spectral indexrow
- the row indexcol
- the column indexwave
- for the pixelpublic boolean hasWeight()
public boolean hasError()
public Double3d getWeight()
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
getWeight
in interface Spectral<Double3d>
IndexOutOfBoundsException
- when neither weight nor error is foundpublic Double2d getWeight(int depth)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
depth
- spectral indexpublic Double1d getWeight(int row, int col)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
getWeight
in interface Spectral3d
row
- the row indexcol
- the column indexpublic double getWeight(int depth, int row, int col)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
depth
- spectral indexrow
- the row indexcol
- the column indexpublic Double2d getWeight(double wave)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
wave
- spectral position to be searched for.public Double1d getWeight(double lon, double lat)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
lon
- longitude to be searched for.lat
- latitude to be searched for.public double getWeight(double lon, double lat, double wave)
In absence of a weight it tries to return the inverse square of the error, as a measure of the weight.
lon
- longitude to be searched for.lat
- latitude to be searched for.wave
- spectral position to be searched for.public void setWeight(Double3d weight)
For writing or replacing the following logic is used:
if ( weight cube is present ) replace it else if ( error cube is present ) replace it with 1 / sqrt(weight) else write new weight cube.
public void setWeight(int depth, Double2d weight)
for behaviour of weight/error see setWeight(Double3d)
depth
- spectral indexweight
- for the imagepublic void setWeight(int row, int col, Double1d weight)
for behaviour of weight/error see setWeight(Double3d)
setWeight
in interface Spectral3d
row
- the row indexcol
- the column indexweight
- for the spectrumpublic void setWeight(int depth, int row, int col, double weight)
for behaviour of weight/error see setWeight(Double3d)
depth
- spectral indexrow
- the row indexcol
- the column indexweight
- for the pixelpublic Double3d getError()
getError
in interface Cube
getError
in interface Spectral<Double3d>
getError
in class SimpleCube
IndexOutOfBoundsException
- when error is not foundpublic void setError(Double3d error)
For writing or replacing the following logic is used:
if ( weight cube is present ) replace it else if ( error cube is present ) replace it with 1 / sqrt(weight) else write new weight cube.
public void setAutoConversion(boolean val)
val
- false/truepublic ArrayData error2Weight(Double3d error)
Overload for other conversions.
error
- to be converted.public ArrayData weight2Error(ArrayData weight)
Overload for other conversions.
weight
- to be converted.public Short3d getFlagArray()
public Short2d getFlag(int depth)
depth
- spectral indexpublic Short1d getFlag(int row, int col)
getFlag
in interface Spectral3d
row
- the row indexcol
- the column indexpublic short getFlag(int depth, int row, int col)
depth
- spectral indexrow
- the row indexcol
- the column indexpublic Short2d getFlag(double wave)
wave
- spectral position to be searched for.public Short1d getFlag(double lon, double lat)
lon
- longitude to be searched for.lat
- latitude to be searched for.public short getFlag(double lon, double lat, double wave)
lon
- longitude to be searched for.lat
- latitude to be searched for.wave
- spectral position to be searched for.public void setFlag(Short3d flag)
flag
- the flagpublic void setFlag(int depth, Short2d flag)
depth
- spectral indexflag
- for the imagepublic void setFlag(int row, int col, Short1d flag)
setFlag
in interface Spectral3d
row
- the row indexcol
- the column indexflag
- for the spectrumpublic void setFlag(int row, int col, Int1d flag)
row
- the row indexcol
- the column indexflag
- for the spectrumpublic void setFlag(int depth, int row, int col, short flag)
depth
- spectral indexrow
- the row indexcol
- the column indexflag
- for the pixelpublic Unit<?> getUnit()
SimpleCube
getUnit
in interface Cube
getUnit
in class SimpleCube
public void setUnit(Unit<?> unit)
SimpleCube
setUnit
in interface Cube
setUnit
in class SimpleCube
unit
- The unit of the image/cubepublic Unit<?> getFluxUnit()
getFluxUnit
in interface Spectral<Double3d>
public Unit<?> getWaveUnit()
getWaveUnit
in interface Spectral<Double3d>
public Unit<?> getUnit(String name)
getUnit
in interface Spectral<Double3d>
getUnit
in class SimpleCube
name
- for which the Unit is requestedpublic String getDescription(String name)
getDescription
in interface Spectral<Double3d>
name
- for which the desription is requestedpublic String getFluxDescription()
getFluxDescription
in interface Spectral<Double3d>
public String getWaveDescription()
getWaveDescription
in interface Spectral<Double3d>
public String getWeightDescription()
getWeightDescription
in interface Spectral<Double3d>
public String getFlagDescription()
getFlagDescription
in interface Spectral<Double3d>
public String getCoordinateSystem()
getCoordinateSystem
in interface Spectral<Double3d>
public double getEquinox()
getEquinox
in interface Spectral<Double3d>
public void setFluxUnit(Unit<?> unit)
setFluxUnit
in interface Spectral<Double3d>
unit
- the unitpublic void setWaveUnit(Unit<?> unit)
setWaveUnit
in interface Spectral<Double3d>
unit
- the unitpublic void setUnit(String name, Unit<?> unit)
setUnit
in interface Spectral<Double3d>
setUnit
in class SimpleCube
name
- of subsetunit
- of subsetpublic void setDescription(String name, String desc)
setDescription
in interface Spectral<Double3d>
name
- of subsetdesc
- of subsetpublic void setFluxDescription(String description)
setFluxDescription
in interface Spectral<Double3d>
description
- the descriptionpublic void setWaveDescription(String description)
setWaveDescription
in interface Spectral<Double3d>
description
- the descriptionpublic void setWeightDescription(String description)
setWeightDescription
in interface Spectral<Double3d>
description
- the descriptionpublic void setFlagDescription(String description)
setFlagDescription
in interface Spectral<Double3d>
description
- the descriptionpublic int nearestPlane(double otherWave)
otherWave
- the wave to be searched for.public int[] nearestPixels(double lon, double lat)
lon
- longitude to be searched for.lat
- latitude to be searched for.public PointSpectrum getPointSpectrum(int index)
getSpectrum1d(int,int)
.getPointSpectrum
in interface Spectral<Double3d>
index
- the indexpublic PointSpectrum getPointSpectrum(int row, int col)
row
- the row (1st) indexcol
- the column (2nd) indexpublic int getPointSpectrumCount()
getPointSpectrumCount
in interface Spectral<Double3d>
public Iterator<PointSpectrum> getPointSpectrumIterator()
getPointSpectrumIterator
in interface Spectral<Double3d>
getPointSpectrumIterator
in interface SpectrumContainer<Double3d>
public List<PointSpectrum> getSelection(SelectionModel selectionModel)
getSelection
in interface SpectrumContainer<Double3d>
selectionModel
- the modelpublic int getSize()
getSize
in interface SpectrumContainer<Double3d>
public int[] getPointSpectrumDimension()
getPointSpectrumDimension
in interface SpectrumContainer<Double3d>
public Set<String> getSegmentedNames()
getSegmentedNames
in interface SpectrumContainer<Double3d>
public Set<String> getAttributeNames()
PointSpectrum
's
contained in the SpectrumContainer
.getAttributeNames
in interface SpectrumContainer<Double3d>
PointSpectrum
's
contained in the SpectrumContainer
.public int[] getSegmentIndices()
getSegmentIndices
in interface SpectrumContainer<Double3d>
public boolean include(PointSpectrum spectrum)
include
in interface SpectrumContainer<Double3d>
spectrum
- the PointSpectrumpublic boolean append(PointSpectrum spectrum)
append
in interface SpectrumContainer<Double3d>
spectrum
- the PointSpectrumpublic boolean include(PointSpectrum spectrum, int index)
include
in interface SpectrumContainer<Double3d>
spectrum
- the PointSpectrumindex
- the location where to put itpublic SpectralSimpleCube getOutputTemplate()
getOutputTemplate
in interface SpectrumContainer<Double3d>
public SpectralSimpleCube getOutputTemplate(int[] imageSize)
getOutputTemplate
in interface SpectrumContainer<Double3d>
imageSize
- 2-dim resize the image dimensions: [nlat,nlon]public SpectralSimpleCube getOutputTemplate(int[] imageSize, int[] spectralSize)
getOutputTemplate
in interface SpectrumContainer<Double3d>
imageSize
- 2-dim resize the image dimensions: [nlat,nlon]spectralSize
- 1-dim resize the spectral dimensions: [nspc]public SpectralSimpleCube getOutputTemplate(int[] imageSize, int[] spectralSize, int[] segmentIdx)
getOutputTemplate
in interface SpectrumContainer<Double3d>
imageSize
- 2-dim resize the image dimensions: [nlat,nlon]spectralSize
- 1-dim resize the spectral dimensions: [nspc]segmentIdx
- has no effectpublic SpectralSimpleCube getOutputTemplate(int size)
getOutputTemplate
in interface SpectrumContainer<Double3d>
size
- number of PointSpectrum
to be included in the container.public SpectralSimpleCube getOutputTemplate(int size, int[] segmentShape)
getOutputTemplate
in interface SpectrumContainer<Double3d>
size
- number of PointSpectrum
to be included in the container.segmentShape
- shape of the sub-segments of PointSpectrum
to be included in the container.public SpectralSimpleCube getOutputTemplate(int size, int[] segmentShape, int[] segmentIdx)
getOutputTemplate
in interface SpectrumContainer<Double3d>
size
- number of PointSpectrum
to be included in the container.segmentShape
- shape of the sub-segments of PointSpectrum
to be included in the container.segmentIdx
- the indices to be associated with the segments - take default if null.public UnitInformation getUnitInformation()
getUnitInformation
in interface SpectrumContainer<Double3d>
getUnitInformation
in interface UnitInformationHolder
protected IndexIterator slice2d(int depth, int[] dim)
depth
- the spectral slice positiondim
- the dimensions of the cubeprotected IndexIterator slice1d(int row, int col, int[] dim)
row
- the row positioncol
- the column positiondim
- the dimensions of the cube