Changeset 2652


Ignore:
Timestamp:
09/28/12 11:06:32 (12 years ago)
Author:
Malte Marquarding
Message:

Fix for SDFITS part of issue #279: always limit to npol=2 if npol>2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r2577 r2652  
    161161  nPol = 0;nChan = 0; havexpol = False;
    162162  for (uint i=0;i<ifs.size();++i) {
    163     nPol(ifs[i]) = inst->npol();
     163    if ( inst->npol() > 2 ) {
     164      havexpol(ifs[i]) = True;     
     165      nPol(ifs[i]) = 2;
     166    } else {
     167      nPol(ifs[i]) = inst->npol();
     168    }
    164169    nChan(ifs[i]) = inst->nchan(ifs[i]);
    165     havexpol(ifs[i]) = nPol(ifs[i]) > 2;
    166170  }
    167171//   Vector<String> obstypes(2);
     
    222226        while(!typeit.pastEnd() ) {
    223227          Table ttable = typeit.table() ;
    224           TableIterator ifit(ttable, "IFNO", TableIterator::Ascending, TableIterator::HeapSort);
     228          TableIterator ifit(ttable, "IFNO",
     229                             TableIterator::Ascending, TableIterator::HeapSort);
    225230          MDirection::ScalarColumn dirCol(ctable, "DIRECTION");
    226231          pksrec.direction = dirCol(0).getAngle("rad").getValue();
     
    241246            inst->frequencies().getEntry(crpix,crval, pksrec.freqInc,
    242247                                         rec.asuInt("FREQ_ID"));
    243             inst->focus().getEntry(pksrec.parAngle, pksrec.focusAxi, pksrec.focusTan,
     248            inst->focus().getEntry(pksrec.parAngle, pksrec.focusAxi,
     249                                   pksrec.focusTan,
    244250                                   pksrec.focusRot, tmp0,tmp1,tmp2,tmp3,tmp4,
    245251                                   rec.asuInt("FOCUS_ID"));
     
    284290              }
    285291            }
    286             //LogIO os ;
    287             //os << "npol = " << npol << " pksrec.tcal = " << pksrec.tcal << LogIO::POST ;
    288            
    289292            pksrec.mjd       = rec.asDouble("TIME");
    290293            pksrec.interval  = rec.asDouble("INTERVAL");
Note: See TracChangeset for help on using the changeset viewer.