source: trunk/src/RowAccumulator.h@ 1008

Last change on this file since 1008 was 831, checked in by mar637, 19 years ago

SDDefs -> STDefs

File size: 1.5 KB
RevLine 
[814]1//
2// C++ Interface: RowAccumulator
3//
4// Description:
5//
6//
7// Author: Malte Marquarding <Malte.Marquarding@csiro.au>, (C) 2005
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#include <casa/aips.h>
14#include <casa/Arrays/Vector.h>
15#include <casa/Arrays/MaskedArray.h>
[831]16#include "STDefs.h"
[814]17
18namespace asap {
19
20class RowAccumulator {
21
22
23public:
24
25 RowAccumulator(WeightType wt = asap::NONE);
26
27 ~RowAccumulator();
28
29 void add(const casa::Vector<casa::Float>& v,
30 const casa::Vector<casa::Bool>& m,
31 const casa::Vector<casa::Float>& tsys,
32 casa::Double interval,
33 casa::Double time);
34
35 void setUserMask(const casa::Vector<casa::Bool>& m);
36
37 casa::Vector<casa::Float> getSpectrum() const;
38 casa::Vector<casa::Float> getTsys() const;
39 casa::Vector<casa::Bool> getMask() const;
40
41 casa::Double getInterval() const;
42 casa::Double getTime() const;
43
44 void reset();
45
46private:
47 void addSpectrum( const casa::Vector<casa::Float>& v,
48 const casa::Vector<casa::Bool>& m,
49 casa::Float weight);
50
51 casa::Float addTsys(const casa::Vector<casa::Float>& v);
52 casa::Float addInterval(casa::Double inter);
53 void addTime(casa::Double t);
54
55 WeightType weightType_;
56 casa::Bool initialized_;
57 //these are a Vector
58 casa::MaskedArray<casa::Float> spectrum_;
59 casa::MaskedArray<casa::Float> n_, weightSum_;
60
61 casa::Vector<casa::Bool> userMask_;
62
63 casa::Vector<casa::Float> tsysSum_;
64 casa::Double timeSum_;
65 casa::Double intervalSum_;
66};
67
68}
Note: See TracBrowser for help on using the repository browser.