Changeset 536


Ignore:
Timestamp:
03/08/05 11:36:26 (19 years ago)
Author:
kil064
Message:

add 'TINTSYS' weighting to averageTime

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMath.cc

    r532 r536  
    267267     scanIDCol.attach(tabIn, "SCANID");
    268268
    269 // Find list of start/end rows for each scan
    270 
    271269// Loop over rows in Table
    272270
     
    18331831         itMask.next();
    18341832      }
    1835    } else if (wtType==TSYS) {
     1833   } else if (wtType==TSYS || wtType==TINTSYS) {
    18361834
    18371835// We are going to average the data, weighted by 1/Tsys**2 for each pol, beam and IF.
     
    18431841      VectorIterator<Float> itData(valuesIn, axis);
    18441842      ReadOnlyVectorIterator<Float> itTSys(tSys, axis);
     1843      IPosition pos(nAxesSub,0); 
     1844//
    18451845      Float fac = 1.0;
    1846       IPosition pos(nAxesSub,0); 
    1847 //
     1846      if (wtType==TINTSYS) fac *= interval;
    18481847      while (!itData.pastEnd()) {
    18491848         Float t = itTSys.vector()[0];
    1850          fac = 1.0/t/t;
     1849         fac *= 1.0/t/t;
    18511850
    18521851// Scale data
     
    19151914         itData.next();
    19161915      }
    1917    } else if (wtType==TSYS) {
     1916   } else if (wtType==TSYS || wtType==TINTSYS) {
    19181917   
    1919 // Normalize each spectrum by sum(1/Tsys**2) where the pseudo
     1918// Normalize each spectrum by sum(1/Tsys**2) (TSYS) or
     1919// sum(Tint/Tsys**2) (TINTSYS) where the pseudo
    19201920// replication over channel for Tsys has been dropped.
    19211921
     
    19741974     wtType = VAR;
    19751975     msg = String("Weighting type selected : Variance");
     1976  } else if (tStr.contains(String("TINTSYS"))) {
     1977       wtType = TINTSYS;
     1978       msg = String("Weighting type selected : Tint&Tsys");
    19761979  } else if (tStr.contains(String("TINT"))) {
    19771980     wtType = TINT;
  • trunk/src/SDMath.h

    r532 r536  
    136136// Weighting type for time averaging
    137137
    138   enum WeightType {NONE,VAR,TSYS,TINT};
     138  enum WeightType {NONE=0,VAR,TSYS,TINT,TINTSYS,nWeightTypes};
    139139
    140140// Function to use accumulate data during time averaging
Note: See TracChangeset for help on using the changeset viewer.