COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutra_wfs.h File Reference
#include <carma_utils.h>
#include <sutra_lgs.h>
#include <sutra_phase.h>
#include <sutra_target.h>
#include <sutra_telemetry.h>
#include <sutra_telescope.h>
#include <sutra_utils.h>
#include <map>
#include <vector>
Include dependency graph for sutra_wfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SutraWfs
 this class provides the wfs features to COMPASS More...
 

Functions

int fillcamplipup (cuFloatComplex *amplipup, float *phase, float *offset, float *mask, float scale, int *istart, int *jstart, int *ivalid, int *jvalid, int nphase, int npup, int Nfft, int Ntot, CarmaDevice *device, int offset_phase)
 
int fillcamplipup (cuFloatComplex *amplipup, cuFloatComplex *phase, float *offset, int *istart, int *jstart, int *ivalid, int *jvalid, int nphase, int N, int Nfft, int Ntot, CarmaDevice *device)
 
int fillfsamplipup (cuFloatComplex *d_odata, float *idata, float *mask, float scale, int Nfft, int N, CarmaDevice *device)
 
int indexfill (cuFloatComplex *d_odata, cuFloatComplex *d_idata, int *indx, int nx, int Nx, int N, CarmaDevice *device)
 
int fillbincube (float *bcube, cuFloatComplex *hrimage, int *indxpix, int Nfft, int Npix, int Nrebin, int Nsub, CarmaDevice *device)
 
int fillbincube_async (CarmaStreams *streams, float *bcube, cuFloatComplex *hrimage, int *indxpix, int Nfft, int Npix, int Nrebin, int Nsub, CarmaDevice *device)
 
int fillbinimg (float *bimage, float *bcube, int npix, int nsub, int Nsub, int *ivalid, int *jvalid, bool add, CarmaDevice *device)
 
int fillbinimg_async (CarmaStreams *streams, CarmaObj< float > *bimage, CarmaObj< float > *bcube, int npix, int nsub, int Nsub, int *ivalid, int *jvalid, bool add, CarmaDevice *device)
 
int fillbinimg_async (CarmaHostObj< float > *image_telemetry, float *bimage, float *bcube, int npix, int nsub, int Nsub, int *ivalid, int *jvalid, int nim, bool add, CarmaDevice *device)
 
int convolve_cube (cuFloatComplex *d_odata, cuFloatComplex *d_idata, int N, int n, CarmaDevice *device)
 
template<class T >
int digitalize (T *camimg, float *binimg, float *dark, float *flat, int max_flux_per_pix, int max_pix_value, int N, CarmaDevice *device)
 
template<class T >
void subap_reduce (int size, int threads, int blocks, T *d_idata, T *d_odata, CarmaDevice *device)
 
template<class T >
void subap_reduce_async (int threads, int blocks, CarmaStreams *streams, T *d_idata, T *d_odata)
 
template<class T >
void subap_reduce (int size, int threads, int blocks, T *d_idata, T *d_odata, T thresh, CarmaDevice *device)
 
template<class T >
void subap_reduce_new (int size, int threads, int blocks, T *d_idata, T *d_odata, T thresh, CarmaDevice *device)
 
template<class T >
void subap_reduce (int size, int threads, int blocks, T *d_idata, T *d_odata, T *weights, CarmaDevice *device)
 
template<class T >
void phase_reduce (int threads, int blocks, T *d_idata, T *d_odata, int *indx, T alpha)
 
template<class T >
void phase_derive (int size, int threads, int blocks, int n, T *d_idata, T *d_odata, int *indx, T *mask, T alpha, float *fluxPerSub)
 
template<class T >
void phase_project (int nphase, int nvalid, T *d_idata, T *d_odata, int *indx, T *d_ttprojmat, T *d_ttprojvec, CarmaDevice *device)
 
template<class Tout , class Tin >
void pyr_getpup (Tout *d_odata, Tin *d_idata, Tout *d_offsets, Tin *d_pup, int np, float lambda, CarmaDevice *device)
 
template<class Tout , class Tin >
void pyr_getpup (Tout *d_odata, Tin *d_idata, Tin *d_pup, int np, int N, float lambda, float cx, float cy, CarmaDevice *device)
 
