source: tags/asap-4.4.0+atnf1~deb9u1/apps/asap2to3.cpp@ 3143

Last change on this file since 3143 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 1.3 KB
Line 
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
9using namespace casacore;
10
11int 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}
Note: See TracBrowser for help on using the repository browser.