Changeset 1682
- Timestamp:
- 02/02/10 18:47:39 (15 years ago)
- Location:
- branches/alma
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/asapmath.py
r1679 r1682 1060 1060 nrow = scan.nrow() 1061 1061 s = None 1062 if len( value ) != nrow: 1063 asaplog.push( 'len(value) must conform to scan.nrow()' ) 1062 if len( value ) == 1: 1063 from asap._asap import stmath 1064 stm = stmath() 1065 s = scantable( stm._arrayop( scan.copy(), value[0], mode, tsys ) ) 1066 del stm 1067 elif len( value ) != nrow: 1068 asaplog.push( 'len(value) must be 1 or conform to scan.nrow()' ) 1064 1069 print_log( 'ERROR' ) 1065 1070 else: -
branches/alma/src/STMath.cpp
r1680 r1682 528 528 bool tsys ) 529 529 { 530 if ( val.size() == 1 ){ 531 return unaryOperate( in, val[0], mode, tsys ) ; 532 } 533 530 534 // conformity of SPECTRA and TSYS 531 535 if ( tsys ) { … … 557 561 Vector<Float> fact( val ) ; 558 562 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.") ) ; 560 564 } 561 565 … … 600 604 bool tsys ) 601 605 { 606 if ( val.size() == 1 ) { 607 return unaryOperate( in, val[0], mode, tsys ) ; 608 } 609 602 610 // conformity of SPECTRA and TSYS 603 611 if ( tsys ) { … … 618 626 Vector<Float> fact( val ) ; 619 627 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.") ) ; 621 629 } 622 630
Note:
See TracChangeset
for help on using the changeset viewer.