[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 1700 2010-02-16 05:21:26Z WataruKawasaki $
|
---|
[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)
|
---|
[1111] | 52 | .def("getifnos", &ScantableWrapper::getIFNos)
|
---|
[872] | 53 | .def("getbeam", &ScantableWrapper::getBeam)
|
---|
[1111] | 54 | .def("getbeamnos", &ScantableWrapper::getBeamNos)
|
---|
[872] | 55 | .def("getpol", &ScantableWrapper::getPol)
|
---|
[1111] | 56 | .def("getpolnos", &ScantableWrapper::getPolNos)
|
---|
[872] | 57 | .def("getscan", &ScantableWrapper::getScan)
|
---|
[1111] | 58 | .def("getscannos", &ScantableWrapper::getScanNos)
|
---|
[872] | 59 | .def("getcycle", &ScantableWrapper::getCycle)
|
---|
[1446] | 60 | .def("getmolnos", &ScantableWrapper::getMolNos)
|
---|
[902] | 61 | .def("nif", &ScantableWrapper::nif,
|
---|
| 62 | (boost::python::arg("scanno")=-1) )
|
---|
| 63 | .def("nbeam", &ScantableWrapper::nbeam,
|
---|
| 64 | (boost::python::arg("scanno")=-1) )
|
---|
| 65 | .def("npol", &ScantableWrapper::npol,
|
---|
| 66 | (boost::python::arg("scanno")=-1) )
|
---|
| 67 | .def("nchan", &ScantableWrapper::nchan,
|
---|
| 68 | (boost::python::arg("ifno")=-1) )
|
---|
| 69 | .def("ncycle", &ScantableWrapper::ncycle,
|
---|
| 70 | (boost::python::arg("scanno")=-1) )
|
---|
[872] | 71 | .def("nscan", &ScantableWrapper::nscan)
|
---|
| 72 | .def("nrow", &ScantableWrapper::nrow)
|
---|
| 73 | .def("get_fluxunit", &ScantableWrapper::getFluxUnit)
|
---|
| 74 | .def("set_fluxunit", &ScantableWrapper::setFluxUnit)
|
---|
| 75 | .def("_setInstrument", &ScantableWrapper::setInstrument)
|
---|
[1189] | 76 | .def("_setfeedtype", &ScantableWrapper::setFeedType)
|
---|
[872] | 77 | .def("_getspectrum", &ScantableWrapper::getSpectrum,
|
---|
[905] | 78 | (arg("whichrow")=0, arg("poltype")=std::string("")) )
|
---|
[896] | 79 | .def("poltype", &ScantableWrapper::getPolType )
|
---|
[1259] | 80 | .def("get_column_names", &ScantableWrapper::columnNames)
|
---|
[902] | 81 | .def("_getpollabel", &ScantableWrapper::getPolarizationLabel)
|
---|
[896] | 82 | .def("_setspectrum",&ScantableWrapper::setSpectrum,
|
---|
[884] | 83 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 84 | .def("_getabcissa", &ScantableWrapper::getAbcissa,
|
---|
[884] | 85 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 86 | .def("_getabcissalabel", &ScantableWrapper::getAbcissaLabel,
|
---|
[884] | 87 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 88 | .def("_getmask", &ScantableWrapper::getMask,
|
---|
[884] | 89 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 90 | .def("_gettsys", &ScantableWrapper::getTsys)
|
---|
| 91 | .def("_getsourcename", &ScantableWrapper::getSourceName,
|
---|
[884] | 92 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 93 | .def("_getelevation", &ScantableWrapper::getElevation,
|
---|
[884] | 94 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 95 | .def("_getazimuth", &ScantableWrapper::getAzimuth,
|
---|
[884] | 96 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 97 | .def("_getparangle", &ScantableWrapper::getParAngle,
|
---|
[884] | 98 | (boost::python::arg("whichrow")=0) )
|
---|
[872] | 99 | .def("_gettime", &ScantableWrapper::getTime,
|
---|
[884] | 100 | (boost::python::arg("whichrow")=0) )
|
---|
[1350] | 101 | .def("_getinttime", &ScantableWrapper::getIntTime,
|
---|
| 102 | (boost::python::arg("whichrow")=0) )
|
---|
[1068] | 103 | .def("_getdirection", &ScantableWrapper::getDirectionString,
|
---|
| 104 | (boost::python::arg("whichrow")=0) )
|
---|
[1387] | 105 | .def("get_antennaname", &ScantableWrapper::getAntennaName)
|
---|
[872] | 106 | .def("_flag", &ScantableWrapper::flag)
|
---|
[1656] | 107 | .def("_flag_row", &ScantableWrapper::flagRow)
|
---|
| 108 | .def("_getflagrow", &ScantableWrapper::getFlagRow,
|
---|
| 109 | (boost::python::arg("whichrow")=0) )
|
---|
[1700] | 110 | .def("_clip", &ScantableWrapper::clip,
|
---|
| 111 | (boost::python::arg("clipoutside")=true,
|
---|
| 112 | boost::python::arg("unflag")=false) )
|
---|
[872] | 113 | .def("_save", &ScantableWrapper::makePersistent)
|
---|
| 114 | .def("_summary", &ScantableWrapper::summary,
|
---|
[745] | 115 | (boost::python::arg("verbose")=true) )
|
---|
[1446] | 116 | //.def("_getrestfreqs", &ScantableWrapper::getRestFrequencies)
|
---|
| 117 | .def("_getrestfreqs", &ScantableWrapper::getRestFrequency)
|
---|
[925] | 118 | .def("_setrestfreqs", &ScantableWrapper::setRestFrequencies)
|
---|
[1360] | 119 | .def("shift_refpix", &ScantableWrapper::shift)
|
---|
[872] | 120 | .def("_setcoordinfo", &ScantableWrapper::setCoordInfo)
|
---|
| 121 | .def("_getcoordinfo", &ScantableWrapper::getCoordInfo)
|
---|
[987] | 122 | .def("set_dirframe", &ScantableWrapper::setDirection,
|
---|
| 123 | (boost::python::arg("refstr")="") )
|
---|
[872] | 124 | .def("_gethistory", &ScantableWrapper::getHistory)
|
---|
| 125 | .def("_addhistory", &ScantableWrapper::addHistory)
|
---|
| 126 | .def("_getselection", &ScantableWrapper::getSelection)
|
---|
| 127 | .def("_setselection", &ScantableWrapper::setSelection)
|
---|
| 128 | .def("_addfit", &ScantableWrapper::addFit)
|
---|
[972] | 129 | .def("_getfit", &ScantableWrapper::getFit)
|
---|
[872] | 130 | .def("_recalcazel", &ScantableWrapper::calculateAZEL)
|
---|
[1068] | 131 | .def("_setsourcetype", &ScantableWrapper::setSourceType)
|
---|
[1387] | 132 | .def("_getdirectionvec", &ScantableWrapper::getDirectionVector)
|
---|
[1446] | 133 | .def("_reshape", &ScantableWrapper::reshapeSpectrum,
|
---|
| 134 | (boost::python::arg("nmin")=-1,
|
---|
| 135 | boost::python::arg("nmax")=-1) )
|
---|
[2] | 136 | ;
|
---|
| 137 | };
|
---|
| 138 |
|
---|
| 139 | } // python
|
---|
[83] | 140 | } // asap
|
---|