00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef MS_MSFITSOUTPUTASTRON_H
00029 #define MS_MSFITSOUTPUTASTRON_H
00030
00031
00032 #include <casacore/casa/aips.h>
00033
00034 namespace casacore {
00035
00036
00037 class String;
00038 class FitsOutput;
00039 class MeasurementSet;
00040 class Table;
00041 template<class T> class Block;
00042 template<class T> class Vector;
00043
00044
00045
00046
00047
00048
00049 class MSFitsOutputAstron
00050 {
00051 public:
00052
00053
00054
00055
00056
00057
00058 static Bool writeFitsFile(const String& fitsfile, const MeasurementSet& ms,
00059 const String& column, Int startchan=-1,
00060 Int nchan=-1, Int stepchan=-1,
00061 Bool writeSysCal = False,
00062 Bool asMultiSource = False, Bool combineSpw=False,
00063 Bool writeStation=False, Double sensitivity = 1.0);
00064
00065
00066 private:
00067
00068 static FitsOutput *writeMain(Int& refPixelFreq, Double& refFreq,
00069 Double& refFreq1, Double& chanbw,
00070 const String& outFITSFile,
00071 const MeasurementSet& rawms,
00072 const String& column,
00073 const Block<Int>& spwidMap,
00074 Int nrspw,
00075 Int startchan, Int nchan, Int stepchan,
00076 const Block<Int>& fieldidMap,
00077 Bool asMultiSource,
00078 Bool combineSpw);
00079
00080
00081
00082
00083 static Bool writeFQ(FitsOutput *output, const MeasurementSet& ms,
00084 const Block<Int>& spwidMap, Int nrspw,
00085 Double refFreq, Int refPixelFreq,
00086 Double chanbw, Bool combineSpw);
00087
00088
00089 static Bool writeAN(FitsOutput *output, const MeasurementSet& ms,
00090 Double refFreq, Bool writeStation);
00091
00092
00093 static Bool writeSU(FitsOutput *output, const MeasurementSet& ms,
00094 const Block<Int>& fieldidMap, Int nrfield,
00095 const Block<Int>& spwidMap, Int nrspw);
00096
00097
00098 static Bool writeTY(FitsOutput *output, const MeasurementSet& ms,
00099 const Table& syscal, const Block<Int>& spwidMap,
00100 uInt nrif, Bool combineSpw);
00101
00102
00103 static Bool writeGC(FitsOutput *output, const MeasurementSet& ms,
00104 const Table& syscal, const Block<Int>& spwidMap,
00105 uInt nrif, Bool combineSpw, Double sensitivity,
00106 Int refPixelFreq, Double refFreq, Double chanbw);
00107
00108
00109 static void timeToDay(Int& day, Double& dayFraction, Double time);
00110
00111
00112
00113 static void getStartHA (Double& startTime, Double& startHA,
00114 const MeasurementSet& ms, uInt rownr);
00115
00116
00117
00118 static Table handleSysCal (const MeasurementSet& ms,
00119 const Vector<Int>& spwids, Bool isSubset);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 static Int makeIdMap (Block<Int>& map, Vector<Int>& selids,
00131 const Vector<Int>& allids, Bool isSubset);
00132 };
00133
00134
00135
00136 }
00137
00138 #endif