COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_stellarCoronagraph.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // This file is part of COMPASS <https://anr-compass.github.io/compass/>
3 //
4 // Copyright (C) 2011-2023 COMPASS Team <https://github.com/ANR-COMPASS>
5 // All rights reserved.
6 
7 // -----------------------------------------------------------------------------
8 
16 
17 #ifndef _SUTRA_STELLAR_CORONAGRAPH_H_
18 #define _SUTRA_STELLAR_CORONAGRAPH_H_
19 
20 #include <sutra_coronagraph.h>
21 #include <map>
22 #include <tuple>
23 
24 using std::vector;
25 using std::map;
26 using std::string;
27 using std::tuple;
28 
29 typedef vector<CarmaObj<cuFloatComplex>*> mftVec;
30 typedef tuple<mftVec, vector<long>> mftTuple;
31 
33  public:
34  bool babinet;
35  int fpmDimx;
36  int fpmDimy;
37  map<string, mftTuple> AA;
38  map<string, mftTuple> BB;
39  map<string, vector<float>> norm;
40  map<string, tuple<CarmaObj<cuFloatComplex>*, vector<long>>> tmp_mft;
41 
44  vector<CarmaObj<float>*> focal_plane_mask;
47 
48  public:
50  int im_dimy, int fpm_dimx, int fpm_dimy,
51  float *wavelength, int nWavelength, bool babinet, int device);
53  int compute_image(bool accumulate);
54  int compute_psf(bool accumulate);
56  int set_mft(cuFloatComplex *A, cuFloatComplex *B, float* norm, std::string mftType);
57  int set_focal_plane_mask(float *mask);
58  int set_apodizer(float *apodizer);
59  int set_lyot_stop(float *lyot_stop);
60 
61  private:
62  int _compute_image(bool center_on_pixel, bool accumulate, bool no_fpm);
63 };
64 
65 #endif //_SUTRA_STELLAR_CORONAGRAPH_H_
this class provides the context in which CarmaObj are created
Definition: carma_context.h:79
this class provides the coronagraph features to COMPASS
SutraSource * d_source
std::vector< float > wavelength
this class provides the source features to COMPASS
Definition: sutra_source.h:37
this class provides the coronograph features to COMPASS
CarmaObj< cuFloatComplex > * d_electric_field_babinet
int set_apodizer(float *apodizer)
int set_lyot_stop(float *lyot_stop)
map< string, mftTuple > BB
~SutraStellarCoronagraph()=default
int set_mft(cuFloatComplex *A, cuFloatComplex *B, float *norm, std::string mftType)
SutraStellarCoronagraph(CarmaContext *context, SutraSource *d_source, int im_dimx, int im_dimy, int fpm_dimx, int fpm_dimy, float *wavelength, int nWavelength, bool babinet, int device)
int set_focal_plane_mask(float *mask)
vector< CarmaObj< float > * > focal_plane_mask
map< string, mftTuple > AA
map< string, vector< float > > norm
int compute_image(bool accumulate)
int compute_psf(bool accumulate)
CarmaObj< cuFloatComplex > * d_electric_field_fpm
map< string, tuple< CarmaObj< cuFloatComplex > *, vector< long > > > tmp_mft
tuple< mftVec, vector< long > > mftTuple
vector< CarmaObj< cuFloatComplex > * > mftVec