Changeset 787


Ignore:
Timestamp:
12/08/05 13:58:59 (19 years ago)
Author:
phi196
Message:

Added get_elevation, azimuth and parangle

Location:
branches/Release12
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/Release12/python/__init__.py

    r773 r787  
    298298            get_time        - get the timestamps of the integrations
    299299            get_sourcename  - get the source names of the scans
     300            get_azimith     - get the azimuth of the scans
     301            get_elevation   - get the elevation of the scans
     302            get_parangle    - get the parallactic angle of the scans
    300303            get_unit        - get the currnt unit
    301304            set_unit        - set the abcissa unit to be used from this
  • branches/Release12/python/scantable.py

    r786 r787  
    429429    def get_sourcename(self, row=-1):
    430430        """
    431         Get a list source anmes for the observations.
     431        Get a list source names for the observations.
    432432        Return a string for each integration in the scantable.
    433433        Parameters:
     
    442442            if  0 <= row < self.nrow():
    443443                return self._getsourcename(row)
     444
     445    def get_elevation(self, row=-1):
     446        """
     447        Get a list of elevations for the observations.
     448        Return a float for each integration in the scantable.
     449        Parameters:
     450            row:    row no of integration. Default -1 return all rows
     451        Example:
     452            none
     453        """
     454        out = []
     455        if row == -1:
     456            return [self._getelevation(i) for i in range(self.nrow())]
     457        else:
     458            if  0 <= row < self.nrow():
     459                return self._getelevation(row)
     460
     461    def get_azimith(self, row=-1):
     462        """
     463        Get a list of azimuths for the observations.
     464        Return a float for each integration in the scantable.
     465        Parameters:
     466            row:    row no of integration. Default -1 return all rows
     467        Example:
     468            none
     469        """
     470        out = []
     471        if row == -1:
     472            return [self._getazimuth(i) for i in range(self.nrow())]
     473        else:
     474            if  0 <= row < self.nrow():
     475                return self._getazimuth(row)
     476
     477    def get_parangle(self, row=-1):
     478        """
     479        Get a list of parallactic angles for the observations.
     480        Return a float for each integration in the scantable.
     481        Parameters:
     482            row:    row no of integration. Default -1 return all rows
     483        Example:
     484            none
     485        """
     486        out = []
     487        if row == -1:
     488            return [self._getparangle(i) for i in range(self.nrow())]
     489        else:
     490            if  0 <= row < self.nrow():
     491                return self._getparangle(row)
    444492
    445493    def set_unit(self, unit='channel'):
  • branches/Release12/src/SDMemTable.cc

    r779 r787  
    244244  srcnCol_.get(whichRow, name);
    245245  return name;
     246}
     247
     248float SDMemTable::getElevation(Int whichRow) const
     249{
     250  float elevation;
     251  elCol_.get(whichRow, elevation);
     252  return elevation;
     253}
     254
     255float SDMemTable::getAzimuth(Int whichRow) const
     256{
     257  float azimuth;
     258  azCol_.get(whichRow, azimuth);
     259  return azimuth;
     260}
     261
     262float SDMemTable::getParAngle(Int whichRow) const
     263{
     264  float parangle;
     265  paraCol_.get(whichRow, parangle);
     266  return parangle;
    246267}
    247268
  • branches/Release12/src/SDMemTable.h

    r773 r787  
    147147
    148148  std::string getSourceName(casa::Int whichRow=0) const;
     149
     150  float getElevation(casa::Int whichRow=0) const;
     151  float getAzimuth(casa::Int whichRow=0) const;
     152  float getParAngle(casa::Int whichRow=0) const;
     153
    149154  double getInterval(casa::Int whichRow=0) const;
    150155
  • branches/Release12/src/SDMemTableWrapper.h

    r773 r787  
    136136  std::string getSourceName(int whichRow=0) {
    137137    return table_->getSourceName(whichRow);
     138  }
     139
     140  float getElevation(int whichRow=0) {
     141    return table_->getElevation(whichRow);
     142  }
     143  float getAzimuth(int whichRow=0) {
     144    return table_->getAzimuth(whichRow);
     145  }
     146  float getParAngle(int whichRow=0) {
     147    return table_->getParAngle(whichRow);
    138148  }
    139149
  • branches/Release12/src/python_SDMemTable.cc

    r773 r787  
    9393    .def("_getsourcename", &SDMemTableWrapper::getSourceName,
    9494         (boost::python::arg("whichRow")=0) )
     95    .def("_getelevation", &SDMemTableWrapper::getElevation,
     96         (boost::python::arg("whichRow")=0) )
     97    .def("_getazimuth", &SDMemTableWrapper::getAzimuth,
     98         (boost::python::arg("whichRow")=0) )
     99    .def("_getparangle", &SDMemTableWrapper::getParAngle,
     100         (boost::python::arg("whichRow")=0) )
    95101    .def("_gettime", &SDMemTableWrapper::getTime,
    96102         (boost::python::arg("whichRow")=0) )
Note: See TracChangeset for help on using the changeset viewer.