VIRCAM Pipeline  2.3.12
Functions
casu_mask

These are methods for manipulating the casu_mask bad pixel mask objects. More...

Functions

casu_mask * casu_mask_define (cpl_frameset *framelist, cpl_size *labels, cpl_size nlab, const char *conftag, const char *bpmtag)
 
casu_mask * casu_objmask_define (cpl_frame *frame)
 
int casu_mask_load (casu_mask *m, int nexten, int nx, int ny)
 
void casu_mask_delete (casu_mask *m)
 
casu_mask * casu_mask_wrap_bpm (unsigned char *inbpm, int nx, int ny)
 
void casu_mask_clear (casu_mask *m)
 
void casu_mask_force (casu_mask *m, int nx, int ny)
 
casu_fits * casu_mask_get_fits (casu_mask *m)
 
const char * casu_mask_get_filename (casu_mask *m)
 
int casu_mask_get_size_x (casu_mask *m)
 
int casu_mask_get_size_y (casu_mask *m)
 
int casu_mask_get_type (casu_mask *m)
 
unsigned char * casu_mask_get_data (casu_mask *m)
 

Detailed Description

These are methods for manipulating the casu_mask bad pixel mask objects.

Author
Jim Lewis, CASU

Function Documentation

◆ casu_mask_clear()

void casu_mask_clear ( casu_mask *  m)
Name:
casu_mask_clear
Purpose:
Delete internal workspace associated with a mask object, but keep the object itself intact.
Description:
All of the internal workspace in a mask object is freed. The the memory holding the mask object itself is left alone.
Language:
C
Parameters
mThe input casu_mask object
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 357 of file casu_mask.c.

Referenced by casu_mask_delete().

◆ casu_mask_define()

casu_mask* casu_mask_define ( cpl_frameset *  framelist,
cpl_size *  labels,
cpl_size  nlab,
const char *  conftag,
const char *  bpmtag 
)
Name:
casu_mask_define
Purpose:
Define a mask type from a given input frameset
Description
An input frameset is searched for either a master bad pixel mask or a master confidence map. (BPM is searched for first). If one of them is found then the frame is returned along with a flag defining the mask type.
Language:
C
Parameters
framelistThe input frame list
labelsThe input frame list labels
nlabThe number of labels
conftagThe tag for a confidence map
bpmtagThe tag for a bad pixel mask
Returns
The mask structure
Author
Jim Lewis, CASU

Definition at line 89 of file casu_mask.c.

References casu_frameset_subgroup_1().

◆ casu_mask_delete()

void casu_mask_delete ( casu_mask *  m)
Name:
casu_mask_delete
Purpose:
Delete internal workspace associated with a mask object, then delete the object itself.
Description:
All of the internal workspace in a mask object is freed. The the memory holding the mask object itself is freed.
Language:
C
Parameters
mThe input casu_mask object
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 276 of file casu_mask.c.

References casu_mask_clear().

◆ casu_mask_force()

void casu_mask_force ( casu_mask *  m,
int  nx,
int  ny 
)
Name:
casu_mask_force
Purpose:
Forces a predefined mask out of the structure to be replaced by a MASK_NONE type.
Description:
This routine is used as a catch-all in case there is a problem in loading an extension of a mask with casu_mask_load. In that case calling this routine will force out the old mask definition and replace it with a safe MASK_NONE option.
Language:
C
Parameters
mThe input casu_mask object
nxThe X size of the mask array
nyThe Y size of the mask array
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 394 of file casu_mask.c.

◆ casu_mask_get_data()

unsigned char* casu_mask_get_data ( casu_mask *  m)
Name:
casu_mask_get_data
Purpose:
Get the mask data array
Description:
Get the mask data array
Language:
C
Parameters
mThe input casu_mask object
Returns
The bad pixel mask data array
Author
Jim Lewis, CASU

Definition at line 544 of file casu_mask.c.

Referenced by casu_defringe(), casu_mkconf(), casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_simplesky_mask(), vircam_destripe(), and vircam_tilesky().

◆ casu_mask_get_filename()

