geirs2Panic
Richard J. Mathar
Fits header keyword batch editor
|
#include <GeirsPanic.h>
Public Member Functions | |
GeirsPanic (char *fitsInname, const char *fitsOutname, int gap, int chpsz) | |
void | exec (bool doTrim, bool doMimax, double north, bool doflip, bool doaltaz, bool doGeo, bool verbose, bool remov) |
Modify the FITS header and optionally rotate/flip the image. More... | |
Static Public Member Functions | |
static void | wgs84 (const double lolatlat[3], double xyz[3]) |
Convert geographic longitude, latitude and sea leavel to geocentric Cartesian coords. More... | |
static void | altAzPar (double ha, double dec, double phi, double aap[3]) |
Derive altitude (complementary zenith), azimuth and paralactic angle. More... | |
static double | hex2deg (const string &hexstr, bool isdeg) |
Convert a sedecimal-String to degrees. More... | |
Public Attributes | |
string | iname |
Name of the input file. More... | |
string | oname |
Name of the output file. More... | |
WindowSet | ws |
The set of subwindows. More... | |
Protected Attributes | |
FITS * | ofits |
The FITS file that will be created. More... | |
GeirsPanic::GeirsPanic | ( | char * | fitsIname, |
const char * | fitsOname, | ||
int | gap, | ||
int | chpsz | ||
) |
[in] | fitsname | The name of the FITS file to be read. |
[in] | fitstpl | The name of the FITS file to be created. This may be the empty string ("") indicating that the file name is to be determined with a standard rule. |
[in] | gap | The gap between the chips of the mosaic in units of pixels. |
[in] | chpsz | The edge length of the single chip in pixel units. This would be 2048 for Hawaii2 and Hawaii2-RG, or 1024 for Hawaii1. |
void GeirsPanic::exec | ( | bool | doTrim, |
bool | doMimax, | ||
double | north, | ||
bool | doflip, | ||
bool | doaltaz, | ||
bool | doGeo, | ||
bool | verbose, | ||
bool | remov | ||
) |
Modify the FITS header and optionally rotate/flip the image.
[in] | doTrim | If true, remove (blanken) the 4 pixels at the edges of each detector. |
[in] | doMimax | If true, write DATAMIN, DATAMAX, DATAMED etc to the header. |
[in] | gap | The size of the crossing gap (pixels) in the mosaic. |
[in] | chpsz | The size of a single chip (pixels) of the mosaic. |
[in] | north | The direction angle of North in the current image (+90=up, +180 = left) |
[in] | doflip | If true, flip the image. The main idea is to trigger a swap of the Eastern side relative to North, if previously found to be wrong. There is of course an effect of this option on the direction of North in the final image, unless this was exactly +90 or -90. |
[in] | doaltaz | If true, derive ALT, AZ and PARANG from latitude, HA and DEC. Warning: this will only produce correct values if the keywords HA, DEC and GEOPOS_L are degrees in the original header, or HA and DEC are given in hex-decimal colon-separated notation. |
[in] | doGeo | If true, add OBSGEO-[XYZ] to the keywords. |
[in] | verbose | If true, write more verbose output. |
[in] | remov | If true, the initial file (or the initial file set if windowed) is removed on exit. This is always done if requested, and may lead to loss of data if anything is wrong with the new file that is created. |
If any keywords were changed or added, write a HISTORY line keeping track of the template file, and remove the CHECKSUM keyword if present.
|
static |
Convert geographic longitude, latitude and sea leavel to geocentric Cartesian coords.
[in] | lolatalt | The longitude (lambda, degrees), latitude (phi, degrees) and altitude (meters) of the site. The latitude is the topocentric one, not the geocentric one. |
[out] | xyz | The x, y and z coordinates in the Greenwhich centered coordinates (meters). |
|
static |
Derive altitude (complementary zenith), azimuth and paralactic angle.
Note that this will fail (drastically) if any of the units in the original header for the hour angle (HA), declination (DEC) or latitude (OBSGEO-L) were not degrees.
[in] | ha | Hour angle at the epoch (deg) |
[in] | dec | Declination at the epoch (deg). |
[in] | phi | Observer's latitude (deg). |
[out] | aap | The altitude (deg), azimuth (deg, South to West) and parallactic angle (deg) |
|
static |
Convert a sedecimal-String to degrees.
[in] | hexstr | A string with optional sign, integer number, colon, integer number, colon and integer or floating point number. |
[in] | isdeg | If 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. |
string GeirsPanic::iname |
Name of the input file.
This may also be the stem of the window set, without the _win*.fits.
string GeirsPanic::oname |
Name of the output file.
WindowSet GeirsPanic::ws |
The set of subwindows.
This may be a simple single full frame.
|
protected |
The FITS file that will be created.