Changeset 2243


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.


Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFit.cpp

    r1932 r2243  
    9090  // replace
    9191  if ( id > -1 ) {
    92     Table t = table_(table_.col("ID") == id );
     92    Table t = table_(table_.col("ID") == id, 1 );
    9393    if (t.nrow() > 0) {
    9494      rno = t.rowNumbers(table_)[0];
     
    129129void STFit::getEntry( STFitEntry& fit, uInt id ) const
    130130{
    131   Table t = table_(table_.col("ID") == Int(id) );
     131  Table t = table_(table_.col("ID") == Int(id), 1 );
    132132  if (t.nrow() == 0 ) {
    133133    throw(AipsError("STFit::getEntry - id out of range"));
  • trunk/src/STFocus.cpp

    r2242 r2243  
    139139                                uInt id) const
    140140{
    141   Table t = table_(table_.col("ID") == Int(id) );
     141  Table t = table_(table_.col("ID") == Int(id), 1 );
    142142  if (t.nrow() == 0 ) {
    143143    throw(AipsError("STFocus::getEntry - id out of range"));
     
    161161{
    162162  Float total = 0.0f;
    163   Table t = table_(table_.col("ID") == Int(id) );
     163  Table t = table_(table_.col("ID") == Int(id), 1 );
    164164  if (t.nrow() == 0 ) {
    165165    throw(AipsError("STFocus::getTotalAngle - id out of range"));
     
    181181casa::Float STFocus::getFeedHand( casa::uInt id ) const
    182182{
    183   Table t = table_(table_.col("ID") == Int(id) );
     183  Table t = table_(table_.col("ID") == Int(id), 1 );
    184184  if (t.nrow() == 0 ) {
    185185    throw(AipsError("STFocus::getEntry - id out of range"));
  • 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");
  • trunk/src/STHistory.cpp

    r860 r2243  
    7171void asap::STHistory::getEntry( String& item, uInt id)
    7272{
    73   Table t = table_(table_.col("ID") == Int(id) );
     73  Table t = table_(table_.col("ID") == Int(id), 1 );
    7474  if (t.nrow() == 0 ) {
    7575    throw(AipsError("STHistory::getEntry - id out of range"));
  • trunk/src/STMolecules.cpp

    r2242 r2243  
    152152                            Vector<String>& formattedname, uInt id ) const
    153153{
    154   Table t = table_(table_.col("ID") == Int(id) );
     154  Table t = table_(table_.col("ID") == Int(id), 1 );
    155155  if (t.nrow() == 0 ) {
    156156    throw(AipsError("STMolecules::getEntry - id out of range"));
     
    182182{
    183183  std::vector<double> out;
    184   Table t = table_(table_.col("ID") == Int(id) );
     184  Table t = table_(table_.col("ID") == Int(id), 1 );
    185185  if (t.nrow() == 0 ) {
    186186    throw(AipsError("STMolecules::getRestFrequency - id out of range"));
  • trunk/src/STWeather.cpp

    r1481 r2243  
    110110                          uInt id ) const
    111111{
    112   Table t = table_(table_.col("ID") == Int(id) );
     112  Table t = table_(table_.col("ID") == Int(id), 1 );
    113113  if (t.nrow() == 0 ) {
    114114    throw(AipsError("STWeather::getEntry - id out of range"));
Note: See TracChangeset for help on using the changeset viewer.