public abstract class SpectralFits extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
SpectralFits.Slice
Class for ordering beam.index number to wavelength.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
LINEAR
Multiple beam in one aperture: interpolate linear to main beam.
|
private double |
ltm
Convert image pixel to physical pixels used for further processing.
|
private static String |
LTM
Header keyword for apertures.
|
private double |
ltv
Convert image pixel to physical pixels used for further processing.
|
private static String |
LTV
Header keyword for apertures.
|
private int |
multimethod
The method of interpolation on multiple beams per apertue.
|
private int |
npix |
private int |
nspec |
private float[][] |
raw
After construction, we have these arrays available.
|
private float[][] |
reduced
After construction, we have these arrays available.
|
private float[][] |
sigma
After construction, we have these arrays available.
|
static int |
SORT
Multiple beam in one aperture: sort and keep all.
|
private Function[] |
wavelength
The wavelength solution for the orders, parsed from the header.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SpectralFits(File io)
Constructs a SesFits from a file.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCentralOrderFromAngstrom(double lambda)
Return the orders where the specified wavelength fits best or -1 if no
such order is available.
|
int |
getHighestOrder()
Returns the array size, -1 if undefined.
|
protected int[] |
getIndexOfOrder(int order)
Default implementation says aperture number equals order number.
|
int |
getLowestOrder()
Default implementation return 0 for lowest order number, -1 if undefined.
|
int |
getMultiMethod()
In image slicers, we might have multiple beams per aperture.
|
protected int |
getOrderOfIndex(int index)
Default implementation says aperture number equals order number.
|
int[] |
getOrdersFromAngstrom(double lambda)
Return all orders where the specified wavelength can be found.
|
Vector3D[] |
getRawOrder(int order)
Returns the specified order as an array of wavelength vs.
|
Vector3D[] |
getReducedOrder(int order)
Returns the specified order as an array of wavelength vs.
|
private float[] |
interpolate(float[] beam,
Function lambda,
double[] wavgrid) |
private Vector3D[] |
interpolatedMultipleBeam(float[][] v2d,
int[] nn)
An order (aperture) consists of multiple beams.
|
protected Vector3D[] |
multipleBeam(float[][] v2d,
int[] nn)
An order (aperture) consists of multiple beams.
|
protected abstract Function[] |
parseWavelengthSolution(MHeader h)
Parses the wavelength soultion from the header.
|
void |
setMultiMethod(int multimethod)
Sets the method of choice on averaging multiple beams per aperture, a
situation that may be encountered in image slicers.
|
protected Vector3D[] |
singleBeam(float[][] v2d,
int n)
Single beam.
|
private Vector3D[] |
sortedMultipleBeam(float[][] v2d,
int[] nn)
An order (aperture) consists of multiple beams.
|
public static final int SORT
public static final int LINEAR
private static final String LTV
private static final String LTM
private double ltv
private double ltm
private float[][] reduced
private float[][] raw
private float[][] sigma
private Function[] wavelength
private int npix
private int nspec
private int multimethod
protected SpectralFits(File io) throws BasicFitsException, HeaderParsingException
protected int[] getIndexOfOrder(int order)
protected int getOrderOfIndex(int index)
public int getLowestOrder()
public int getHighestOrder()
public int getCentralOrderFromAngstrom(double lambda)
lambda - The wavelength in Angstrom.public int[] getOrdersFromAngstrom(double lambda)
lambda - The wavelength in Angstrom.public Vector3D[] getReducedOrder(int order)
FitsException - If the requested order cannot be reachedprotected Vector3D[] singleBeam(float[][] v2d, int n)
v2d - Data array, index number, intensityn - indexpublic int getMultiMethod()
SORT and LINEAR.public void setMultiMethod(int multimethod)
SORT and LINEAR.multimethod - the multimethod to setprotected Vector3D[] multipleBeam(float[][] v2d, int[] nn)
v2d - Data array, index number, intensitynn - The indices of all beamsprivate Vector3D[] sortedMultipleBeam(float[][] v2d, int[] nn)
v2d - Data array, index number, intensitynn - The indices of all beamsprivate Vector3D[] interpolatedMultipleBeam(float[][] v2d, int[] nn)
v2d - Data array, index number, intensitynn - The indices of all beamsprivate float[] interpolate(float[] beam,
Function lambda,
double[] wavgrid)
beam - The pixel-to-pixel intensitieslambda - The wavelength solution converting indices to angstroemwavgrid - The intensities should be interpolated at these wavelength.public Vector3D[] getRawOrder(int order)
protected abstract Function[] parseWavelengthSolution(MHeader h) throws HeaderParsingException
HeaderParsingException