summaryrefslogtreecommitdiffstats
path: root/tksao/fitsy++/hpx.h
blob: e9666ef1ab53299452400ad3c07a3da4a0991573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __fitshpx_h__
#define __fitshpx_h__

#include "vector.h"
#include "file.h"

class FitsHPX : public FitsFile {
 public:
  enum Order {RING, NESTED};
  enum CoordSys {UNKNOWN, EQU, GAL, ECL};
  enum Layout {EQUATOR=0, NORTH=1, SOUTH=2};

 private:
  Order order_;
  CoordSys coord_;
  Layout layout_;
  int quad_;
  long nside_;

  FitsBinColumn* col_;

  void build(FitsFile*);
  void initHeader(FitsFile*);
  void swap();
  void NESTidx(int nside, int facet, int rotn, int jmap, long *healidx);
  void RINGidx(int nside, int facet, int rotn, int jmap, long *healidx);

 public:
  FitsHPX(FitsFile*, Order, CoordSys, Layout, int, int);
  ~FitsHPX();
};

#endif