17 #ifndef _SUTRA_SOURCE_H_
18 #define _SUTRA_SOURCE_H_
117 float mag,
float zerop,
long size,
string type,
123 float lambda,
float mag,
float zerop,
long size,
133 bool do_phase_var =
true,
bool async =
false);
156 float fitmax2x1dSinc(
float *d_img,
int ind_max,
int img_size);
160 float xoff,
float yoff,
float G,
float thetaML,
float dx,
161 float dy,
int block_size,
float delta);
163 int nx,
int ny,
int Nx,
float xoff,
float yoff,
166 float *d_odata,
float *d_idata,
int nx,
int ny,
167 int Nx,
float xoff,
float yoff,
int block_size);
177 float scale,
int puponly,
int nx,
int ny,
int Nx,
this class provides the context in which CarmaObj are created
this class provides the stream features to CarmaObj
this class provides the atmos features to COMPASS
this class provides the lgs features to COMPASS
this class provides the phase features to COMPASS
this class provides the source features to COMPASS
int raytrace(SutraTelescope *tel, SutraAtmos *atmos, SutraDms *ydms, bool do_phase_var=true, bool async=false)
int block_size
optimum block size of device
float mag
brightness of target
int init_source(CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, int device)
CarmaObj< float > * d_ncpa_phase
ncpa phase
CarmaObj< int > * d_wherephase
positions of valid phase points in the pupil (target only)
float strehl_le
long exposure strehl
CarmaHostObj< float > * phase_telemetry
float phase_var
current phase variance in the pupil
float posy
y position of target on the sky
CarmaObj< float > * d_pupil
the pupil mask
int raytrace(SutraDms *ydms, bool rst=false, bool do_phase_var=true, bool async=false)
int remove_layer(string type, int idx)
SutraPhase * d_phase
phase for this target
CarmaContext * current_context
float thetaML
Pupil rotation angle.
map< type_screen, float > yoff
y reference for raytracing
float zp
imaging zero point
SutraLGS * d_lgs
the lgs object
SutraSource(CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, int device)
CarmaObj< float > * d_image_le
the long exposure image for this target
CarmaObj< float > * d_smallimg
temporary array for accurate strehl computation
int raytrace_shm(SutraAtmos *atmos)
float phase_var_avg
average phase variance in the pupil
string type
type of source : target / wfs
int comp_strehl(bool do_fit)
CarmaObj< cuFloatComplex > * d_amplipup
the complex amplitude in the pupil plane
float G
Magnifying factor for WFS misalignment.
float lambda
imaging lambda
int comp_image(int puponly=0, bool comp_le=true)
const int d_smallimg_size
CarmaObj< float > * d_image_se
the resulting image for this target
float ref_strehl
reference for strehl computation
float strehl_se
short exposure strehl
float dy
WFS misalignment.
int phase_var_count
counter for average phase variance in the pupil
int strehl_counter
counter for le strehl computation
float dx
WFS misalignment.
float posx
x position of target on the sky
CarmaObj< float > * d_phasepts
the valid phase points in the pupil (target only)
long npts
number of points in the pupil
int raytrace(SutraTelescope *tel, bool rst=false)
SutraSource(CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, CarmaObj< float > *pupil, int Npts, int device)
int raytrace(bool rst=false)
int raytrace(SutraAtmos *atmos, bool async=false)
map< type_screen, float > xoff
x reference for raytracing
int add_layer(string type, int idx, float xoff, float yoff)
this class provides the telescope features to COMPASS
int fft_goodsize(long size)
int fill_amplipup(cuFloatComplex *amplipup, float *phase, float *mask, float scale, int puponly, int nx, int ny, int Nx, CarmaDevice *device)
int target_raytrace(float *d_odata, float *d_idata, int nx, int ny, int Nx, float xoff, float yoff, float G, float thetaML, float dx, float dy, int block_size, float delta)
int target_raytrace_async(CarmaStreams streams, float *d_odata, float *d_idata, int nx, int ny, int Nx, float xoff, float yoff, int block_size)
std::pair< std::string, int > type_screen