source: tags/release-1.1.12/src/FitsIO/DuchampBeam.hh

Last change on this file was 795, checked in by MatthewWhiting, 13 years ago

Getting the integrated flux units right - needed to reorder the way we called certain functions, so that we didn't set the integrated flux units too early.

File size: 1.2 KB
Line 
1#ifndef DUCHAMP_DUCHAMPBEAM_HH
2#define DUCHAMP_DUCHAMPBEAM_HH
3#include <duchamp/duchamp.hh>
4#include <duchamp/FitsIO/Beam.hh>
5
6#include <fitsio.h>
7
8namespace duchamp
9{
10 
11  enum BEAM_ORIGIN { EMPTY,HEADER, PARAM };
12  class Param;
13
14  class DuchampBeam : public Beam
15  {
16  public:
17    DuchampBeam();
18    DuchampBeam(float maj, float min, float pa);
19    virtual ~DuchampBeam(){};
20    DuchampBeam(const Beam &b);
21    DuchampBeam(const DuchampBeam &b);
22    DuchampBeam& operator=(const DuchampBeam &b);
23
24    void empty();
25    void define(float maj, float min, float pa, BEAM_ORIGIN origin);
26    void setFWHM(float fwhm, BEAM_ORIGIN origin);
27    void setArea(float area, BEAM_ORIGIN origin);
28
29    BEAM_ORIGIN origin(){return itsOrigin;};
30    std::string originString();
31    bool isDefined(){return (itsOrigin != EMPTY);};
32   
33    void define(Param &par,bool warn=true); // do we need this? How to define directly?
34
35    void readFromFITS(fitsfile *fptr, Param &par, float pixelScale); // read from file a la headerIO.cc
36    void writeToFITS(fitsfile *fptr); // write to file, but only if itsOrigin==HEADER. Use cfitsio commands directly.
37
38  protected:
39    BEAM_ORIGIN itsOrigin;
40
41  };
42
43}
44
45#endif
Note: See TracBrowser for help on using the repository browser.