Changeset 473


Ignore:
Timestamp:
02/18/05 11:17:24 (19 years ago)
Author:
kil064
Message:

fix bug in setFlags to do with Xpol and iterating

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDContainer.cc

    r465 r473  
    189189// spectrum_ is [,,,nChan]
    190190// How annoying.
    191 // nPol==2
    192191{
    193192
     
    230229//
    231230// flags is [nChan,nPol]
    232 // flags_ is [,,,nChan]
    233 // How annoying.
    234 // there are no separate flags for XY so make
    235 // them up from X and Y
     231// flags_ is [nBeam,nIF,nPol,nChan]
     232//
     233// Note that there are no separate flags for the XY cross polarization so we make
     234// them up from the X and Y which is all the silly code below.  This means
     235// that nPol==2 on input but 4 on output
    236236//
    237237{
     
    271271           }
    272272        }
    273 //
    274273        inIt.next();
    275274     } else if (pos(asap::PolAxis)==2) {
    276         outIt.vector() = maskPol01;
     275        if (hasXPol) {
     276           outIt.vector() = maskPol01;
     277        } else {
     278           outIt.vector() = inIt.vector();
     279           inIt.next();
     280        }
     281
    277282     } else if (pos(asap::PolAxis)==3) {
    278         outIt.vector() = maskPol01;
     283        if (hasXPol) {
     284           outIt.vector() = maskPol01;
     285        } else {
     286           outIt.vector() = inIt.vector();
     287           inIt.next();
     288        }
    279289     }
    280 //
    281290     outIt.next();
    282291  }
     
    290299                          Bool hasXpol)
    291300//
     301// TSys shape is [nPol]
    292302// Tsys does not depend upon channel but is replicated
    293303// for simplicity of use.
     
    317327       outIt.vector() = tsys(i++);
    318328     } else {
    319        outIt.vector() = sqrt(tsys[0]*tsys[1]);
     329       if (hasXpol) {
     330          outIt.vector() = sqrt(tsys[0]*tsys[1]);
     331       } else {
     332          outIt.vector() = tsys(i++);
     333       }
    320334     }
    321335//
     
    385399//
    386400// Input  [nBeam,nIF,nPol,nChan]
    387 // Output [nPol]   (drop channel dependency and select first value)
     401// Output [nPol]   (drop channel dependency and select first value only)
    388402//
    389403{
Note: See TracChangeset for help on using the changeset viewer.