Changeset 2985 for trunk


Ignore:
Timestamp:
08/15/14 15:14:57 (10 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-2356)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): asap.sbseparator

Description: Fixed a bug that causes the failure of execution when incriment of frequencies is negative.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSideBandSep.cpp

    r2976 r2985  
    397397    os << "Found IFNO = " << sigIfno_
    398398       << " in the first table." << LogIO::POST;
     399#ifdef KS_DEBUG
     400    cout << "Frequencies in the first table: freq0 = " << basech0 << ", incr = " << baseinc << ", nch = " << basench << endl;
     401#endif
    399402  }
    400403  if (ftol_.getUnit().empty()) {
    401404    // tolerance in unit of channels
    402     ftolval = ftol_.getValue() * baseinc;
     405    ftolval = abs(ftol_.getValue() * baseinc);
    403406  }
    404407  else {
    405     ftolval = ftol_.getValue("Hz");
     408    ftolval = abs(ftol_.getValue("Hz"));
    406409  }
    407410  inctolval = abs(baseinc/(double) basench);
    408411  const string poltype0 = stab->getPolType();
     412#ifdef KS_DEBUG
     413  cout << "Looking for pairs that satisfies freqtol = " << ftolval << ", inctol = " << inctolval << endl;
     414#endif
    409415
    410416  // Initialize shift values
     
    448454      double freq0, incr;
    449455      if ( getFreqInfo(stab, *iter, freq0, incr, nch) ){
     456#ifdef KS_DEBUG
     457        cout << "Checking IF=" << *iter << " int Table " << itab <<": freq0 = " << freq0 << ", incr = " << incr << ", nch = " << nch << endl;
     458        cout << "- number of channels: " << nch << endl;
     459        cout << "- chan0 difference: " << abs(freq0-basech0) << " (threshold: " << ftolval << ")" << endl;
     460        cout << "- inc difference: " << abs(incr-baseinc) << " (threshold: " << inctolval << ")" << endl;
     461#endif
    450462        if ( (nch == basench) && (abs(freq0-basech0) < ftolval)
    451463             && (abs(incr-baseinc) < inctolval) ){
Note: See TracChangeset for help on using the changeset viewer.