Changeset 446
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDPol.cc
r440 r446 106 106 } 107 107 108 DataManager* SDStokesEngine::makeObject (const String&, 109 const Record& spec) 108 DataManager* SDStokesEngine::makeObject (const String&, const Record& spec) 110 109 { 111 110 DataManager* dmPtr = new SDStokesEngine(spec); … … 403 402 return stokesFlags; 404 403 } 404 405 Stokes::StokesTypes SDPolUtil::convertStokes(Int val, Bool toStokes, Bool linear) 406 { 407 Stokes::StokesTypes stokes = Stokes::Undefined; 408 if (toStokes) { 409 if (val==0) { 410 stokes = Stokes::I; 411 } else if (val==1) { 412 stokes = Stokes::Q; 413 } else if (val==2) { 414 stokes = Stokes::U; 415 } else if (val==3) { 416 stokes = Stokes::V; 417 } 418 } else if (linear) { 419 if (val==0) { 420 stokes = Stokes::XX; 421 } else if (val==1) { 422 stokes = Stokes::YY; 423 } else if (val==2) { 424 stokes = Stokes::XY; // Real(XY) 425 } else if (val==3) { 426 stokes = Stokes::XY; // Imag(XY) 427 } 428 } else { 429 if (val==0) { 430 stokes = Stokes::RR; 431 } else if (val==1) { 432 stokes = Stokes::LL; 433 } else if (val==2) { 434 stokes = Stokes::RL; 435 } else if (val==3) { 436 stokes = Stokes::RL; 437 } 438 } 439 // 440 return stokes; 441 } -
trunk/src/SDPol.h
r440 r446 35 35 #include <casa/aips.h> 36 36 #include <casa/Arrays/Array.h> 37 #include <measures/Measures/Stokes.h> 37 38 #include <tables/Tables/BaseMappedArrayEngine.h> 38 39 … … 71 72 casa::Bool doLinear); 72 73 74 // Find the Stokes type for the given polarization axis (0,1,2,3) 75 // You can ask for STokes or raw correltions (linear or circular) 76 static casa::Stokes::StokesTypes convertStokes(casa::Int val, casa::Bool toStokes, 77 casa::Bool linear); 73 78 }; 74 79
Note:
See TracChangeset
for help on using the changeset viewer.