diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 18:59:29 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 18:59:29 (GMT) |
commit | d4d595fa7fb12903db9227d33d48b2b00120dbd1 (patch) | |
tree | 7d18365de0d6d1b29399b6a17c7eb01c2eb3ed49 /tksao/frame/coord.h | |
parent | 949f96e29bfe0bd8710d775ce220e597064e2589 (diff) | |
download | blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.zip blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.gz blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.bz2 |
Initial commit
Diffstat (limited to 'tksao/frame/coord.h')
-rw-r--r-- | tksao/frame/coord.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tksao/frame/coord.h b/tksao/frame/coord.h new file mode 100644 index 0000000..d84f3ed --- /dev/null +++ b/tksao/frame/coord.h @@ -0,0 +1,54 @@ +// Copyright (C) 1999-2016 +// Smithsonian Astrophysical Observatory, Cambridge, MA, USA +// For conditions of distribution and use, see copyright notice in "copyright" + +#ifndef __coord_h__ +#define __coord_h__ + +#include <string.h> + +#include <iostream> +#include <sstream> +#include <iomanip> +using namespace std; + +class FitsImage; + +class Coord { + public: + enum InternalSystem {WINDOW, CANVAS, WIDGET, USER, REF, + PANNER, MAGNIFIER, PS}; + + enum CoordSystem {DATA, IMAGE, PHYSICAL, AMPLIFIER, DETECTOR, WCS, + WCSA, WCSB, WCSC, WCSD, WCSE, WCSF, WCSG, WCSH, WCSI, + WCSJ, WCSK, WCSL, WCSM, WCSN, WCSO, WCSP, WCSQ, WCSR, + WCSS, WCST, WCSU, WCSV, WCSW, WCSX, WCSY, WCSZ, WCS0}; + + enum SkyFrame {FK4, FK4_NO_E, FK5, ICRS, GALACTIC, SUPERGALACTIC, + ECLIPTIC, HELIOECLIPTIC}; + + enum SkyFormat {DEGREES, SEXAGESIMAL}; + enum SkyDist {DEGREE, ARCMIN, ARCSEC}; + enum AngleFormat {DEG, RAD}; + enum Orientation {NORMAL, XX, YY, XY}; + + public: + void listCoordSystem(ostream&, CoordSystem, SkyFrame, FitsImage*); + void listDistSystem(ostream&, CoordSystem, SkyDist, FitsImage*); + void listProsCoordSystem(ostream&, CoordSystem, SkyFrame); + + void strToCoordSystem(const char*, CoordSystem, CoordSystem*, SkyFrame*); + void strToSkyFormat(const char*, SkyFormat*); + void strToSkyDist(const char*, SkyDist*); + void strToDistSystem(const char*, CoordSystem, CoordSystem*, SkyDist*); + void strToAngleFormat(const char*, AngleFormat*); + + const char* coordSystemStr(int ii); + const char* skyFrameStr(int ii); + const char* skyFormatStr(int ii); + const char* skyDistStr(int ii); +}; + +extern Coord coord; + +#endif |