LCOV - code coverage report
Current view: top level - msvis/MSVis - StokesVector.cc (source / functions) Hit Total Coverage
Test: casa_coverage.info Lines: 0 8 0.0 %
Date: 2023-10-25 08:47:59 Functions: 0 3 0.0 %

          Line data    Source code
       1             : //# Stokesvector.cc:  this defines StokesVector
       2             : //# Copyright (C) 1996,2003
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be addressed as follows:
      20             : //#        Internet email: aips2-request@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //# $Id$
      27             : 
      28             : //# Includes
      29             : #include <msvis/MSVis/StokesVector.h>
      30             : // #include <tables/DataMan/RetypedArrayEngine.h>
      31             : // #include <tables/DataMan/RetypedArraySetGet.h>
      32             : // #include <tables/DataMan/DataManError.h>
      33             : #include <casacore/casa/Exceptions/Error.h>
      34             : 
      35             : 
      36             : using namespace casacore;
      37             : namespace casa { //# NAMESPACE CASA - BEGIN
      38             : 
      39             : // The following sqrt functions are required for Image to
      40             : // work. Ug-ly.
      41             : //CStokesVector& sqrt(const CStokesVector& v) {
      42             : //  return sqrt(v);
      43             : //}
      44             : 
      45             : //StokesVector& sqrt(const StokesVector& v) {
      46             : //  return sqrt(v);
      47             : //}
      48             : 
      49             : // StokesVector CStokesVector::real() {
      50             : //     return StokesVector(v_p[0].real(),v_p[1].real(),v_p[2].real(),
      51             : //                               v_p[3].real());
      52             : // }
      53             :   // Compute the maximum EigenValue
      54           0 : Float StokesVector::maxEigenValue() const {
      55             :   Float r;
      56           0 :   r=v_p[1]*v_p[1]+v_p[2]*v_p[2]+v_p[3]*v_p[3];
      57           0 :   return Float(v_p[0])+::sqrt(r);
      58             : }
      59             :   // Compute the minimum EigenValue
      60           0 : Float StokesVector::minEigenValue() const {
      61             :   Float r;
      62           0 :   r=v_p[1]*v_p[1]+v_p[2]*v_p[2]+v_p[3]*v_p[3];
      63           0 :   return Float(v_p[0])-::sqrt(r);
      64             : }
      65             :   // Compute the determinant of the coherence matrix
      66           0 : Float StokesVector::determinant() const {
      67           0 :   return square(v_p[0])-(square(v_p[1])+square(v_p[2])+square(v_p[3]));
      68             : }
      69             : 
      70             : 
      71             : } //# NAMESPACE CASA - END
      72             : 

Generated by: LCOV version 1.16