template<class T >
void pyr_rollmod (T *d_odata, T *d_idata, T *d_mask, float cx, float cy, int np, int ns, CarmaDevice *device)
 
template<class T >
void pyr_fillbin (T *d_odata, T *d_idata, int nrebin, int np, int ns, int nim, CarmaDevice *device)
 
template<class T >
int pyr_fillbinimg (T *bimage, const T *bcube, const int nxsub, const bool add, CarmaDevice *device)
 
template<class T >
int pyr_fillbinimg (T *oimage, const T *image, const int n, const int N, const int rebin, const bool add, CarmaDevice *device)
 
template<class Tin , class Tout >
void pyr_abs2 (Tout *d_odata, Tin *d_idata, Tout fact, int ns, int nim, CarmaDevice *device)
 
template<class Tout , class Tin >
void apply_submask (Tout *d_odata, Tin *d_mask, int n, CarmaDevice *device)
 
template<class T >
void pyr_submaskpyr (T *d_odata, T *d_mask, int n, CarmaDevice *device)
 
template<class T >
void pyr_submaskpyr (T *d_odata, float *d_mask, int n, CarmaDevice *device)
 
template<class Tout , class Tin >
void pyr_abs (Tout *d_odata, Tin *d_idata, int ns, int nim, CarmaDevice *device)
 
template<class Tout , class Tin >
void pyr_submask3d (Tout *d_odata, Tin *d_mask, int n, int nim, CarmaDevice *device)
 
template<class T >
void pyr_intensities (T *d_odata, T *d_idata, int *subindx, int *subindy, int ns, int nvalid, int nim, CarmaDevice *device)
 
template<class T >
void pyr_intensities (T *d_odata, T *d_idata, int *subindx, int *subindy, int ns, int nvalid, CarmaDevice *device)
 
template<class T >
void pyr_fact (T *d_data, T fact, int n, int nim, CarmaDevice *device)
 
void pyr_fact (cuFloatComplex *d_data, float fact, int n, int nim, CarmaDevice *device)
 
void pyr_fact (float *d_data, float fact1, float *fact2, int n, int nim, CarmaDevice *device)
 
template<class Tin , class Tout >
void roof_abs2 (Tout *d_odata, Tin *d_idata, Tout fact, int ns, int nim, CarmaDevice *device)
 
template<class T >
void roof_intensities (T *d_odata, T *d_idata, int *subindx, int *subindy, int ns, int nvalid, int nim, CarmaDevice *device)
 
template<class T >
void roof_rollmod (T *d_odata, T *d_idata, T *d_mask, float cx, float cy, int np, int ns, CarmaDevice *device)
 
template<class T >
void roof_fillbin (T *d_odata, T *d_idata, int nrebin, int np, int ns, int nim, CarmaDevice *device)
 
void copy_imgin_binimg (float *binimg, int *validsubsx, int *validsubsy, int Nb, float *img, int *validx, int *validy, int Nim, int Npix, CarmaDevice *device)
 

Function Documentation

◆ apply_submask()

template<class Tout , class Tin >
void apply_submask ( Tout *  d_odata,
Tin *  d_mask,
int  n,
CarmaDevice device 
)

◆ convolve_cube()

int convolve_cube ( cuFloatComplex *  d_odata,
cuFloatComplex *  d_idata,
int  N,
int  n,
CarmaDevice device 
)

◆ copy_imgin_binimg()

void copy_imgin_binimg ( float *  binimg,
int *  validsubsx,
int *  validsubsy,
int  Nb,
float *  img,
int *  validx,
int *  validy,
int  Nim,
int  Npix,
CarmaDevice device 
)

◆ digitalize()

template<class T >
int digitalize ( T *  camimg,
float *  binimg,
float *  dark,
float *  flat,
int  max_flux_per_pix,
int  max_pix_value,
int  N,
CarmaDevice device 
)

◆ fillbincube()

int fillbincube ( float *  bcube,
cuFloatComplex *  hrimage,
int *  indxpix,
int  Nfft,
int  Npix,
int  Nrebin,
int  Nsub,
CarmaDevice device 
)

◆ fillbincube_async()

