@@ -29,21 +29,21 @@ namespace galsim {
29
29
/* *
30
30
* @brief A private class that caches the photon shooting objects for a given
31
31
* obscuration value, so they don't have to be set up again each time.
32
- *
32
+ *
33
33
* This is helpful if people use only 1 or a small number of obscuration values.
34
34
*/
35
35
class AiryInfo
36
36
{
37
37
public:
38
- /* *
38
+ /* *
39
39
* @brief Constructor
40
40
*/
41
41
AiryInfo () {}
42
42
43
43
// / @brief Destructor: deletes photon-shooting classes if necessary
44
44
virtual ~AiryInfo () {}
45
45
46
- /* *
46
+ /* *
47
47
* @brief Returns the real space value of the Airy function,
48
48
* normalized to unit flux (see private attributes).
49
49
* @param[in] r should be given in units of lam_over_D (i.e. r_true*D)
@@ -55,7 +55,7 @@ namespace galsim {
55
55
56
56
/* *
57
57
* @brief Returns the k-space value of the Airy function.
58
- * @param[in] ksq_over_pisq should be given in units of lam_over_D
58
+ * @param[in] ksq_over_pisq should be given in units of lam_over_D
59
59
* (i.e. k_true^2 / (pi^2 * D^2))
60
60
*
61
61
* This is used to calculate the real kValue, but it comes back unnormalized.
@@ -78,12 +78,12 @@ namespace galsim {
78
78
boost::shared_ptr<PhotonArray> shoot (int N, UniformDeviate ud) const ;
79
79
80
80
protected:
81
- double _stepk; // /< Sampling in k space necessary to avoid folding
81
+ double _stepk; // /< Sampling in k space necessary to avoid folding
82
82
83
83
virtual void checkSampler () const = 0;
84
84
85
85
// /< Class that can sample radial distribution
86
- mutable boost::shared_ptr<OneDimensionalDeviate> _sampler;
86
+ mutable boost::shared_ptr<OneDimensionalDeviate> _sampler;
87
87
88
88
private:
89
89
AiryInfo (const AiryInfo& rhs); // /< Hides the copy constructor.
@@ -95,7 +95,7 @@ namespace galsim {
95
95
class AiryInfoObs : public AiryInfo
96
96
{
97
97
public:
98
- AiryInfoObs (double obscuration, const GSParamsPtr& _gsparams);
98
+ AiryInfoObs (double obscuration, const GSParamsPtr& _gsparams);
99
99
~AiryInfoObs () {}
100
100
101
101
double xValue (double r) const ;
@@ -110,15 +110,15 @@ namespace galsim {
110
110
* Input radius is in units of lambda/D. Output normalized
111
111
* to integrate to unity over input units.
112
112
*/
113
- class RadialFunction : public FluxDensity
113
+ class RadialFunction : public FluxDensity
114
114
{
115
115
public:
116
116
/* *
117
117
* @brief Constructor
118
118
* @param[in] obscuration Fractional linear size of central obscuration of pupil.
119
119
* @param[in] obssq Pre-computed obscuration^2 supplied as input for speed.
120
120
*/
121
- RadialFunction (double obscuration, double obssq, const GSParamsPtr& gsparams) :
121
+ RadialFunction (double obscuration, double obssq, const GSParamsPtr& gsparams) :
122
122
_obscuration (obscuration), _obssq(obssq),
123
123
_norm (M_PI / (1 .-_obssq)), _gsparams(gsparams) {}
124
124
@@ -143,16 +143,16 @@ namespace galsim {
143
143
const GSParamsPtr _gsparams;
144
144
145
145
// / Circle chord length at `h < r`.
146
- double chord (double r, double h, double rsq, double hsq) const ;
146
+ double chord (double r, double h, double rsq, double hsq) const ;
147
147
148
148
// / @brief Area inside intersection of 2 circles radii `r` & `s`, seperated by `t`.
149
149
double circle_intersection (
150
- double r, double s, double rsq, double ssq, double tsq) const ;
151
- double circle_intersection (double r, double rsq, double tsq) const ;
150
+ double r, double s, double rsq, double ssq, double tsq) const ;
151
+ double circle_intersection (double r, double rsq, double tsq) const ;
152
152
153
153
// / @brief Area of two intersecting identical annuli.
154
154
double annuli_intersect (
155
- double r1, double r2, double r1sq, double r2sq, double tsq) const ;
155
+ double r1, double r2, double r1sq, double r2sq, double tsq) const ;
156
156
157
157
void checkSampler () const ; // /< Check if `OneDimensionalDeviate` is configured.
158
158
};
@@ -168,7 +168,7 @@ namespace galsim {
168
168
double kValue (double ksq_over_pisq) const ;
169
169
170
170
private:
171
- class RadialFunction : public FluxDensity
171
+ class RadialFunction : public FluxDensity
172
172
{
173
173
public:
174
174
RadialFunction (const GSParamsPtr& gsparams) : _gsparams(gsparams) {}
@@ -186,7 +186,7 @@ namespace galsim {
186
186
void checkSampler () const ; // /< Check if `OneDimensionalDeviate` is configured.
187
187
};
188
188
189
- class SBAiry ::SBAiryImpl : public SBProfileImpl
189
+ class SBAiry ::SBAiryImpl : public SBProfileImpl
190
190
{
191
191
public:
192
192
SBAiryImpl (double lam_over_D, double obs, double flux,
@@ -197,15 +197,15 @@ namespace galsim {
197
197
double xValue (const Position<double >& p) const ;
198
198
std::complex <double > kValue (const Position<double >& k) const ;
199
199
200
- bool isAxisymmetric () const { return true ; }
200
+ bool isAxisymmetric () const { return true ; }
201
201
bool hasHardEdges () const { return false ; }
202
202
bool isAnalyticX () const { return true ; }
203
203
bool isAnalyticK () const { return true ; }
204
204
205
205
double maxK () const ;
206
206
double stepK () const ;
207
207
208
- Position<double > centroid () const
208
+ Position<double > centroid () const
209
209
{ return Position<double >(0 ., 0 .); }
210
210
211
211
double getFlux () const { return _flux; }
@@ -235,13 +235,13 @@ namespace galsim {
235
235
double kx0, double dkx, double dkxy,
236
236
double ky0, double dky, double dkyx) const ;
237
237
238
- std::string repr () const ;
238
+ std::string serialize () const ;
239
239
240
240
private:
241
-
241
+
242
242
double _lam_over_D; // /< inverse of _D (see below), harmonise inputs with other GSObjects
243
- /* *
244
- * `_D` = (telescope diam) / (lambda * focal length) if arg is focal plane position,
243
+ /* *
244
+ * `_D` = (telescope diam) / (lambda * focal length) if arg is focal plane position,
245
245
* else `_D` = (telescope diam) / lambda if arg is in radians of field angle.
246
246
*/
247
247
double _D;
@@ -259,14 +259,13 @@ namespace galsim {
259
259
SBAiryImpl (const SBAiryImpl& rhs);
260
260
void operator =(const SBAiryImpl& rhs);
261
261
262
- // / Info object that stores things that are common to all Airy functions with this
262
+ // / Info object that stores things that are common to all Airy functions with this
263
263
// / obscuration value.
264
- const boost::shared_ptr<AiryInfo> _info;
264
+ const boost::shared_ptr<AiryInfo> _info;
265
265
266
266
// / One static map of all `AiryInfo` structures for whole program.
267
267
static LRUCache< std::pair< double , GSParamsPtr >, AiryInfo > cache;
268
268
};
269
269
}
270
270
271
271
#endif
272
-
0 commit comments