[2] | 1 | //#---------------------------------------------------------------------------
|
---|
[872] | 2 | //# python_Scantable.cc: python exposure of c++ Scantable class
|
---|
[2] | 3 | //#---------------------------------------------------------------------------
|
---|
| 4 | //# Copyright (C) 2004
|
---|
[125] | 5 | //# ATNF
|
---|
[2] | 6 | //#
|
---|
| 7 | //# This program is free software; you can redistribute it and/or modify it
|
---|
| 8 | //# under the terms of the GNU General Public License as published by the Free
|
---|
| 9 | //# Software Foundation; either version 2 of the License, or (at your option)
|
---|
| 10 | //# any later version.
|
---|
| 11 | //#
|
---|
| 12 | //# This program is distributed in the hope that it will be useful, but
|
---|
| 13 | //# WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
---|
| 15 | //# Public License for more details.
|
---|
| 16 | //#
|
---|
| 17 | //# You should have received a copy of the GNU General Public License along
|
---|
| 18 | //# with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
| 19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
| 20 | //#
|
---|
| 21 | //# Correspondence concerning this software should be addressed as follows:
|
---|
| 22 | //# Internet email: Malte.Marquarding@csiro.au
|
---|
| 23 | //# Postal address: Malte Marquarding,
|
---|
| 24 | //# Australia Telescope National Facility,
|
---|
| 25 | //# P.O. Box 76,
|
---|
| 26 | //# Epping, NSW, 2121,
|
---|
| 27 | //# AUSTRALIA
|
---|
| 28 | //#
|
---|
[1068] | 29 | //# $Id: python_Scantable.cpp 1077 2006-07-06 01:28:10Z mar637 $
|
---|
[2] | 30 | //#---------------------------------------------------------------------------
|
---|
| 31 | #include <vector>
|
---|
| 32 |
|
---|
| 33 | #include <boost/python.hpp>
|
---|
[16] | 34 | #include <boost/python/args.hpp>
|
---|
[125] | 35 |
|
---|
[872] | 36 | #include "ScantableWrapper.h"
|
---|
[2] | 37 |
|
---|
| 38 | using namespace boost::python;
|
---|
| 39 |
|
---|
[83] | 40 | namespace asap {
|
---|
[2] | 41 | namespace python {
|
---|
| 42 |
|
---|
[872] | 43 | void python_Scantable() {
|
---|
| 44 | class_<ScantableWrapper>("Scantable")
|
---|
[96] | 45 | //.def( init <> () )
|
---|
[1077] | 46 | .def( init < int > () )
|
---|
| 47 | .def( init < const std::string&, int > () )
|
---|
[872] | 48 | .def( init < const ScantableWrapper& > () )
|
---|
| 49 | .def("_copy", &ScantableWrapper::copy)
|
---|
| 50 | .def("_assign", &ScantableWrapper::assign)
|
---|
| 51 | .def("getif", &ScantableWrapper::getIF)
|
---|
| 52 | .def("getbeam", &ScantableWrapper::getBeam)
|
---|
| 53 | .def("getpol", &ScantableWrapper::getPol)
|
---|
| 54 | .def("getscan", &ScantableWrapper::getScan)
|
---|
| 55 | .def("getcycle", &ScantableWrapper::getCycle)
|
---|
[902] | 56 | .def("nif", &ScantableWrapper::nif,
|
---|
| 57 | (boost::python::arg("scanno")=-1) )
|
---|
| 58 | .def("nbeam", &ScantableWrapper::nbeam,
|
---|
| 59 | (boost::python::arg("scanno")=-1) )
|
---|
| 60 | .def("npol", &ScantableWrapper::npol,
|
---|
| 61 | (boost::python::arg("scanno")=-1) )
|
---|
| 62 | .def("nchan", &ScantableWrapper::nchan,
|
---|
| 63 | (boost::python::arg("ifno")=-1) )
|
---|
| 64 | .def("ncycle", &ScantableWrapper::ncycle,
|
---|
| 65 | (boost::python::arg("scanno")=-1) )
|
---|
[872] | 66 | .def("nscan", &ScantableWrapper::nscan)
|
---|
| 67 | .def("nrow", &ScantableWrapper::nrow)
|
---|
| 68 | .def("get_fluxunit", &ScantableWrapper::getFluxUnit)
|
---|
| 69 | .def("set_fluxunit", &ScantableWrapper::setFluxUnit)
|
---|
| 70 | .def("_setInstrument", &ScantableWrapper::setInstrument)
|
---|
| 71 | .def("_getspectrum", &ScantableWrapper::getSpectrum,
|
---|
[905] | 72 | (arg("whichrow")=0, arg("poltype")=std::string("")) )
|
---|
[896] | 73 | .def("poltype", &ScantableWrapper::getPolType )
|
---|
[1003] | 74 | .def("column_names", &ScantableWrapper::columnNames)
|
---|
[902] | 75 | .def("_getpollabel", &ScantableWrapper::getPolarizationLabel)
|
---|
[896] | 76 | .def("_setspectrum",&ScantableWrapper::setSpectrum,
|
---|
[884] | 77 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 78 | .def("_getabcissa", &ScantableWrapper::getAbcissa,
|
---|
[884] | 79 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 80 | .def("_getabcissalabel", &ScantableWrapper::getAbcissaLabel,
|
---|
[884] | 81 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 82 | .def("_getmask", &ScantableWrapper::getMask,
|
---|
[884] | 83 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 84 | .def("_gettsys", &ScantableWrapper::getTsys)
|
---|
| 85 | .def("_getsourcename", &ScantableWrapper::getSourceName,
|
---|
[884] | 86 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 87 | .def("_getelevation", &ScantableWrapper::getElevation,
|
---|
[884] | 88 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 89 | .def("_getazimuth", &ScantableWrapper::getAzimuth,
|
---|
[884] | 90 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 91 | .def("_getparangle", &ScantableWrapper::getParAngle,
|
---|
[884] | 92 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 93 | .def("_gettime", &ScantableWrapper::getTime,
|
---|
[884] | 94 | (boost::python::arg("whichrow")=0) )
|
---|
[1068] | 95 | .def("_getdirection", &ScantableWrapper::getDirectionString,
|
---|
| 96 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 97 | .def("_flag", &ScantableWrapper::flag)
|
---|
| 98 | .def("_save", &ScantableWrapper::makePersistent)
|
---|
| 99 | .def("_summary", &ScantableWrapper::summary,
|
---|
[745] | 100 | (boost::python::arg("verbose")=true) )
|
---|
[872] | 101 | .def("_getrestfreqs", &ScantableWrapper::getRestFrequencies)
|
---|
[925] | 102 | .def("_setrestfreqs", &ScantableWrapper::setRestFrequencies)
|
---|
[872] | 103 | .def("_setcoordinfo", &ScantableWrapper::setCoordInfo)
|
---|
| 104 | .def("_getcoordinfo", &ScantableWrapper::getCoordInfo)
|
---|
[987] | 105 | .def("set_dirframe", &ScantableWrapper::setDirection,
|
---|
| 106 | (boost::python::arg("refstr")="") )
|
---|
[872] | 107 | .def("_gethistory", &ScantableWrapper::getHistory)
|
---|
| 108 | .def("_addhistory", &ScantableWrapper::addHistory)
|
---|
| 109 | .def("_getselection", &ScantableWrapper::getSelection)
|
---|
| 110 | .def("_setselection", &ScantableWrapper::setSelection)
|
---|
| 111 | .def("_addfit", &ScantableWrapper::addFit)
|
---|
[972] | 112 | .def("_getfit", &ScantableWrapper::getFit)
|
---|
[872] | 113 | .def("_recalcazel", &ScantableWrapper::calculateAZEL)
|
---|
[1068] | 114 | .def("_setsourcetype", &ScantableWrapper::setSourceType)
|
---|
[2] | 115 | ;
|
---|
| 116 | };
|
---|
| 117 |
|
---|
| 118 | } // python
|
---|
[83] | 119 | } // asap
|
---|