int fillbincube_async ( CarmaStreams streams,
float *  bcube,
cuFloatComplex *  hrimage,
int *  indxpix,
int  Nfft,
int  Npix,
int  Nrebin,
int  Nsub,
CarmaDevice device 
)

◆ fillbinimg()

int fillbinimg ( float *  bimage,
float *  bcube,
int  npix,
int  nsub,
int  Nsub,
int *  ivalid,
int *  jvalid,
bool  add,
CarmaDevice device 
)

◆ fillbinimg_async() [1/2]

int fillbinimg_async ( CarmaHostObj< float > *  image_telemetry,
float *  bimage,
float *  bcube,
int  npix,
int  nsub,
int  Nsub,
int *  ivalid,
int *  jvalid,
int  nim,
bool  add,
CarmaDevice device 
)

◆ fillbinimg_async() [2/2]

int fillbinimg_async ( CarmaStreams streams,
CarmaObj< float > *  bimage,
CarmaObj< float > *  bcube,
int  npix,
int  nsub,
int  Nsub,
int *  ivalid,
int *  jvalid,
bool  add,
CarmaDevice device 
)

◆ fillcamplipup() [1/2]

int fillcamplipup ( cuFloatComplex *  amplipup,
cuFloatComplex *  phase,
float *  offset,
int *  istart,
int *  jstart,
int *  ivalid,
int *  jvalid,
int  nphase,
int  N,
int  Nfft,
int  Ntot,
CarmaDevice device 
)

◆ fillcamplipup() [2/2]

int fillcamplipup ( cuFloatComplex *  amplipup,
float *  phase,
float *  offset,
float *  mask,
float  scale,
int *  istart,
int *  jstart,
int *  ivalid,
int *  jvalid,
int  nphase,
int  npup,
int  Nfft,
int  Ntot,
CarmaDevice device,
int  offset_phase 
)

◆ fillfsamplipup()

int fillfsamplipup ( cuFloatComplex *  d_odata,
float *  idata,
float *  mask,
float  scale,
int  Nfft,
int  N,
CarmaDevice device 
)

◆ indexfill()

int indexfill ( cuFloatComplex *  d_odata,
cuFloatComplex *  d_idata,
int *  indx,
int  nx,
int  Nx,
int  N,
CarmaDevice device 
)

◆ phase_derive()

template<class T >
void phase_derive ( int  size,
int  threads,
int  blocks,
int  n,
T *  d_idata,
T *  d_odata,
int *  indx,
T *  mask,
alpha,
float *  fluxPerSub 
)

◆ phase_project()

template<class T >
void phase_project ( int  nphase,
int  nvalid,
T *  d_idata,
T *  d_odata,
int *  indx,
T *  d_ttprojmat,
T *  d_ttprojvec,
CarmaDevice device 
)

◆ phase_reduce()

template<class T >
void phase_reduce ( int  threads,
int  blocks,
T *  d_idata,
T *  d_odata,
int *  indx,
alpha 
)

◆ pyr_abs()

template<class Tout , class Tin >
void pyr_abs ( Tout *  d_odata,
Tin *  d_idata,
int  ns,
int  nim,
CarmaDevice device 
)

◆ pyr_abs2()

template<class Tin , class Tout >
void pyr_abs2 ( Tout *  d_odata,
Tin *  d_idata,
Tout  fact,
int  ns,
int  nim,
CarmaDevice device 
)

◆ pyr_fact() [1/3]

void pyr_fact ( cuFloatComplex *  d_data,
float  fact,
int  n,
int  nim,
CarmaDevice device 
)

◆ pyr_fact() [2/3]

void pyr_fact ( float *  d_data,
float  fact1,
float *  fact2,
int  n,
int  nim,
CarmaDevice device 
)

◆ pyr_fact() [3/3]

template<class T >
void pyr_fact ( T *  d_data,
fact,
int  n,
int  nim,
CarmaDevice device 
)

◆ pyr_fillbin()

template<class T >
void pyr_fillbin ( T *  d_odata,
T *  d_idata,
int  nrebin,
int  np,
int  ns,
int  nim,
CarmaDevice device 
)

◆ pyr_fillbinimg() [1/2]

