Changeset 7


Ignore:
Timestamp:
06/24/04 11:39:45 (21 years ago)
Author:
mmarquar
Message:

Changed Tsys vector to be of the same dimensionality as the spectrum. This makes it easier to use.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDContainer.cc

    r2 r7  
    4545  spectrum_(IPosition(4,nBeam,nIF,nChan,nPol)),
    4646  flags_(IPosition(4,nBeam,nIF,nChan,nPol)),
    47   tsys_(IPosition(3,nBeam,nIF,nPol)) {
     47  tsys_(IPosition(4,nBeam,nIF,nChan,nPol)) {
    4848  uChar x = 0;
    4949  flags_ = ~x;
     
    5656  spectrum_ = spec;
    5757}
    58 Bool SDContainer::putFlags(const Array<uChar>& spec) {
    59   flags_ = spec;
     58Bool SDContainer::putFlags(const Array<uChar>& flag) {
     59  flags_ = flag;
    6060}
    61 Bool SDContainer::putTsys(const Array<Float>& spec) {
    62   tsys_ = spec;
     61Bool SDContainer::putTsys(const Array<Float>& tsys) {
     62  tsys_ = tsys;
    6363}
    6464
     
    128128  // assert dimensions are the same....
    129129  uInt idx = 0;
    130   for (ArrayAccessor<Float, Axis<2> > i(aa1);i != i.end(); ++i) {
    131     (*i) = tsys[idx];
    132     idx++;
    133   } 
     130 
     131  for (ArrayAccessor<Float, Axis<2> > i(aa1);i != i.end(); ++i) {   
     132    idx = 0;
     133    for (ArrayAccessor<Float, Axis<3> > ii(i);ii != ii.end(); ++ii) {
     134      (*ii) = tsys[idx];
     135      idx++;
     136    }
     137  }
    134138}
  • trunk/src/SDContainer.h

    r2 r7  
    9999  Array<Float>    spectrum_; 
    100100  Array<uChar>    flags_;
    101   // (nBeam,nIF,nPol)
     101  // (nBeam,nIF,[nChannel],nPol) Tsys is not really a function of
     102  // channel, but this makes it easier to work with at the expense of
     103  // a little memory
    102104  Array<Float>    tsys_;
    103105  Array<Float>    tcal_;
Note: See TracChangeset for help on using the changeset viewer.