Changeset 1007 for trunk


Ignore:
Timestamp:
04/07/06 13:29:08 (19 years ago)
Author:
mar637
Message:

Fixed computiaons of stokes and back after discussions with Jim Caswell.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STPolLinear.cpp

    r965 r1007  
    4040        break;
    4141      case 1:
    42         out = Vector<Float>(q * cos(phase) - getSpectrum(2) * sin(phase));
     42        out = Vector<Float>(q * cos(phase) - Float(2.0)*getSpectrum(2) * sin(phase));
    4343        break;
    4444      case 2:
    45         out = Vector<Float>(q * sin(phase) + getSpectrum(2) * cos(phase));
     45        out = Vector<Float>(q * sin(phase) + Float(2.0)*getSpectrum(2) * cos(phase));
    4646        break;
    4747      case 3:
    48         out = getFeedHand() * Vector<Float>(getSpectrum(3));
     48        out = getFeedHand() * Float(2.0) * Vector<Float>(getSpectrum(3));
    4949        break;
    5050    }
     
    9494  switch(index) {
    9595  case 0:
    96     out = (I + V);
     96    out = (I + V)/Float(2.0);
    9797    break;
    9898  case 1:
    99     out = (I - V);
     99    out = (I - V)/Float(2.0);
    100100    break;
    101101  default:
     
    146146  Q = Q2;
    147147  Matrix<Float>& specs = getSpectra();
    148   specs.column(0) = I+Q;
    149   specs.column(1) = I-Q;
    150   specs.column(2) = U;
     148  specs.column(0) = (I+Q)/Float(2.0);
     149  specs.column(1) = (I-Q)/Float(2.0);
     150  specs.column(2) = U/Float(2.0);
    151151
    152152}
  • trunk/src/STPolLinear.h

    r904 r1007  
    1919
    2020/**
    21 The linear representation of polarisation
     21  The linear representation of polarisation.
     22  We are using the following convention:
     23  @li I = XX + YY
     24  @li Q = XX - YY
     25  @li U = 2*Real(XY)
     26  @li V = 2*Imag(XY)
    2227
    23 @author Malte Marquarding
     28  resulting in:
     29  @li I' = I
     30  @li Q' = Q * cos(theta) - V *sin(theta)
     31  @li U' = Q * sin(theta) + U * cos(theta)
     32  @li V' = V
     33  @author Malte Marquarding
     34
    2435*/
    2536class STPolLinear : public STPol
  • trunk/src/STPolStokes.cpp

    r980 r1007  
    6060  case 0:
    6161    out = (getSpectrum(0)+getSpectrum(1))/Float(2.0);
     62    break;
    6263  case 1:
    6364    out = (getSpectrum(0)-getSpectrum(1))/Float(2.0);
     65    break;
     66  case 2:
     67    out = getSpectrum(2)/Float(2.0);
     68    break;
     69  case 3:
     70    out = getSpectrum(3)/Float(2.0);
    6471    break;
    6572  default:
     
    8188  switch(index) {
    8289  case 0:
    83     out = (getSpectrum(0) + getSpectrum(3));
     90    out = (getSpectrum(0) + getSpectrum(3))/Float(2.0);
    8491    break;
    8592  case 1:
    86     out = (getSpectrum(0) - getSpectrum(3));
     93    out = (getSpectrum(0) - getSpectrum(3))/Float(2.0);
    8794    break;
    8895  default:
Note: See TracChangeset for help on using the changeset viewer.