mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
jincFuncs.hpp
Go to the documentation of this file.
1/** \file jincFuncs.hpp
2 * \author Jared R. Males (jaredmales@gmail.com)
3 * \brief The +/- Jinc functions for analyzing contrast
4 * \ingroup mxAO_files
5 *
6 */
7
8#ifndef jincFuncs_hpp
9#define jincFuncs_hpp
10
11#include "../../math/constants.hpp"
12#include "../../math/func/jinc.hpp"
13
14namespace mx
15{
16namespace AO
17{
18namespace analysis
19{
20
21/// The +/- Jinc functions for analyzing contrast
22/** See Males and Guyon
23 *
24 */
25template <typename realT>
26int jincFuncs( realT &Jp, ///< [out]
27 realT &Jm, ///< [out]
28 int mpos, ///< [in]
29 int npos, ///< [in]
30 int mmode, ///< [in]
31 int nmode ///< [in]
32)
33{
34 realT ku = mpos;
35 realT kv = npos;
36
37 realT kp = sqrt( pow( ku + mmode, 2 ) + pow( kv + nmode, 2 ) );
38 realT km = sqrt( pow( ku - mmode, 2 ) + pow( kv - nmode, 2 ) );
39
40 Jp = math::func::jinc( math::pi<realT>() * kp );
41
42 Jm = math::func::jinc( math::pi<realT>() * km );
43
44 return 0;
45}
46
47} // namespace analysis
48} // namespace AO
49} // namespace mx
50
51#endif // jincFuncs_hpp
T jinc(const T &x)
The Jinc function.
Definition jinc.hpp:61
constexpr floatT six_fifths()
Return 6/5 in the specified precision.
int jincFuncs(realT &Jp, realT &Jm, int mpos, int npos, int mmode, int nmode)
The +/- Jinc functions for analyzing contrast.
Definition jincFuncs.hpp:26
The mxlib c++ namespace.
Definition mxError.hpp:106