cacao  Release 0.1.03-dev
Compute And Control For Adaptive Optics
img_reduce.c File Reference

Image analysis functions. More...

#include <stdint.h>
#include <unistd.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/mman.h>
#include <err.h>
#include <fcntl.h>
#include <sched.h>
#include <ncurses.h>
#include <semaphore.h>
#include <fitsio.h>
#include "CommandLineInterface/CLIcore.h"
#include "00CORE/00CORE.h"
#include "COREMOD_memory/COREMOD_memory.h"
#include "COREMOD_iofits/COREMOD_iofits.h"
#include "COREMOD_arith/COREMOD_arith.h"
#include "image_filter/image_filter.h"
#include "fft/fft.h"
#include "img_reduce/img_reduce.h"
Include dependency graph for img_reduce.c:

Macros

#define MODULE_SHORTNAME_DEFAULT   ""
 
#define MODULE_DESCRIPTION   "Image analysis for astronomy: basic routines"
 
#define MODULE_APPLICATION   "milk"
 

Functions

errno_t IMG_REDUCE_cubesimplestat_cli ()
 
errno_t IMG_REDUCE_cleanbadpix_fast_cli ()
 
errno_t IMG_REDUCE_cleanbadpix_stream_fast_cli ()
 
errno_t IMG_REDUCE_centernormim_cli ()
 
errno_t IMG_REDUCE_cubeprocess_cli ()
 
static errno_t init_module_CLI ()
 
imageID IMG_REDUCE_cubesimplestat (const char *IDin_name)
 
errno_t clean_bad_pix (const char *IDin_name, const char *IDbadpix_name)
 removes bad pixels in cube More...
 
long IMG_REDUCE_cleanbadpix_fast_precompute (const char *IDmask_name)
 
imageID IMG_REDUCE_cleanbadpix_fast (const char *IDname, const char *IDbadpix_name, const char *IDoutname, int streamMode)
 
errno_t IMG_REDUCE_correlMatrix (const char *IDin_name, const char *IDmask_name, const char *IDout_name)
 
imageID IMG_REDUCE_centernormim (const char *IDin_name, const char *IDref_name, const char *IDout_name, long xcent0, long ycent0, long xcentsize, long ycentsize, int mode, int semtrig)
 
errno_t IMG_REDUCE_cubeprocess (const char *IDin_name)
 

Variables

int badpixclean_init = 0
 
long badpixclean_NBop
 
long * badpixclean_array_indexin
 
long * badpixclean_array_indexout
 
float * badpixclean_array_coeff
 
long badpixclean_NBbadpix
 
long * badpixclean_indexlist
 

Detailed Description

Image analysis functions.

Misc image analysis functions

Macro Definition Documentation

◆ MODULE_APPLICATION

#define MODULE_APPLICATION   "milk"

◆ MODULE_DESCRIPTION

#define MODULE_DESCRIPTION   "Image analysis for astronomy: basic routines"

◆ MODULE_SHORTNAME_DEFAULT

#define MODULE_SHORTNAME_DEFAULT   ""

Function Documentation

◆ clean_bad_pix()

errno_t clean_bad_pix ( const char *  IDin_name,
const char *  IDbadpix_name 
)

removes bad pixels in cube

◆ IMG_REDUCE_centernormim()

imageID IMG_REDUCE_centernormim ( const char *  IDin_name,
const char *  IDref_name,
const char *  IDout_name,
long  xcent0,
long  ycent0,
long  xcentsize,
long  ycentsize,
int  mode,
int  semtrig 
)

Recenter and normalize image

if mode = 1, shared memory loop

compute offset

◆ IMG_REDUCE_centernormim_cli()

errno_t IMG_REDUCE_centernormim_cli ( )

◆ IMG_REDUCE_cleanbadpix_fast()

imageID IMG_REDUCE_cleanbadpix_fast ( const char *  IDname,
const char *  IDbadpix_name,
const char *  IDoutname,
int  streamMode 
)

◆ IMG_REDUCE_cleanbadpix_fast_cli()

errno_t IMG_REDUCE_cleanbadpix_fast_cli ( )

◆ IMG_REDUCE_cleanbadpix_fast_precompute()

long IMG_REDUCE_cleanbadpix_fast_precompute ( const char *  IDmask_name)

◆ IMG_REDUCE_cleanbadpix_stream_fast_cli()

errno_t IMG_REDUCE_cleanbadpix_stream_fast_cli ( )

◆ IMG_REDUCE_correlMatrix()

errno_t IMG_REDUCE_correlMatrix ( const char *  IDin_name,
const char *  IDmask_name,
const char *  IDout_name 
)

◆ IMG_REDUCE_cubeprocess()

errno_t IMG_REDUCE_cubeprocess ( const char *  IDin_name)

this is the main routine to pre-process a cube stream of images (PSFs) for high contrast imaging stability analysis

Optional inputs: calib_darkim (single frame or cube) calib_badpix (single frame) calib_flat

remove dark

remove bad pixels

compute photocenter

◆ IMG_REDUCE_cubeprocess_cli()

errno_t IMG_REDUCE_cubeprocess_cli ( )

◆ IMG_REDUCE_cubesimplestat()

imageID IMG_REDUCE_cubesimplestat ( const char *  IDin_name)

compute ave, RMS

◆ IMG_REDUCE_cubesimplestat_cli()

errno_t IMG_REDUCE_cubesimplestat_cli ( )

◆ init_module_CLI()

static errno_t init_module_CLI ( )
static

Variable Documentation

◆ badpixclean_array_coeff

float* badpixclean_array_coeff

◆ badpixclean_array_indexin

long* badpixclean_array_indexin

◆ badpixclean_array_indexout

long* badpixclean_array_indexout

◆ badpixclean_indexlist

long* badpixclean_indexlist

◆ badpixclean_init

int badpixclean_init = 0

Image analysis/reduction routines for astronomy

◆ badpixclean_NBbadpix

long badpixclean_NBbadpix

◆ badpixclean_NBop

long badpixclean_NBop