Ignore:
Timestamp:
01/27/10 18:29:48 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1823

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: The mode parameter is added to scantable.scale() method.

Test Programs: s = sd.scantable('yourfile',False)

factor = []
for i in range(s.nrow()):

factor.append(i)

s2 = s + factor

Put in Release Notes: Yes

Module(s): -

Description: Describe your changes here...

Basic operations (addition, subtraction, multiplication, division)
of scantable with one dimensional list are implemented.
Size of list operand should be equal to either number of spectral channel
or number of row. In the former case, the list is operated as
channel-by-channel manner, while it is operated as row-by-row manner
in the latter case.
If number of spectral channel is equal to number of row, row-by-row
operation will be done.

The user is able to select operation mode (channel-by-channel or row-by-row)
manually by using lower level function, stmath.arrayop().

The scantable.scale() method is updated to allow list scaling factor.
Scaling is done in channel-by-channel manner if mode is set to 'channel',
while in row-by-row manner if mode is set to 'row'.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/STMath.h

    r1673 r1677  
    117117  casa::CountedPtr<Scantable>
    118118    unaryOperate( const casa::CountedPtr<Scantable>& in, float val,
     119                  const std::string& mode, bool tsys=false );
     120
     121  // array operation
     122  casa::CountedPtr<Scantable>
     123    arrayOperate( const casa::CountedPtr<Scantable>& in,
     124                  const std::vector<float> val,
     125                  const std::string& mode, bool tsys=false,
     126                  const std::string& op="channel" );
     127
     128  // channel operation
     129  casa::CountedPtr<Scantable>
     130    arrayOperateChannel( const casa::CountedPtr<Scantable>& in,
     131                         const std::vector<float> val,
     132                         const std::string& mode, bool tsys=false );
     133
     134  // row operation
     135  casa::CountedPtr<Scantable>
     136    arrayOperateRow( const casa::CountedPtr<Scantable>& in,
     137                     const std::vector<float> val,
     138                     const std::string& mode, bool tsys=false );
     139
     140  // 2d array operation
     141  casa::CountedPtr<Scantable>
     142    array2dOperate( const casa::CountedPtr<Scantable>& in,
     143                  const std::vector< std::vector<float> > val,
    119144                  const std::string& mode, bool tsys=false );
    120145
Note: See TracChangeset for help on using the changeset viewer.