Package nom.tam.fits.header
Class Stokes.Parameters
java.lang.Object
nom.tam.fits.header.Stokes.Parameters
- Enclosing class:
- Stokes
Helper class for setting or interpreting a set of measured Stokes parameters stored along an array dimension. Two
instances of Stokes parameters are considered equal if they measure the same polarization terms, in the same
order.
- Since:
- 1.20
- Author:
- Attila Kovacs
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
fillImageHeader
(Header header, int coordinateIndex) Adds WCS description for the coordinate axis containing Stokes parameters.void
fillTableHeader
(Header header, int column, int coordinateIndex) Adds WCS description for the coordinate axis containing Stokes parameters to a table column containign images.int
Returns the Java array index corresponding to a given Stokes parameters for this set of parameters.Returns the ordered list of parameters, which can be used to translate array indexes to Stokes values, supported by this parameter set.getParameter
(int idx) Returns the Stokes parameter for a given Java array index for a dimension that corresponds to the Stokes parameters described by this instance.boolean
Checks if the parameters include circular polarization term(s).int
hashCode()
boolean
Checks if the parameters include linear polarization terms.boolean
Checks if the parameters are for measuring cross-polarization between two inputs.
-
Method Details
-
hashCode
public int hashCode() -
equals
-
isCrossPolarization
public boolean isCrossPolarization()Checks if the parameters are for measuring cross-polarization between two inputs.- Returns:
true
if it is for cross polarization, otherwisefalse
.
-
hasLinearPolarization
public boolean hasLinearPolarization()Checks if the parameters include linear polarization terms.- Returns:
true
if linear polarization is measured, otherwisefalse
.
-
hasCircularPolarization
public boolean hasCircularPolarization()Checks if the parameters include circular polarization term(s).- Returns:
true
if cirular cross polarization is measured, otherwisefalse
.
-
getParameter
Returns the Stokes parameter for a given Java array index for a dimension that corresponds to the Stokes parameters described by this instance.- Parameters:
idx
- the zero-based Java array index, typically [0:3] for single-ended polarization or circular or linear-only cross-polarization, or else [0:7] for full cross-polarization.- Returns:
- The specific Stokes parameter corresponding to the specified array index.
- Throws:
IndexOutOfBoundsException
- if the index is outside of the expected range.- Since:
- 1.19.1
- See Also:
-
getAvailableParameters
Returns the ordered list of parameters, which can be used to translate array indexes to Stokes values, supported by this parameter set.- Returns:
- the ordered list of available Stokes parameters in this measurement set.
- See Also:
-
getArrayIndex
Returns the Java array index corresponding to a given Stokes parameters for this set of parameters.- Parameters:
s
- the Stokes parameter of interest- Returns:
- the zero-based Java array index corresponding to the given Stokes parameter.
- Since:
- 1.20
- See Also:
-
fillImageHeader
Adds WCS description for the coordinate axis containing Stokes parameters. The header must already contain a NAXIS keyword specifying the dimensionality of the data, or else a FitsException will be thrown.- Parameters:
header
- the FITS header to populate (it must already have an NAXIS keyword present).coordinateIndex
- The 0-based Java coordinate index for the array dimension that corresponds to the stokes parameter.- Throws:
IndexOutOfBoundsException
- if the coordinate index is negative or out of bounds for the array dimensionsFitsException
- if the header does not contain an NAXIS keyword, or if the header is not accessible- Since:
- 1.20
- See Also:
-
fillTableHeader
public void fillTableHeader(Header header, int column, int coordinateIndex) throws IndexOutOfBoundsException, FitsException Adds WCS description for the coordinate axis containing Stokes parameters to a table column containign images.- Parameters:
header
- the binary table header to populate (it should already contain a TDIMn keyword for the specified column, or else 1D data is assumed).column
- the zero-based Java column index containing the 'image' array.coordinateIndex
- the zero-based Java coordinate index for the array dimension that corresponds to the stokes parameter.- Throws:
IndexOutOfBoundsException
- if the coordinate index is negative or out of bounds for the array dimensions, or if the column index is invalid.FitsException
- if the header does not specify the dimensionality of the array elements, or if the header is not accessible- Since:
- 1.20
- See Also:
-