Changeset 1682 for branches/alma/src


Ignore:
Timestamp:
02/02/10 18:47:39 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1823

Ready to Release: 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...

Bug fix.
Supported operation with 1D list with length of 1, and with 2D list with
shape of (1,1) or (1,nchan).


File:
1 edited

Legend:

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

    r1680 r1682  
    528528                                                     bool tsys )
    529529{
     530  if ( val.size() == 1 ){
     531    return unaryOperate( in, val[0], mode, tsys ) ;
     532  }
     533
    530534  // conformity of SPECTRA and TSYS
    531535  if ( tsys ) {
     
    557561  Vector<Float> fact( val ) ;
    558562  if ( fact.nelements() != mchans[0] ) {
    559     throw( AipsError("Vector size must be same as number of channel.") ) ;
     563    throw( AipsError("Vector size must be 1 or be same as number of channel.") ) ;
    560564  }
    561565
     
    600604                                                 bool tsys )
    601605{
     606  if ( val.size() == 1 ) {
     607    return unaryOperate( in, val[0], mode, tsys ) ;
     608  }
     609
    602610  // conformity of SPECTRA and TSYS
    603611  if ( tsys ) {
     
    618626  Vector<Float> fact( val ) ;
    619627  if ( fact.nelements() != in->nrow() ) {
    620     throw( AipsError("Vector size must be same as number of row.") ) ;
     628    throw( AipsError("Vector size must be 1 or be same as number of row.") ) ;
    621629  }
    622630
Note: See TracChangeset for help on using the changeset viewer.