1 | #include <casa/aips.h>
|
---|
2 | #include <casa/iostream.h>
|
---|
3 | #include <casa/Inputs.h>
|
---|
4 | #include <tables/Tables/Table.h>
|
---|
5 | #include <tables/Tables/ScaColDesc.h>
|
---|
6 |
|
---|
7 | //#include <casa/namesapce.h>
|
---|
8 |
|
---|
9 | using namespace casacore;
|
---|
10 |
|
---|
11 | int main(int argc, const char* argv[]) {
|
---|
12 | // enable input in no-prompt mode
|
---|
13 | Input inputs(1);
|
---|
14 | // define the input structure
|
---|
15 | inputs.version("20090915MM");
|
---|
16 | inputs.create ("in", "", "Name of asap file", "string");
|
---|
17 | // Fill the input structure from the command line.
|
---|
18 | inputs.readArguments (argc, argv);
|
---|
19 | String fname = inputs.getString("in");
|
---|
20 | if ( fname.lastchar() == '/' )
|
---|
21 | fname = fname.substr(0,fname.length()-1) ;
|
---|
22 | Table origtab(fname);
|
---|
23 | fname +=".asap3";
|
---|
24 | //cout << "fname=" << fname << endl ;
|
---|
25 | origtab.deepCopy(fname, Table::New);
|
---|
26 | Table tab(fname, Table::Update);
|
---|
27 | tab.removeColumn("PARANGLE");
|
---|
28 | Table tfocus = tab.rwKeywordSet().asTable("FOCUS");
|
---|
29 | ScalarColumnDesc<Float> pa("PARANGLE");
|
---|
30 | pa.setDefault(Float(0.0));
|
---|
31 | tfocus.addColumn(pa);
|
---|
32 | //tfocus.rwKeywordSet().define("PARALLACTIFY", False)
|
---|
33 | Int verid=tab.rwKeywordSet().fieldNumber("VERSION");
|
---|
34 | tab.rwKeywordSet().define(verid,uInt(3));
|
---|
35 | tab.tableInfo().setType("Scantable");
|
---|
36 | cout << "WARNING: This has invalidated the parallactic angle in the data. Reprocess the data in ASAP 3 "
|
---|
37 | << "if you need to handle polarisation conversions"
|
---|
38 | << endl;
|
---|
39 | return 0;
|
---|
40 |
|
---|
41 | }
|
---|