Geometric parameters needed for a sky projection to a plane. More...
#include <Projection.h>
Public Types | |
enum | Type { AZP, SZP, TAN, SIN, STG, ARC, ZPN, ZEA, AIR, CYP, CAR, MER, CEA, COP, COD, COE, COO, BON, PCO, SFL, PAR, AIT, MOL, CSC, QSC, TSC, HPX, N_PROJ } |
Hold all the known types of celestial projections. More... | |
Public Member Functions | |
Projection (Projection::Type which=CAR) | |
Construct a projection which needs no parameters. | |
Projection (const String &ctypeLin, const String &ctypeLat, const Vector< Double > ¶meters) | |
Construct a projection from FITS CTYPE keywords. | |
Projection (Projection::Type which, const Vector< Double > ¶meters) | |
Construct a projection which needs parameters. | |
Projection (const Projection &other) | |
Copy constructor (copy semantics). | |
Projection & | operator= (const Projection &other) |
Assignment (copy semantics). | |
~Projection () | |
Destructor. | |
Projection::Type | type () const |
What is the Type of this projection? | |
String | name () const |
What is the type of this projection as a String (e.g. | |
const Vector< Double > & | parameters () const |
Bool | near (const Projection &other, Double tol=1.0e-6) const |
Comparison to fractional tolerance. | |
Static Public Member Functions | |
static String | name (Projection::Type proj) |
static Projection::Type | type (const String &name) |
Turn a projection type name into a Type. | |
static uInt | nParameters (Projection::Type proj) |
How many parameters does this projection have at most? What is the minimum number of parameters that have to be supplied? What are the parameter values? | |
static uInt | nMinParameters (Projection::Type proj) |
static Bool | isZenithal (Projection::Type proj) |
Is this projection a 'zenithal' projection. | |
Private Member Functions | |
void | validate (const Bool verbose=False) |
Projection::Type | type (String &ctypeLong, String &ctypeLat) const |
Private Attributes | |
Projection::Type | which_p |
Vector< Double > | parameters_p |
Geometric parameters needed for a sky projection to a plane.
Public interface
This class is used to hold:
Projection proj(Projection::CAR); cerr << proj.parameters() << endl;
This projection requires no parameters so the printed parameter vector would be of zero length.
Definition at line 95 of file Projection.h.
Hold all the known types of celestial projections.
Definition at line 99 of file Projection.h.
casacore::Projection::Projection | ( | Projection::Type | which = CAR |
) |
Construct a projection which needs no parameters.
SIN is unique in that it can be created with 0 or 2 parameters.
casacore::Projection::Projection | ( | const String & | ctypeLin, | |
const String & | ctypeLat, | |||
const Vector< Double > & | parameters | |||
) |
Construct a projection from FITS CTYPE keywords.
casacore::Projection::Projection | ( | Projection::Type | which, | |
const Vector< Double > & | parameters | |||
) |
Construct a projection which needs parameters.
The parameter vector must be the length of the required number of parameters.
casacore::Projection::Projection | ( | const Projection & | other | ) |
Copy constructor (copy semantics).
casacore::Projection::~Projection | ( | ) |
Destructor.
static Bool casacore::Projection::isZenithal | ( | Projection::Type | proj | ) | [static] |
Is this projection a 'zenithal' projection.
static String casacore::Projection::name | ( | Projection::Type | proj | ) | [static] |
String casacore::Projection::name | ( | ) | const |
What is the type of this projection as a String (e.g.
"SIN").
Bool casacore::Projection::near | ( | const Projection & | other, | |
Double | tol = 1.0e-6 | |||
) | const |
Comparison to fractional tolerance.
static uInt casacore::Projection::nMinParameters | ( | Projection::Type | proj | ) | [static] |
static uInt casacore::Projection::nParameters | ( | Projection::Type | proj | ) | [static] |
How many parameters does this projection have at most? What is the minimum number of parameters that have to be supplied? What are the parameter values?
Projection& casacore::Projection::operator= | ( | const Projection & | other | ) |
Assignment (copy semantics).
Definition at line 219 of file Projection.h.
References parameters_p.
Projection::Type casacore::Projection::type | ( | String & | ctypeLong, | |
String & | ctypeLat | |||
) | const [private] |
static Projection::Type casacore::Projection::type | ( | const String & | name | ) | [static] |
Turn a projection type name into a Type.
Returns N_PROJ if the projection is not known.
Projection::Type casacore::Projection::type | ( | ) | const [inline] |
What is the Type of this projection?
Definition at line 218 of file Projection.h.
References which_p.
Vector<Double> casacore::Projection::parameters_p [private] |
Definition at line 211 of file Projection.h.
Referenced by parameters().
Definition at line 210 of file Projection.h.
Referenced by type().