Changeset 19
- Timestamp:
- 06/30/04 16:44:24 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.h
r18 r19 50 50 class SDMemTable { 51 51 public: 52 // create a new (empty) SDMemTable 52 53 SDMemTable(); 54 // create a SDMemTable from a )aips++) table on disk 53 55 SDMemTable(const std::string& name); 56 57 // Copy Construct a SDMemTable, if clear==True only header and 58 // skeleton are copied, otherwise the whole table is copied. 54 59 SDMemTable(const SDMemTable& other, Bool clear=False); 55 60 61 // Copy Construct a SDMemTable, give a scanid constraint 62 // see also getScan() 56 63 SDMemTable(const Table& tab, Int scanID); 64 57 65 virtual ~SDMemTable(); 66 67 // put data from meta conatiner into the table 58 68 virtual bool putSDContainer(const SDContainer& sdc); 59 69 virtual bool putSDHeader(const SDHeader& sdh); 60 70 virtual bool putSDFreqTable(const SDFrequencyTable& sdft) {;} 61 71 72 // get spectrum,mask and tsys for the given row, at the selected 73 // cursor 62 74 virtual std::vector<float> getSpectrum(Int whichRow) const; 63 75 virtual std::vector<bool> getMask(Int whichRow) const; 76 virtual Float getTsys(Int whichRow) const; 77 78 // get info fro current row 79 virtual Double getTime(Int whichRow) const ; 80 virtual std::string getSourceName(Int whichRow) const; 64 81 65 MaskedArray<Float> rowAsMaskedArray(uInt whichRow, 66 Bool useSelection = False); 67 68 virtual Float getTsys(Int whichRow) const; 69 virtual Double getTime(Int whichRow) const ; 70 virtual std::string getSourceName(Int whichRow) const ; 71 82 // set the current value 72 83 virtual bool setIF(Int whichIF=0); 73 84 virtual bool setBeam(Int whichBeam=0); … … 76 87 virtual bool setMask(const std::vector<int>& whichChans); 77 88 78 89 // return the currently selected values 79 90 virtual Int getIF() { return IFSel_; } 80 91 virtual Int getBeam() { return beamSel_; } 81 92 virtual Int getPol() { return polSel_; } 82 93 94 // print a summary to stdout 83 95 virtual void summary() const; 84 96 97 // the (irrelevant) name 85 98 std::string name() const; 99 100 // write to disk as aips++ table 86 101 void makePersistent(const std::string& filename); 102 103 // get a new SDMemTable containg all rows with the same give SCANID 87 104 SDMemTable getScan(Int scanID); 88 105 89 106 const TableRecord& getHeader() const {;} 107 // get a handle to the "raw" aips++ table 90 108 const Table& table() { return table_; } 91 109 110 // return the number of values 92 111 Int nBeam() const; 93 112 Int nIF() const; … … 95 114 Int nChan() const; 96 115 116 // return a row as a Masked array, internally converting uChar flags 117 // to bool mask 118 MaskedArray<Float> rowAsMaskedArray(uInt whichRow, 119 Bool useSelection = False); 120 97 121 private: 122 // set up tabel structure 98 123 void setup(); 99 124 // the current cursor into the array 100 125 Int IFSel_,beamSel_,polSel_; 101 std::vector<bool> chanMask_; 126 std::vector<bool> chanMask_; 102 127 String name_; 128 // the unerlying memory table 103 129 Table table_; 104 130 };
Note:
See TracChangeset
for help on using the changeset viewer.