LCOV - code coverage report
Current view: top level - air_casawvr/src - lineshapes.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 5 0.0 %
Date: 2024-10-29 13:38:20 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /**
       2             :    Bojan Nikolic <bn204@mrao.cam.ac.uk>, <bojan@bnikolic.co.uk>
       3             :    Initial version February 2008
       4             :    Maintained by ESO since 2013.
       5             : 
       6             :    This file is part of LibAIR and is licensed under GNU Public
       7             :    License Version 2
       8             : 
       9             :    \file lineshapes.hpp
      10             :    Renamed lineshapes.h 2023
      11             : 
      12             :    Definition of line shapes that are useful for modelling atmospheric
      13             :    transparency.
      14             : */
      15             : #ifndef __LIBAIR_LINESHAPES_HPP__
      16             : #define __LIBAIR_LINESHAPES_HPP__
      17             : 
      18             : #include <cmath>
      19             : 
      20             : namespace LibAIR2 {
      21             : 
      22             :   // Forward declarations
      23             :   struct CLineParams;
      24             : 
      25             :   /** \brief The Gross line shape 
      26             : 
      27             :       \f$ \frac{4 S \gamma}{\pi} \frac{ f^2 }{\left(f^2-f_0^{2}\right)^2 + 4 \gamma^2 f^2} \f$
      28             :      
      29             :      \param f  frequency to evaluate at
      30             :      \param f0 centre frequency of the line
      31             :      \param gamma line width
      32             :      \param S line strength
      33             :      
      34             :    */
      35             :   template<class T> T 
      36           0 :   GrossLine( T f,
      37             :              const T f0, const T gamma, const T S)
      38             :   {
      39           0 :     const T f2  = std::pow(f, 2);
      40           0 :     const T f02 = std::pow(f0, 2);
      41           0 :     const T gamma2 = std::pow(gamma, 2);
      42             : 
      43           0 :     return M_1_PI * 4 * S * gamma * f2 / (   std::pow( f2-f02, 2) + 4 * gamma2 * f2) ;
      44             : 
      45             :   }
      46             : 
      47             :   /** \brief Evaluate Gross line shape using packaged line parameters.
      48             : 
      49             :    */
      50             :   double CGrossLine(double f,
      51             :                     const CLineParams & cp);
      52             :   
      53             : 
      54             : }
      55             : 
      56             : #endif

Generated by: LCOV version 1.16