TwoMassCnvrt  RichardJ.Mathar
Fitsheaderkeywordbatcheditor
 All Classes Files Functions Variables Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
TwoMassCnvrt Class Reference

#include <TwoMassCnvrt.h>

Public Member Functions

 TwoMassCnvrt (int detsiz, float pixsc, const std::string catdir)
 Constructor.
 
void skymakeList (double ra, double decl, float maglim, char band, float q, const bool geirs) const
 Create a Skymaker list of the field-of view on stdout.
 
void wcs (double ra, double decl) const
 Print the associated WCS keywords to the standard output.
 
void spdRange (double decl, int spd[2]) const
 Convert postition into an index of the catalog.
 
float mag2mag (float magI, int magidx, float q=1.) const
 Convert a H, J or Ks magnitude to a V magnitude.
 
std::string alpha2hex (double alpha) const
 Convert a reight ascension (radians) into the standard HH:MM:SS format.
 
std::string deg2hex (double delta) const
 Convert a declination (radians) into the standard DD:MM:SS format.
 

Static Public Member Functions

static double hex2deg (const std::string &hexstr, bool isdeg)
 Convert a sedecimal-String to degrees.
 

Public Attributes

int detsize
 2-sided field-of-viewk, expressed as the edge of the full detector in units of pixels.
 
float px
 Pixel scale in the FITS image [rad/px].
 
std::string catDir
 Directory of 2MASS catalog with the xxx/t*.cat * files.
 

Protected Member Functions

bool tanProj (double ra, double decl, double radec[2], int xy[2]) const
 Convert a sky coordinate (pair) to a pixel coordinate (pair) in tangential projection.
 

Constructor & Destructor Documentation

TwoMassCnvrt::TwoMassCnvrt ( int  detsiz,
float  pixsc,
const std::string  catdir 
)

Constructor.

Parameters
[in]detsiz
[in]pixsc
[in]catdir
Author
Richard J. Mathar
Since
2012-11-29

Member Function Documentation

void TwoMassCnvrt::skymakeList ( double  ra,
double  decl,
float  maglim,
char  band,
float  q,
const bool  geirs 
) const

Create a Skymaker list of the field-of view on stdout.

Parameters
[in]raRight ascension in the center of the chip [rad]
[in]declDeclination in the center of the chip [rad]
[in]maglimThe minimum limiting magnitude. Stars that are fainter are not added to the list of the output.
[in]bandOne of "J", "H" or "K"
[in]qquantum efficiency in the range 0 to 1.0.
[in]geirsIf true, generate GEIRS catalog, not skymaker catalog.
Author
Richard J. Mathar
Since
2012-11-29
2013-02-13 with additional geirs parameter
void TwoMassCnvrt::wcs ( double  ra,
double  decl 
) const

Print the associated WCS keywords to the standard output.

The FITS image that is created by this invocation of the Skymaker is oriented with North up and East to the left. There is currently no framework to create a more general sky rotation implied by some instrument specific optics.

In practise this means that the command line supports specification of the FITS images by ecliptic coordinates, but not by some mix of altitudes, azimuths or hour angles and geographic latitudes and similar sets of parameters.

Parameters
[in]raRight ascension in the center of the detector [rad]
[in]declDeclination in the center of the detector [rad]
void TwoMassCnvrt::spdRange ( double  decl,
int  spd[2] 
) const

Convert postition into an index of the catalog.

Parameters
[in]declThe pointing (declination) in the middle of the fov [rad]. The valid range is -1.57..1.57.
[out]spdThe lower and upper limit (exclusive) of the directory name. Both in the range 0 to 180.
Since
2012-12-10
float TwoMassCnvrt::mag2mag ( float  magI,
int  magidx,
float  q = 1. 
) const

Convert a H, J or Ks magnitude to a V magnitude.

This is only intended to be used for mimicking magnitudes for input to skymaker. The conversion computes a number of photons for the specified magnitude in the infrared and takes this number as the number of photons in the visible to obtain an "equivalent" magnitude in the visible.

Parameters
[in]magIThe magnitude in the infrared band.
[in]magidxThe integer value of the band. 0 for J, 1 for H and 2 for K.
[in]qA flux reducing quantum efficiency in the range 0 to 1.0.
Returns
magI converted to the visible.
Since
2012-12-22
string TwoMassCnvrt::alpha2hex ( double  alpha) const

Convert a reight ascension (radians) into the standard HH:MM:SS format.

Parameters
[in]alphaThe angle in radians
Returns
A string HH:MM:ss.ss equivalent to this angle.
string TwoMassCnvrt::deg2hex ( double  delta) const

Convert a declination (radians) into the standard DD:MM:SS format.

Parameters
[in]deltaThe angle in radians
Returns
A signed string +-DD:MM:ss.ss equivalent to this angle.
double TwoMassCnvrt::hex2deg ( const std::string &  hexstr,
bool  isdeg 
)
static

Convert a sedecimal-String to degrees.

Parameters
[in]hexstrA string with optional sign, integer number, colon, integer number, colon and integer or floating point number.
[in]isdegIf true, assume that the string is in DD:MM:SS.ss format. If false the string is in HH:MM:SS.ss format. This implies an additional factor 15 to move on to degrees. If the string contains a sign (plus or minus), this parameter is ignored and the function assumes degrees.
Returns
The value in degrees.
Since
2012-11-13
bool TwoMassCnvrt::tanProj ( double  ra,
double  decl,
double  radec[2],
int  xy[2] 
) const
protected

Convert a sky coordinate (pair) to a pixel coordinate (pair) in tangential projection.

Parameters
[in]raRA in the middle of the plate [rad]
[in]declDeclination in the middle of the plate [rad]
[in]radecThe ra and dec position of the object on the sky [rads]
[out]xySet to the FITS image coordinates if the return value is true.
Returns
true If the coordinate falls into the rectangular window of the detector.

Member Data Documentation

int TwoMassCnvrt::detsize

2-sided field-of-viewk, expressed as the edge of the full detector in units of pixels.

We only consider quadratic detectors. For a single Hawii2 chip, this is 2048, for example.

float TwoMassCnvrt::px

Pixel scale in the FITS image [rad/px].

Obtained from the [arcsec/px] number by multiplication with pi/(180*3600).

std::string TwoMassCnvrt::catDir

Directory of 2MASS catalog with the xxx/t*.cat * files.

For example "tmc1" indicates that tmc1/000/t*.cat up to tmc1/189/t*.cat are the files that have been processed by the tmcat expander.


The documentation for this class was generated from the following files: