COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
SutraSource Class Reference

this class provides the source features to COMPASS More...

#include <sutra_source.h>

Collaboration diagram for SutraSource:

Public Member Functions

 SutraSource (CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, CarmaObj< float > *pupil, int Npts, int device)
 
 SutraSource (CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, int device)
 
 ~SutraSource ()
 
int init_source (CarmaContext *context, float xpos, float ypos, float lambda, float mag, float zerop, long size, string type, int device)
 
int add_layer (string type, int idx, float xoff, float yoff)
 
int remove_layer (string type, int idx)
 
int raytrace (SutraTelescope *tel, bool rst=false)
 
int raytrace (SutraAtmos *atmos, bool async=false)
 
int raytrace (SutraDms *ydms, bool rst=false, bool do_phase_var=true, bool async=false)
 
int raytrace (SutraTelescope *tel, SutraAtmos *atmos, SutraDms *ydms, bool do_phase_var=true, bool async=false)
 
int raytrace (bool rst=false)
 
int raytrace_shm (SutraAtmos *atmos)
 
int comp_image (int puponly=0, bool comp_le=true)
 
int init_strehlmeter ()
 
int reset_strehlmeter ()
 
int comp_strehl (bool do_fit)
 
int reset_phase ()
 

Public Attributes

CarmaContextcurrent_context
 
int device
 device # More...
 
float posx
 x position of target on the sky More...
 
float posy
 y position of target on the sky More...
 
long npts
 number of points in the pupil More...
 
float mag
 brightness of target More...
 
float lambda
 imaging lambda More...
 
float zp
 imaging zero point More...
 
float scale
 phase scale More...
 
bool lgs
 flag for lgs More...
 
float G
 Magnifying factor for WFS misalignment. More...
 
float thetaML
 Pupil rotation angle. More...
 
float dx
 WFS misalignment. More...
 
float dy
 WFS misalignment. More...
 
string type
 type of source : target / wfs More...
 
int block_size
 optimum block size of device More...
 
float strehl_se
 short exposure strehl More...
 
float strehl_le
 long exposure strehl More...
 
float ref_strehl
 reference for strehl computation More...
 
int strehl_counter
 counter for le strehl computation More...
 
float phase_var
 current phase variance in the pupil More...
 
float phase_var_avg
 average phase variance in the pupil More...
 
int phase_var_count
 counter for average phase variance in the pupil More...
 
SutraPhased_phase
 phase for this target More...
 
CarmaHostObj< float > * phase_telemetry
 
SutraLGSd_lgs
 the lgs object More...
 
CarmaObj< float > * d_pupil
 the pupil mask More...
 
CarmaObj< float > * d_image_se
 the resulting image for this target More...
 
CarmaObj< float > * d_image_le
 the long exposure image for this target More...
 
CarmaObj< cuFloatComplex > * d_amplipup
 the complex amplitude in the pupil plane More...
 
CarmaObj< float > * d_phasepts
 the valid phase points in the pupil (target only) More...
 
CarmaObj< int > * d_wherephase
 positions of valid phase points in the pupil (target only) More...
 
map< type_screen, float > xoff
 x reference for raytracing More...
 
map< type_screen, float > yoff
 y reference for raytracing More...
 
CarmaObj< float > * d_ncpa_phase
 ncpa phase More...
 
CarmaObj< float > * d_smallimg
 temporary array for accurate strehl computation More...
 
const int d_smallimg_size = 3
 

Detailed Description

this class provides the source features to COMPASS

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.4.4
Date
2022/01/24

Definition at line 37 of file sutra_source.h.

Constructor & Destructor Documentation

◆ SutraSource() [1/2]

SutraSource::SutraSource ( CarmaContext context,
float  xpos,
float  ypos,
float  lambda,
float  mag,
float  zerop,
long  size,
string  type,
CarmaObj< float > *  pupil,
int  Npts,
int  device 
)

◆ SutraSource() [2/2]

SutraSource::SutraSource ( CarmaContext context,
float  xpos,
float  ypos,
float  lambda,
float  mag,
float  zerop,
long  size,
string  type,
int  device 
)

◆ ~SutraSource()

SutraSource::~SutraSource ( )

Member Function Documentation

◆ add_layer()

int SutraSource::add_layer ( string  type,
int  idx,
float  xoff,
float  yoff 
)

◆ comp_image()

int SutraSource::comp_image ( int  puponly = 0,
bool  comp_le = true 
)

◆ comp_strehl()

int SutraSource::comp_strehl ( bool  do_fit)

◆ init_source()

int SutraSource::init_source ( CarmaContext context,
float  xpos,
float  ypos,
float  lambda,
float  mag,
float  zerop,
long  size,
string  type,
int  device 
)

◆ init_strehlmeter()

int SutraSource::init_strehlmeter ( )

◆ raytrace() [1/5]

int SutraSource::raytrace ( bool  rst = false)

◆ raytrace() [2/5]

int SutraSource::raytrace ( SutraAtmos atmos,
bool  async = false 
)

◆ raytrace() [3/5]

int SutraSource::raytrace ( SutraDms ydms,
bool  rst = false,
bool  do_phase_var = true,
bool  async = false 
)

◆ raytrace() [4/5]

int SutraSource::raytrace ( SutraTelescope tel,
bool  rst = false 
)

◆ raytrace() [5/5]

