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