Line | |
---|
1 | #include "Scantable.h" |
---|
2 | #include "STMath.h" |
---|
3 | #include "STFillerWrapper.h" |
---|
4 | #include <casa/Utilities/CountedPtr.h> |
---|
5 | #include <vector> |
---|
6 | #include <iostream> |
---|
7 | |
---|
8 | using namespace asap; |
---|
9 | using namespace std; |
---|
10 | |
---|
11 | int main() { |
---|
12 | const string fname0 = "/tmp/ASAP_problem/c082812231.rpf"; |
---|
13 | ScantableWrapper stw0(0); |
---|
14 | STFillerWrapper stf0(stw0); |
---|
15 | cout << "reading ..." << endl; |
---|
16 | stf0.open(fname0); |
---|
17 | stf0.read(); |
---|
18 | stf0.close(); |
---|
19 | |
---|
20 | STMath stm; |
---|
21 | vector<bool> msk; |
---|
22 | vector<casa::CountedPtr<Scantable> > l0; |
---|
23 | l0.push_back(stw0.getCP()); |
---|
24 | casa::CountedPtr<Scantable> av0 = stm.average(l0,msk, "NONE", "SCAN"); |
---|
25 | |
---|
26 | const string fname1 = "/tmp/ASAP_problem/c082880100.rpf"; |
---|
27 | ScantableWrapper stw1(0); |
---|
28 | STFillerWrapper stf1(stw1); |
---|
29 | cout << "reading ..." << endl; |
---|
30 | stf1.open(fname1); |
---|
31 | stf1.read(); |
---|
32 | stf1.close(); |
---|
33 | vector<casa::CountedPtr<Scantable> > l1; |
---|
34 | l1.push_back(stw1.getCP()); |
---|
35 | casa::CountedPtr<Scantable> av1 = stm.average(l1,msk, "NONE", "SCAN"); |
---|
36 | |
---|
37 | vector<casa::CountedPtr<Scantable> > on; |
---|
38 | on.push_back(av0); |
---|
39 | on.push_back(av1); |
---|
40 | |
---|
41 | casa::CountedPtr<Scantable> avst = stm.merge(on); |
---|
42 | //avst->makePersistent("t.asap"); |
---|
43 | return 0; |
---|
44 | |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.