template<class T >
int pyr_fillbinimg ( T *  bimage,
const T *  bcube,
const int  nxsub,
const bool  add,
CarmaDevice device 
)

◆ pyr_fillbinimg() [2/2]

template<class T >
int pyr_fillbinimg ( T *  oimage,
const T *  image,
const int  n,
const int  N,
const int  rebin,
const bool  add,
CarmaDevice device 
)

◆ pyr_getpup() [1/2]

template<class Tout , class Tin >
void pyr_getpup ( Tout *  d_odata,
Tin *  d_idata,
Tin *  d_pup,
int  np,
int  N,
float  lambda,
float  cx,
float  cy,
CarmaDevice device 
)

◆ pyr_getpup() [2/2]

template<class Tout , class Tin >
void pyr_getpup ( Tout *  d_odata,
Tin *  d_idata,
Tout *  d_offsets,
Tin *  d_pup,
int  np,
float  lambda,
CarmaDevice device 
)

◆ pyr_intensities() [1/2]

template<class T >
void pyr_intensities ( T *  d_odata,
T *  d_idata,
int *  subindx,
int *  subindy,
int  ns,
int  nvalid,
CarmaDevice device 
)

◆ pyr_intensities() [2/2]

template<class T >
void pyr_intensities ( T *  d_odata,
T *  d_idata,
int *  subindx,
int *  subindy,
int  ns,
int  nvalid,
int  nim,
CarmaDevice device 
)

◆ pyr_rollmod()

template<class T >
void pyr_rollmod ( T *  d_odata,
T *  d_idata,
T *  d_mask,
float  cx,
float  cy,
int  np,
int  ns,
CarmaDevice device 
)

◆ pyr_submask3d()

template<class Tout , class Tin >
void pyr_submask3d ( Tout *  d_odata,
Tin *  d_mask,
int  n,
int  nim,
CarmaDevice device 
)

◆ pyr_submaskpyr() [1/2]

template<class T >
void pyr_submaskpyr ( T *  d_odata,
float *  d_mask,
int  n,
CarmaDevice device 
)

◆ pyr_submaskpyr() [2/2]

template<class T >
void pyr_submaskpyr ( T *  d_odata,
T *  d_mask,
int  n,
CarmaDevice device 
)

◆ roof_abs2()

template<class Tin , class Tout >
void roof_abs2 ( Tout *  d_odata,
Tin *  d_idata,
Tout  fact,
int  ns,
int  nim,
CarmaDevice device 
)

◆ roof_fillbin()

template<class T >
void roof_fillbin ( T *  d_odata,
T *  d_idata,
int  nrebin,
int  np,
int  ns,
int  nim,
CarmaDevice device 
)

◆ roof_intensities()

template<class T >
void roof_intensities ( T *  d_odata,
T *  d_idata,
int *  subindx,
int *  subindy,
int  ns,
int  nvalid,
int  nim,
CarmaDevice device 
)

◆ roof_rollmod()

template<class T >
void roof_rollmod ( T *  d_odata,
T *  d_idata,
T *  d_mask,
float  cx,
float  cy,
int  np,
int  ns,
CarmaDevice device 
)

◆ subap_reduce() [1/3]

template<class T >
void subap_reduce ( int  size,
int  threads,
int  blocks,
T *  d_idata,
T *  d_odata,
CarmaDevice device 
)

◆ subap_reduce() [2/3]

template<class T >
void subap_reduce ( int  size,
int  threads,
int  blocks,
T *  d_idata,
T *  d_odata,
T *  weights,
CarmaDevice device 
)

◆ subap_reduce() [3/3]

template<class T >
void subap_reduce ( int  size,
int  threads,
int  blocks,
T *  d_idata,
T *  d_odata,
thresh,
CarmaDevice device 
)

◆ subap_reduce_async()

template<class T >
void subap_reduce_async ( int  threads,
int  blocks,
CarmaStreams streams,
T *  d_idata,
T *  d_odata 
)

◆ subap_reduce_new()

template<class T >
void subap_reduce_new ( int  size,
int  threads,
int  blocks,
T *  d_idata,
T *  d_odata,
thresh,
CarmaDevice device 
)