int SutraSource::raytrace ( SutraTelescope tel,
SutraAtmos atmos,
SutraDms ydms,
bool  do_phase_var = true,
bool  async = false 
)

◆ raytrace_shm()

int SutraSource::raytrace_shm ( SutraAtmos atmos)

◆ remove_layer()

int SutraSource::remove_layer ( string  type,
int  idx 
)

◆ reset_phase()

int SutraSource::reset_phase ( )

◆ reset_strehlmeter()

int SutraSource::reset_strehlmeter ( )

Member Data Documentation

◆ block_size

int SutraSource::block_size

optimum block size of device

Definition at line 69 of file sutra_source.h.

◆ current_context

CarmaContext* SutraSource::current_context

Definition at line 39 of file sutra_source.h.

◆ d_amplipup

CarmaObj<cuFloatComplex>* SutraSource::d_amplipup

the complex amplitude in the pupil plane

Definition at line 100 of file sutra_source.h.

◆ d_image_le

CarmaObj<float>* SutraSource::d_image_le

the long exposure image for this target

Definition at line 98 of file sutra_source.h.

◆ d_image_se

CarmaObj<float>* SutraSource::d_image_se

the resulting image for this target

Definition at line 96 of file sutra_source.h.

◆ d_lgs

SutraLGS* SutraSource::d_lgs

the lgs object

Definition at line 92 of file sutra_source.h.

◆ d_ncpa_phase

CarmaObj<float>* SutraSource::d_ncpa_phase

ncpa phase

Definition at line 110 of file sutra_source.h.

◆ d_phase

SutraPhase* SutraSource::d_phase

phase for this target

Definition at line 87 of file sutra_source.h.

◆ d_phasepts

CarmaObj<float>* SutraSource::d_phasepts

the valid phase points in the pupil (target only)

Definition at line 102 of file sutra_source.h.

◆ d_pupil

CarmaObj<float>* SutraSource::d_pupil

the pupil mask

Definition at line 94 of file sutra_source.h.

◆ d_smallimg

CarmaObj<float>* SutraSource::d_smallimg

temporary array for accurate strehl computation

Definition at line 112 of file sutra_source.h.

◆ d_smallimg_size

const int SutraSource::d_smallimg_size = 3

Definition at line 113 of file sutra_source.h.

◆ d_wherephase

CarmaObj<int>* SutraSource::d_wherephase

positions of valid phase points in the pupil (target only)

Definition at line 104 of file sutra_source.h.

◆ device

int SutraSource::device

device #

Definition at line 41 of file sutra_source.h.

◆ dx

float SutraSource::dx

WFS misalignment.

Definition at line 63 of file sutra_source.h.

◆ dy

float SutraSource::dy

WFS misalignment.

Definition at line 65 of file sutra_source.h.

◆ G

float SutraSource::G

Magnifying factor for WFS misalignment.

Definition at line 59 of file sutra_source.h.

◆ lambda

float SutraSource::lambda

imaging lambda

Definition at line 51 of file sutra_source.h.

◆ lgs

bool SutraSource::lgs

flag for lgs

Definition at line 57 of file sutra_source.h.

◆ mag

float SutraSource::mag

brightness of target

Definition at line 49 of file sutra_source.h.

◆ npts

long SutraSource::npts

number of points in the pupil

Definition at line 47 of file sutra_source.h.

◆ phase_telemetry

CarmaHostObj<float>* SutraSource::phase_telemetry

Definition at line 90 of file sutra_source.h.

◆ phase_var

float SutraSource::phase_var

current phase variance in the pupil

Definition at line 80 of file sutra_source.h.

◆ phase_var_avg

float SutraSource::phase_var_avg

average phase variance in the pupil

Definition at line 82 of file sutra_source.h.

◆ phase_var_count

int SutraSource::phase_var_count

counter for average phase variance in the pupil

Definition at line 84 of file sutra_source.h.

◆ posx

float SutraSource::posx

x position of target on the sky

Definition at line 43 of file sutra_source.h.

◆ posy

float SutraSource::posy

y position of target on the sky

Definition at line 45 of file sutra_source.h.

◆ ref_strehl

float SutraSource::ref_strehl

reference for strehl computation

Definition at line 76 of file sutra_source.h.

◆ scale

float SutraSource::scale

phase scale

Definition at line 55 of file sutra_source.h.

◆ strehl_counter

int SutraSource::strehl_counter

counter for le strehl computation

Definition at line 78 of file sutra_source.h.

◆ strehl_le

float SutraSource::strehl_le

long exposure strehl

Definition at line 74 of file sutra_source.h.

◆ strehl_se

float SutraSource::strehl_se

short exposure strehl

Definition at line 72 of file sutra_source.h.

◆ thetaML

float SutraSource::thetaML

Pupil rotation angle.

Definition at line 61 of file sutra_source.h.

◆ type

string SutraSource::type

type of source : target / wfs

Definition at line 67 of file sutra_source.h.

◆ xoff

map<type_screen, float> SutraSource::xoff

x reference for raytracing

Definition at line 106 of file sutra_source.h.

◆ yoff

map<type_screen, float> SutraSource::yoff

y reference for raytracing

Definition at line 108 of file sutra_source.h.

◆ zp

float SutraSource::zp

imaging zero point

Definition at line 53 of file sutra_source.h.


The documentation for this class was generated from the following file: