MAOS
Multithreaded Adaptive Optics Simulator
draw.h File Reference

Data Structures

struct  plot_opts
 
union  plot_opts.__unnamed__
 

Functions

void draw_helper (void)
 
int draw_add (int fd)
 
void draw_final (int reuse)
 
int draw_current (const char *fig, const char *fn)
 
int plot_empty (int sock_draw, const char *fig, const char *fn)
 
int draw (const char *fig, plot_opts opts, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawmap (const char *fig, const map_t *map, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawloc (const char *fig, loc_t *loc, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawopd (const char *fig, loc_t *loc, const dmat *opd, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawgrad (const char *fig, loc_t *saloc, const dmat *grad, int grad2opd, int trs, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawopdamp (const char *fig, loc_t *loc, const dmat *opd, const dmat *amp, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 
int drawints (const char *fig, const loc_t *saloc, const dcell *ints, real *zlim, const char *title, const char *xlabel, const char *ylabel, const char *format,...)
 

Detailed Description

Contains functions for data visualization.


Data Structure Documentation

◆ plot_opts

struct plot_opts
+ Collaboration diagram for plot_opts:
Data Fields
union plot_opts __unnamed__
int ngroup
int maxlen number of lines
loc_t ** loc limit maximum nx
const dcell * dc
const int32_t * style
const real * zlim
const real * limit
const int zlog
const int ctype
const char * xylog
const dmat * cir
const char *const *const legend

◆ plot_opts.__unnamed__

union plot_opts.__unnamed__
+ Collaboration diagram for plot_opts.__unnamed__:
Data Fields
const dmat * image
const cmat * cimage

Function Documentation

◆ draw_helper()

void draw_helper ( void  )

A helper routine that forks in the early stage to launch drawdaemon. Retired.

◆ draw_add()

int draw_add ( int  sock)

Add fd to list of drawing socks

◆ draw_final()

void draw_final ( int  reuse)

Tell drawdaemon that this client will no long use the socket. Send the socket to scheduler for future reuse.

◆ draw_current()

int draw_current ( const char *  fig,
const char *  fn 
)

Check whether what we are drawing is current page of any drawdaemon.

◆ draw()

int draw ( const char *  fig,
plot_opts  opts,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Plot the coordinates ptsx, ptsy using style, and optionally plot ncir circles.

Parameters
figCategory of the figure
optsAdditional options
titletitle of the plot
xlabelx axis label
ylabely axis label
formatsubcategory of the plot.

◆ drawmap()

int drawmap ( const char *  fig,
const map_t map,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Mapping the floating point numbers onto screen with scaling similar to matlab imagesc. . see ddraw() like ddraw, acting on map object. see ddraw()

◆ drawloc()

int drawloc ( const char *  fig,
loc_t loc,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Plot the loc on the screen. see ddraw()

◆ drawopd()

int drawopd ( const char *  fig,
loc_t loc,
const dmat opd,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Plot the opd using coordinate loc. see ddraw()

◆ drawgrad()

int drawgrad ( const char *  fig,
loc_t saloc,
const dmat gradin,
int  grad2opd,
int  trs,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Plot gradients using CuReD

◆ drawopdamp()

int drawopdamp ( const char *  fig,
loc_t loc,
const dmat opd,
const dmat amp,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Plot opd with coordinate loc where amp is above threshold. see ddraw()

◆ drawints()

int drawints ( const char *  fig,
const loc_t saloc,
const dcell ints,
real *  zlim,
const char *  title,
const char *  xlabel,
const char *  ylabel,
const char *  format,
  ... 
)

Concatenate and plot subaperture images.