Ignore:
Timestamp:
07/22/11 15:42:42 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: 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...

Added maxRow = 1 in selection using TableExprNode? when
finding at least one row is enough.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFrequencies.cpp

    r2242 r2243  
    116116                              uInt id )
    117117{
    118   Table t = table_(table_.col("ID") == Int(id) );
     118  Table t = table_(table_.col("ID") == Int(id), 1 );
    119119  if (t.nrow() == 0 ) {
    120120    throw(AipsError("STFrequencies::getEntry - freqID out of range"));
     
    130130void STFrequencies::setEntry( Double refpix, Double refval, Double inc, uInt id )
    131131{
    132   Table t = table_(table_.col("ID") == Int(id) );
     132  Table t = table_(table_.col("ID") == Int(id), 1 );
    133133  if (t.nrow() == 0 ) {
    134134    throw(AipsError("STFrequencies::getEntry - freqID out of range"));
     
    147147SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt id ) const
    148148{
    149   Table t = table_(table_.col("ID") == Int(id) );
     149  Table t = table_(table_.col("ID") == Int(id), 1 );
    150150
    151151  if (t.nrow() == 0 ) {
     
    309309  ostringstream oss;
    310310  if ( id < 0 ) t = table_;
    311   else  t = table_(table_.col("ID") == Int(id) );
     311  else  t = table_(table_.col("ID") == Int(id), 1 );
    312312  ROTableRow row(t);
    313313  for (uInt i=0; i<t.nrow(); ++i) {
     
    337337float STFrequencies::getRefFreq( uInt id, uInt channel )
    338338{
    339   Table t = table_(table_.col("ID") == Int(id) );
     339  Table t = table_(table_.col("ID") == Int(id), 1 );
    340340  if ( t.nrow() == 0 ) throw(AipsError("Selected Illegal frequency id"));
    341341  ROTableRow row(t);
     
    441441void STFrequencies::shiftRefPix(int npix, uInt id)
    442442{
    443   Table t = table_(table_.col("ID") == Int(id) );
     443  Table t = table_(table_.col("ID") == Int(id), 1 );
    444444  if ( t.nrow() == 0 ) throw(AipsError("Selected Illegal frequency id"));
    445445  ScalarColumn<Double> tcol(t, "REFPIX");
Note: See TracChangeset for help on using the changeset viewer.