Changeset 2437 for trunk/src/STMath.cpp


Ignore:
Timestamp:
03/16/12 17:53:28 (12 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: unit test of sdsmooth

Put in Release Notes: No

Module(s):

Description:

Changed the equation to calculate regridded spectral coordinate in
scantable.regrid_channel() so that it would have the same values as
the result of scantable.bin().
scantable.bin() now rebins Tsys arrays if necessary.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2429 r2437  
    19301930  ArrayColumn<Float> specCol(tout, "SPECTRA");
    19311931  ArrayColumn<uChar> flagCol(tout, "FLAGTRA");
     1932  ArrayColumn<Float> tsysCol(tout, "TSYS");
     1933
    19321934  for (uInt i=0; i < tout.nrow(); ++i ) {
    19331935    MaskedArray<Float> main  = maskedArray(specCol(i), flagCol(i));
    19341936    MaskedArray<Float> maout;
    19351937    LatticeUtilities::bin(maout, main, 0, Int(width));
    1936     /// @todo implement channel based tsys binning
    19371938    specCol.put(i, maout.getArray());
    19381939    flagCol.put(i, flagsFromMA(maout));
     1940    if (tsysCol(i).nelements() == specCol(i).nelements()) {
     1941      MaskedArray<Float> matsysin = maskedArray(tsysCol(i), flagCol(i));
     1942      MaskedArray<Float> matsysout;
     1943      LatticeUtilities::bin(matsysout, matsysin, 0, Int(width));
     1944      tsysCol.put(i, matsysout.getArray());
     1945    }
    19391946    // take only the first binned spectrum's length for the deprecated
    19401947    // global header item nChan
Note: See TracChangeset for help on using the changeset viewer.