Ignore:
Timestamp:
08/28/06 12:28:27 (18 years ago)
Author:
mar637
Message:

Fix for ticket #61 - changing of default polarisation. Done ticket #62 as far as possible. Tid data gets automatically set as 'circular'\nAlso add circular pol class which was missing so far.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STPolLinear.cpp

    r1007 r1189  
    4949        break;
    5050    }
     51  } else if (nspec() == 2) {
     52    if ( index == 0 )
     53      out = Vector<Float>(getSpectrum(0) + getSpectrum(1));
    5154  }
    5255  return out;
     
    5558Vector<Float> asap::STPolLinear::getLinPol( uInt index )
    5659{
     60  if (nspec() != 4) {
     61    throw(AipsError("You must have 4 linear polarizations to run this function"));
     62  }
    5763  if ( index < 0 || index >4 ) throw(AipsError("LinPol index out of range"));
    5864  Vector<Float> out,q,u;
     
    8793  //   We use the convention
    8894  //    I = (RR+LL)  // definition changed
    89 
     95  if (nspec() != 4) {
     96    throw(AipsError("You must have 4 linear polarizations to run this function"));
     97  }
    9098  if ( index == 2 || index ==3  ) throw(AipsError("Re/Imag RL not implemented"));
    9199  Vector<Float> I,V,out;
     
    121129{
    122130  // phase isnt used, just ro keep interface the same for all pol operations
     131  if (nspec() != 4) {
     132    throw(AipsError("You must have 4 linear polarizations to run this function"));
     133  }
    123134  Matrix<Float>& specs = getSpectra();
    124135  Vector<Float> I = specs.column(3);
     
    135146// C1 = XX; C2 = YY, C3 = Real(XY)
    136147//
     148  if (nspec() != 4) {
     149    throw(AipsError("You must have 4 linear polarizations to run this function"));
     150  }
    137151  Vector<Float> I,Q,U;
    138152  I = getStokes(0);
Note: See TracChangeset for help on using the changeset viewer.