const char* casu_mask_get_filename ( casu_mask *  m)
Name:
casu_mask_get_filename
Purpose:
Get the filename from a casu_mask structure
Description:
Get the filename from a casu_mask structure
Language:
C
Parameters
mThe input casu_mask object
Returns
The char pointer to the file name
Author
Jim Lewis, CASU

Definition at line 447 of file casu_mask.c.

Referenced by casu_mkconf().

◆ casu_mask_get_fits()

casu_fits* casu_mask_get_fits ( casu_mask *  m)
Name:
casu_mask_get_fits
Purpose:
Get the casu_fits structure from a mask object
Description:
Get the casu_fits structure from a mask object
Language:
C
Parameters
mThe input casu_mask object
Returns
The casu_fits structure from the mask object
Author
Jim Lewis, CASU

Definition at line 424 of file casu_mask.c.

◆ casu_mask_get_size_x()

int casu_mask_get_size_x ( casu_mask *  m)
Name:
casu_mask_get_size_x
Purpose:
Get the x size of the mask data array
Description:
Get the x size of the mask data array
Language:
C
Parameters
mThe input casu_mask object
Returns
The X size of the mask data array
Author
Jim Lewis, CASU

Definition at line 475 of file casu_mask.c.

Referenced by casu_mkconf(), casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_simplesky_mask(), and vircam_tilesky().

◆ casu_mask_get_size_y()

int casu_mask_get_size_y ( casu_mask *  m)
Name:
casu_mask_get_size_y
Purpose:
Get the y size of the mask data array
Description:
Get the y size of the mask data array
Language:
C
Parameters
mThe input casu_mask object
Returns
The Y size of the mask data array
Author
Jim Lewis, CASU

Definition at line 498 of file casu_mask.c.

Referenced by casu_mkconf(), casu_pawsky_mask(), casu_pawsky_mask_pre(), casu_simplesky_mask(), and vircam_tilesky().

◆ casu_mask_get_type()

int casu_mask_get_type ( casu_mask *  m)
Name:
casu_mask_get_type
Purpose:
Get the mask type
Description:
Get the mask type
Language:
C
Parameters
mThe input casu_mask object
Returns
The mask type. See casu_mask.h for more details
Author
Jim Lewis, CASU

Definition at line 521 of file casu_mask.c.

Referenced by casu_mkconf().

◆ casu_mask_load()

int casu_mask_load ( casu_mask *  m,
int  nexten,
int  nx,
int  ny 
)
Name:
casu_mask_load
Purpose:
Load the image from an input mask object
Description:
The image from an input casu_mask object is loaded
Language:
C
Parameters
mThe input mask object
nextenThe image extension that you want to load.
nxThe X dimension of the data array (in case the image is undefined)
nyThe Y dimension of the data array (in case the image is undefined)
Returns
The usual casu status variable
Author
Jim Lewis, CASU

Definition at line 214 of file casu_mask.c.

References casu_fits_delete(), casu_fits_get_image(), and casu_fits_load().

◆ casu_mask_wrap_bpm()

casu_mask* casu_mask_wrap_bpm ( unsigned char *  inbpm,
int  nx,
int  ny 
)
Name:
casu_mask_wrap_bpm
Purpose:
Wrap a bpm data array in a casu_mask structure
Description:
A skeletal casu_mask structure is created and a given bad pixel mask is copied to the data array
Language:
C
Parameters
inbpmThe input bad pixel map
nxThe X dimension of the map
nyThe Y dimension of the map
Returns
The input bad pixel mask wrapped as casu_mask structure
Author
Jim Lewis, CASU

Definition at line 309 of file casu_mask.c.

References casu_fits_wrap().

◆ casu_objmask_define()

casu_mask* casu_objmask_define ( cpl_frame *  frame)
Name:
casu_objmask_define
Purpose:
Define a mask structure from an object mask frame
Description
A mask structure is defined from an input object mask frame. These behave just like a bad pixel mask.
Language:
C
Parameters
frameThe input frame
Returns
The mask structure
Author
Jim Lewis, CASU

Definition at line 163 of file casu_mask.c.