Ignore:
Timestamp:
02/16/10 16:21:26 (14 years ago)
Author:
WataruKawasaki
Message:

New Development: Yes

JIRA Issue: Yes (CAS-1800 + CAS-1807)

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: added parameters fitfunc for sdfit and clip, clipmaxmin, clipoutside for sdflag

Test Programs:

Put in Release Notes: No

Module(s): sdfit, sdflag

Description: Added a parameter for enabling Lorentzian line fitting with sdfit, and parameters for y-axis clipping with sdflag. Also 4 files for Lorentzian function class are (Lorentzian1D*) added.


File:
1 edited

Legend:

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

    r1656 r1700  
    701701  }
    702702  pushLog(String(oss));
     703}
     704
     705void Scantable::clip(const Float uthres, const Float dthres, bool clipoutside, bool unflag)
     706{
     707  for (uInt i=0; i<table_.nrow(); ++i) {
     708    Vector<Float> spcs = specCol_(i);
     709    Vector<uChar> flgs = flagsCol_(i);
     710    if (spcs.nelements() != nchan) {
     711      throw(AipsError("Data has incorrect number of channels"));
     712    }
     713    uChar userflag = 1 << 7;
     714    if (unflag) {
     715      userflag = 0 << 7;
     716    }
     717    if (clipoutside) {
     718      for (uInt j = 0; j < nchan; ++j) {
     719        Float spc = spcs(j);
     720        if ((spc >= uthres) || (spc <= dthres)) {
     721          flgs(j) = userflag;
     722        }
     723      }
     724    } else {
     725      for (uInt j = 0; j < nchan; ++j) {
     726        Float spc = spcs(j);
     727        if ((spc < uthres) && (spc > dthres)) {
     728          flgs(j) = userflag;
     729        }
     730      }
     731    }
     732    flagsCol_.put(i, flgs);
     733  }
    703734}
    704735
Note: See TracChangeset for help on using the changeset viewer.