source: branches/fitshead-branch/Detection/columns.hh @ 1441

Last change on this file since 1441 was 95, checked in by Matthew Whiting, 18 years ago

Large collection of changes. Mostly minor fixes, but major additions are:

  • ability to store flagMW in the recon FITS file
  • slight change to way precision is dealt with in output files
  • improvement to VOTable output
  • generalisation of spectral plotting.

Summary of changes:
duchamp.hh -- added keywords/comments for storing flagMW in FITS files
Utils/wcsFunctions.cc -- minor correction
Cubes/plotting.cc -- minor corrections
Cubes/saveImage.cc -- writing flagMW as header keyword
Cubes/readRecon.cc -- able to read in flagMW. Improved formatting of comments
Cubes/detectionIO.cc -- made VOTable output able to cope with Column

definitions. Added new columns.

Cubes/cubes.hh -- added frontends to wcs-pix functions. Changed prototypes

of some plotting functions.

Cubes/plots.hh -- generalised some functionality of the classes
Cubes/drawMomentCutout.cc -- made a class function
Cubes/outputSpectra.cc -- made a Cube class function that plots a

single spectrum.

param.cc -- improved calling of local variables, and the way units are

dealt with.

docs/example_moment_map.pdf -- new version
docs/cover_image.ps -- new version
docs/example_spectrum.pdf -- new version
docs/cover_image.pdf -- new version
docs/example_moment_map.ps -- new version
docs/example_spectrum.ps -- new version
mainDuchamp.cc -- fixed order of some function calls. Other minor corrections.
ATrous/atrous_2d_reconstruct.cc -- improved speed of loop execution
ATrous/atrous_3d_reconstruct.cc -- improved speed of loop execution
Makefile -- addition of columns.cc
Detection/detection.cc -- minor corrections (removal of commented code)
Detection/outputDetection.cc -- minor change to output style and

precision variable name.

Detection/columns.cc -- use new precision variable
Detection/columns.hh -- new precision variables for position and position

width columns

param.hh -- added prototype for makelower(string) function.

File size: 1.5 KB
Line 
1#ifndef COLUMNS_H
2#define COLUMNS_H
3
4#include <iostream>
5#include <iomanip>
6#include <string>
7#include <vector>
8
9using std::string;
10using std::vector;
11
12namespace Column
13{
14
15  const int fluxPrec=3, velPrec=3, xyzPrec=1, posPrec=6, wposPrec=2;
16
17  class Col{
18  public:
19    Col(){width=0;name="";unit="";};
20    Col(int w, string n, string u){width=w; name=n; unit=u;};
21    ~Col(){};
22    int widen(){width++;};
23    int getWidth(){return width;};
24    void setWidth(int i){width=i;};
25    string getName(){return name;};
26    void setName(string s){name=s;};
27    string getUnit(){return unit;};
28    void setUnit(string s){unit=s;};
29    void title(std::ostream &stream){
30      stream << std::setw(this->width) << this->name;};
31    void units(std::ostream &stream){
32      stream << std::setw(this->width) << this->unit;};
33    void dash (std::ostream &stream){
34      stream << std::setfill('-') << std::setw(this->width)
35             << ""<< std::setfill(' ');};
36    void blank(std::ostream &stream){
37      stream << std::setfill(' ') << std::setw(this->width) << "";};
38   
39    template <class type> void entry(std::ostream &stream, type e){
40      stream << std::setw(this->width) << e;};
41
42    int width;
43    string name;
44    string unit;
45  };
46
47  class ColSet{
48  public:
49    ColSet(){defined=false; inserted=false;}
50    ~ColSet(){};
51    vector<Col> vec;
52    bool defined;
53    bool inserted;
54    void addFluxCol(Col fluxCol){
55      if(!this->inserted) this->vec.insert(this->vec.begin()+11, fluxCol);
56      this->inserted = true;
57    }
58
59  };
60
61}
62
63
64#endif
65
Note: See TracBrowser for help on using the repository browser.