Source Extraction Modules



void apclust (ap_t *ap, int np, plstruct *plstr)
 Detect multiple objects from a given Plessey array.



void apinit (ap_t *ap)
 Initialise the ap structure.
void apreinit (ap_t *ap)
 Re-initialise the ap structure.
void apclose (ap_t *ap)
 Close ap structure.



void apline (ap_t *ap, float dat[], float conf[], float smoothed[], float smoothedc[], int j, unsigned char *bpm)
 Detect objects on a line of data.



void areals (ap_t *ap, int iareal[NAREAL])
 Work out the areal profiles for an object.



int classify (vir_tfits *catalogue, cpl_propertylist *plist, float minsize, int cattype)
 Do star/galaxy classification.



void tabinit (ap_t *ap)
 Initialise catalogues.
int do_seeing (ap_t *ap)
 Do seeing estimate.
int process_results (ap_t *ap)
 Process results.
int tabclose (ap_t *ap)
 Close the table structure.
void tabinit_gen (int ncols, const char *ttype[], const char *tunit[], cpl_type tform[])
 Initialise tables (generic).
int do_seeing_gen (ap_t *ap, const char *col_ellipt, const char *col_pkht, char *col_areals[NAREAL])
 Do seeing estimate (generic).



void tabinit_1 (void)
 Initialise type 1 catalogue.
int do_seeing_1 (ap_t *ap)
 Do seeing estimate for type 1 catalogue.
int process_results_1 (ap_t *ap)
 Process results for type 1 catalogue.



void tabinit_2 (void)
 Initialise type 2 catalogue.
int do_seeing_2 (ap_t *ap)
 Do seeing estimate for type 2 catalogue.
int process_results_2 (ap_t *ap)
 Process results for type 2 catalogue.



void tabinit_3 (void)
 Initialise type 1 catalogue.
int do_seeing_3 (ap_t *ap)
 Do seeing estimate for type 3 catalogue.
int process_results_3 (ap_t *ap)
 Process results for type 3 catalogue.



void tabinit_4 (ap_t *ap)
 Initialise type 4 catalogue (object mask).
int do_seeing_4 (ap_t *ap)
 Dummy seeing routine for type 4 catalogue (object mask).
int process_results_4 (ap_t *ap)
 Process results for type 4 catalogue (object mask).
int tabclose_4 (ap_t *ap)
 Close object mask.



int imcore_background (ap_t *ap, int nbsize, float nullval)
 Model and create background map.
int imcore_backstats (ap_t *ap, float nullval, int satonly, float *skymed, float *skysig, float *sat)
 Work out robust background estimate over a whole input image.
void imcore_backest (ap_t *ap, float x, float y, float *skylev, float *skyrms)
 Work out estimated sky for a pixel position.
void imcore_medsig (int *shist, int nh, int ist, int itarg, float *med, float *sig)
 Analyse histogram to work out median and sigma.



int imcore_conf (vir_fits *infile, vir_fits *conf, int ipix, float threshold, int icrowd, float rcore, int nbsize, int cattyp, float filtfwhm, vir_tfits **outcat)
 Do source extraction.



int extend (ap_t *ap, float xniso, float xbar, float ybar, float sxx, float sxy, float syy, float areal0, float tmax, float *ttotal)
 Do aperture integration.



void bfilt (float **xbuf, int nx, int ny)
 Do bilinear median and linear filtering on background values.



int imcore_opm (vir_fits *infile, vir_fits *conf, int ipix, float threshold, int nbsize, float filtfwhm, int niter)
 Create an object mask.



void overlp (ap_t *ap, float parm[IMNUM][NPAR], int *nbit, float xbar, float ybar, float total, int npix, float tmax)
 Deblend overlapping images.



void phopt (ap_t *ap, float parm[IMNUM][NPAR], int nbit, int naper, float apertures[], float cflux[], float badpix[], int nrcore)
 Do multiple profile fitting.



float imcore_exprad (float thresh, float peak, float areal0, float rcores[], int naper)
 Work out the exponential radius for an object.
float imcore_kronrad (float areal0, float rcores[], float cflux[], int naper)
 Work out the Kron radius for an object.
float imcore_petrad (float areal0, float rcores[], float cflux[], int naper)
 Work out the Petrosian.
void imcore_flux (ap_t *ap, float parm[IMNUM][NPAR], int nbit, float apers[], float fluxes[], int nr, float rcores[], float rfluxes[])
 Work out the fluxes for special radii.



void moments (ap_t *ap, float results[])
 Do moments analysis on an object.



void seeing (ap_t *ap, int nrows, float *ellipt, float *pkht, float **areal, float *work, float *fwhm)
 Work out the median seeing.



void restack (ap_t *ap, int ip)
 Free information for an object from the ap structure.
void terminate (ap_t *ap)
 Check for objects that have terminated.
void apfu (ap_t *ap)
 Get rid of the largest contributor in an ap structure.
void extract_data (ap_t *ap, int ip)
 Put data into the Plessey array for an object.

Detailed Description

These are the routines that do the source extraction.


Function Documentation

void apclose ( ap_t *  ap  ) 

Close ap structure.

Name:
apclose
Purpose:
Close the ap structre
Description:
The ap structure has all of its allocated memory freed.
Language:
C
Parameters:
ap The input ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 185 of file apinit.c.

Referenced by overlp().

void apclust ( ap_t *  ap,
int  np,
plstruct *  plstr 
)

Detect multiple objects from a given Plessey array.

Name:
apclust
Purpose:
Detect multiple peaks in a plessey array and write to a new ap structure
Description:
The Plessey array is given from an ap structure for a single object. Given a second ap structure with a revised threshold this routine will attempt to detect multiple objects within that Plessey array.
Language:
C
Parameters:
ap The new input ap structure
np The number of pixels within the input Plessey array
plstr The Plessey array from the original structure with the lower detection threshold.
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 71 of file apclust.c.

References apfu().

Referenced by overlp().

void apfu ( ap_t *  ap  ) 

Get rid of the largest contributor in an ap structure.

Name:
apfu
Purpose:
Get rid of the largest contributor in an ap structure
Description:
The parents in the current ap structure are examined to see which has the largest number of pixels. That parent is junked.
Language:
C
Parameters:
ap The current ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 192 of file terminate.c.

References restack().

Referenced by apclust(), imcore_conf(), and imcore_opm().

void apinit ( ap_t *  ap  ) 

Initialise the ap structure.

Name:
apinit
Purpose:
Initialise the ap structure given some pre-existing information
Description:
The ap structure is initialised. In order for this to be done properly the value of ap->lsiz (the length of the image rows) must be set before calling this routine.
Language:
C
Parameters:
ap The input ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 64 of file apinit.c.

Referenced by imcore_conf(), imcore_opm(), and overlp().

void apline ( ap_t *  ap,
float  dat[],
float  conf[],
float  smoothed[],
float  smoothedc[],
int  j,
unsigned char *  bpm 
)

Detect objects on a line of data.

Name:
apline
Purpose:
Detect objects on a line of data
Description:
Pixels above the defined threshold are detected on a line of data. A search is done in the ap structure to see if the pixel forms part of an object that is already known or whether this is part of a new object. The information is stored in the ap structure linked list.
Language:
C
Parameters:
ap The input ap structure
dat The line of data
conf The confidence map for the line of data
smoothed A smoothed version of the data line.
smoothedc A smoothed version of the confidence map line.
j A number that tells you which row this is in the image
bpm A bad pixel mask for that line
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 75 of file apline.c.

Referenced by imcore_conf(), and imcore_opm().

void apreinit ( ap_t *  ap  ) 

Re-initialise the ap structure.

Name:
apreinit
Purpose:
Re-initialise the ap structre
Description:
The ap structure is reinitialised to the state it was in before we started detecting objects in it. All information about detected objects is erased.
Language:
C
Parameters:
ap The input ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 141 of file apinit.c.

Referenced by overlp().

void areals ( ap_t *  ap,
int  iareal[NAREAL] 
)

Work out the areal profiles for an object.

Name:
areals
Purpose:
Work out the areal profiles for an object
Description:
The pixel list for an object is used to define the areal profiles for that object and a given detection threshold.
Language:
C
Parameters:
ap The input ap structure
iareal The output areal profile array
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 67 of file areals.c.

Referenced by process_results_1(), process_results_2(), and process_results_3().

void bfilt ( float **  xbuf,
int  nx,
int  ny 
)

Do bilinear median and linear filtering on background values.

Name:
bfilt
Purpose:
Do bilinear median and linear filtering on background values
Description:
A map is smoothed using sliding median and mean filters.
Language:
C
Parameters:
xbuf The input map to be smoothed
nx The X dimension of the map
ny The Y dimension of the map
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 70 of file imcore_filter.c.

Referenced by imcore_background().

int classify ( vir_tfits *  catalogue,
cpl_propertylist *  plist,
float  minsize,
int  cattype 
)

Do star/galaxy classification.

Name:
classify
Purpose:
Do star/galaxy classification from a imcore catalogue
Description:
The information in an imcore catalogue is scanned and each object is classified based on a number of shape criteria.
Language:
C
Parameters:
catalogue The input imcore catalogue
plist The propertylist from the primary header of the input image
minsize The minimum size in pixels of objects to be used in the analysis
cattype The catalogue type
Return values:
VIR_OK If everything is OK
VIR_FATAL If the input catalogue is unrecognised.
QC headers:
The following QC parameters are read from the catalogue extension header propertylist
  • MEAN_SKY The mean sky found by imcore
  • SKY_NOISE The sky noise found by imcore The following QC parameters are written to the catalogue extension header propertylist
  • IMAGE_SIZE The average FWHM of stellar objects in the catalogue
  • ELLIPTICITY The average stellar ellipticity
  • POSANG The average position angle on the image
  • APERTURE_CORR The aperture correction for an aperture with a radius of Rcore.
  • NOISE_OBJ The number of noise objects detected on the image
DRS headers:
The following DRS parameters are read from the catalogue extension header propertylist
  • THRESHOL The detection threshold used by imcore
  • RCORE The core radius used by imcore
  • SEEING The averaged seeing found by imcore
  • NXOUT The number of pixels in a row of the original image
  • NYOUT The number of pixels in a column of the original image The following DRS parameters are written to the catalogue extension header propertylist
  • CLASSIFD Set if the catalogue has been classified
Author:
Jim Lewis, CASU

Definition at line 204 of file classify.c.

References vircam_pfits_get_exptime(), vircam_tfits_get_ehu(), and vircam_tfits_get_table().

Referenced by vircam_imcore().

int do_seeing ( ap_t *  ap  ) 

Do seeing estimate.

Name:
do_seeing
Purpose:
Do the seeing estimate
Description:
Wrapper routine to call the relevant routine to work out the seeing for each of the allowed types of catalogues
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all went well
VIR_FATAL If catalogue type is unrecognised
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 117 of file create_table.c.

References do_seeing_1(), do_seeing_2(), do_seeing_3(), and do_seeing_4().

Referenced by imcore_conf().

int do_seeing_1 ( ap_t *  ap  ) 

Do seeing estimate for type 1 catalogue.

Name:
do_seeing_1
Purpose:
Do seeing estimate for type 1 catalogue
Description:
Areal profiles in a type 1 catalogue are analysed and a seeing estimate is extracted
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. Currently this is the only return value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 175 of file create_table_1.c.

References do_seeing_gen().

Referenced by do_seeing().

int do_seeing_2 ( ap_t *  ap  ) 

Do seeing estimate for type 2 catalogue.

Name:
do_seeing_2
Purpose:
Do seeing estimate for type 2 catalogue
Description:
Areal profiles in a type 2 catalogue are analysed and a seeing estimate is extracted
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. Currently this is the only return value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 275 of file create_table_2.c.

References do_seeing_gen().

Referenced by do_seeing().

int do_seeing_3 ( ap_t *  ap  ) 

Do seeing estimate for type 3 catalogue.

Name:
do_seeing_3
Purpose:
Do seeing estimate for type 3 catalogue
Description:
Areal profiles in a type 3 catalogue are analysed and a seeing estimate is extracted
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. Currently this is the only return value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 154 of file create_table_3.c.

References do_seeing_gen().

Referenced by do_seeing().

int do_seeing_4 ( ap_t *  ap  ) 

Dummy seeing routine for type 4 catalogue (object mask).

Name:
do_seeing_4
Purpose:
Do seeing estimate for type 4 catalogue (object mask)
Description:
This is a dummy routine
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. Currently this is the only return value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 108 of file create_table_4.c.

Referenced by do_seeing().

int do_seeing_gen ( ap_t *  ap,
const char *  col_ellipt,
const char *  col_pkht,
char *  col_areals[NAREAL] 
)

Do seeing estimate (generic).

Name:
do_seeing_gen
Purpose:
Do seeing estimate (generic)
Description:
Wrapper routine for doing the seeing estimate
Language:
C
Parameters:
ap The current ap structure
col_ellipt The name of the column for ellipticity
col_pkht The name of the column for the peak height
col_areals The array of names of the areal profile columns
Return values:
VIR_OK If all is ok. This is currently the only value.
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 325 of file create_table.c.

References seeing().

Referenced by do_seeing_1(), do_seeing_2(), and do_seeing_3().

int extend ( ap_t *  ap,
float  xniso,
float  xbar,
float  ybar,
float  sxx,
float  sxy,
float  syy,
float  areal0,
float  tmax,
float *  ttotal 
)

Do aperture integration.

Name:
extend
Purpose:
Do aperture integration
Description:
The integrated flux of an object is calculated using matched ellipses
Language:
C
Parameters:
ap The current ap structure
xniso The isophotal flux
xbar The X position of the object
ybar The Y position of the object
sxx Second moment in X
syy Second moment in Y
sxy Second moment cross term
areal0 The first areal profile
tmax The peak flux of the object
ttotal The output total integrated flux
Return values:
VIR_OK If all went OK. Currently this is the only value.
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 89 of file imcore_extend.c.

Referenced by process_results_1(), and process_results_2().

void extract_data ( ap_t *  ap,
int  ip 
)

Put data into the Plessey array for an object.

Name:
extract_data
Purpose:
Put data into the Plessey array for an object
Description:
The information for the object from a given parent is extracted from the link list in the ap structure and put into the Plessey array in preparation for analysis.
Language:
C
Parameters:
ap The current ap structure
ip The parent in question
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 248 of file terminate.c.

Referenced by terminate().

void imcore_backest ( ap_t *  ap,
float  x,
float  y,
float *  skylev,
float *  skyrms 
)

Work out estimated sky for a pixel position.

Name:
imcore_backest
Purpose:
Work out estimated sky for a pixel position
Description:
Given the coarse background grid, calculate the background at a given image pixel position by doing a bi-linear interpolation of it's position within the grid.
Language:
C
Parameters:
ap The current ap structure
x The X position in question
y The Y position in question
skylev Output sky level at x,y
skyrms Output sky noise at x,y
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 438 of file imcore_background.c.

Referenced by process_results_1(), and process_results_2().

int imcore_background ( ap_t *  ap,
int  nbsize,
float  nullval 
)

Model and create background map.

Name:
imcore_background
Purpose:
Model and create background map
Description:
The image data array is split into cells. In each cell a robust background estimate is obtained. The cell raster is gently smoothed and then used to create a full background map with a bi-linear interpolation scheme.
Language:
C
Parameters:
ap The current ap structure
nbsize The size of the cells in pixels
nullval A null value used to flag bad pixels
Return values:
VIR_OK If all went well. This is currently the only value.
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 81 of file imcore_background.c.

References bfilt(), and imcore_medsig().

Referenced by imcore_conf(), and imcore_opm().

int imcore_backstats ( ap_t *  ap,
float  nullval,
int  satonly,
float *  skymed,
float *  skysig,
float *  sat 
)

Work out robust background estimate over a whole input image.

Name:
imcore_backstats
Purpose:
Work out a robust background estimate over a whole input image
Description:
The image is analysed to work out a robust estimate of the background median, sigma and saturation level.
Language:
C
Parameters:
ap The current ap structure
nullval A null value used to flag bad pixels
satonly If set, then only the saturation level will be computed.
skymed Output sky median
skysig Output sky noise
sat Output saturation level
Return values:
VIR_OK If all went well.
VIR_WARN If there aren't enough good values to do the calculation
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 291 of file imcore_background.c.

References imcore_medsig().

Referenced by imcore_conf(), and imcore_opm().

int imcore_conf ( vir_fits *  infile,
vir_fits *  conf,
int  ipix,
float  threshold,
int  icrowd,
float  rcore,
int  nbsize,
int  cattyp,
float  filtfwhm,
vir_tfits **  outcat 
)

Do source extraction.

Name:
imcore_conf
Purpose:
Do source extraction
Description:
The main driving routine for the imcore source extraction program.
Language:
C
Parameters:
infile The input image
conf The input confidence map
ipix The minimum allowable size of an object
threshold The detection threshold in sigma above sky
icrowd If set then the deblending software will be used
rcore The core radius in pixels
nbsize The smoothing box size for background map estimation
cattyp The type of catalogue to be produced
filtfwhm The FWHM of the smoothing kernel in the detection algorithm
outcat The output table of object
Return values:
VIR_OK if everything is ok
VIR_WARN,VIR_FATAL errors in the called routines
QC headers:
The following values will go into the table extension propertylist
  • SATURATION Saturation level in ADU
  • MEAN_SKY Mean sky brightness in ADU
  • SKY_NOISE Pixel noise at sky level in ADU
DRS headers:
The following values will go into the image extension propertylist
  • SKYLEVEL Mean sky brightness in ADU
  • SKYNOISE Pixel noise at sky level in ADU The following values will go into the table extension propertylist
  • THRESHOL The detection threshold in ADU
  • MINPIX The minimum number of pixels per image
  • CROWDED Flag for crowded field analysis
  • RCORE The core radius for default profile fit in pixels
  • FILTFWHM The FWHM of the smoothing kernel in the detection algorithm
  • SEEING The average FWHM of stellar objects in pixels
  • XCOL The column containing the X position
  • YCOL The column containing the Y position
  • NXOUT The X dimension of the original image array
  • NYOUT The Y dimension of the original image array
Author:
Jim Lewis, CASU

Definition at line 146 of file imcore_conf.c.

References apfu(), apinit(), apline(), do_seeing(), imcore_background(), imcore_backstats(), tabclose(), tabinit(), terminate(), vircam_fits_get_ehu(), vircam_fits_get_image(), vircam_fits_get_nexten(), vircam_fits_get_phu(), vircam_pfits_get_gain(), vircam_tabwcs(), and vircam_tfits_wrap().

Referenced by vircam_imcore().

float imcore_exprad ( float  thresh,
float  peak,
float  areal0,
float  rcores[],
int  naper 
)

Work out the exponential radius for an object.

Name:
imcore_exprad
Purpose:
Work out the exponential radius for an object
Description:
Given the detection threshold, peak flux and lowest areal profile, work out the exponential radius for an object
Language:
C
Parameters:
thresh The detection threshold
peak The peak flux of the object
areal0 The lowest level areal profile for the object
rcores The list of aperture radii used
naper The number of radii used
Returns:
The expoential radius of the object
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 76 of file imcore_radii.c.

Referenced by process_results_2().

void imcore_flux ( ap_t *  ap,
float  parm[IMNUM][NPAR],
int  nbit,
float  apers[],
float  fluxes[],
int  nr,
float  rcores[],
float  rfluxes[] 
)

Work out the fluxes for special radii.

Name:
imcore_flux
Purpose:
Work out the fluxes for special radii
Description:
The fluxes for the 'special' radii (Kron etc) are worked out by an interpolation of the pre-existing aperture photometry to the new radius
Language:
C
Parameters:
ap The current ap structure
parm The parameters for each object already detected
nbit The number of detected objects in the current Plessey structure.
apers The radii of the standard apertures
fluxes The fluxes computed through the standard apertures
nr The number of special apertures
rcores The radii the special apertures
rfluxes The fluxes computed through the special apertures.
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 250 of file imcore_radii.c.

Referenced by process_results_2().

float imcore_kronrad ( float  areal0,
float  rcores[],
float  cflux[],
int  naper 
)

Work out the Kron radius for an object.

Name:
imcore_kronrad
Purpose:
Work out the Kron radius for an object
Description:
Given the lowest areal profile and the circular aperture fluxes already done, calculate the Kron radius
Language:
C
Parameters:
areal0 The lowest level areal profile for the object
rcores The list of aperture radii used
cflux The aperture fluxes for each radius
naper The number of radii used
Returns:
The Kron radius of the object
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 122 of file imcore_radii.c.

Referenced by process_results_2().

void imcore_medsig ( int *  shist,
int  nh,
int  ist,
int  itarg,
float *  med,
float *  sig 
)

Analyse histogram to work out median and sigma.

Name:
imcore_medsig
Purpose:
Analyse histogram to work out median and sigma
Description:
Given a histogram work out the median and sigma of a distribution. A starting point in the histogram can be given, which allows you to ignore bins at the lower end. A target value defines at what point we stop summing the histogram.
Language:
C
Parameters:
shist The input histogram
nh The number of bins in the histogram
ist The first bin position that we will look at
itarg The target value for the summation.
med Output median
sig Output sigma from the first quartile.
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 521 of file imcore_background.c.

Referenced by imcore_background(), and imcore_backstats().

int imcore_opm ( vir_fits *  infile,
vir_fits *  conf,
int  ipix,
float  threshold,
int  nbsize,
float  filtfwhm,
int  niter 
)

Create an object mask.

Name:
imcore_opm
Purpose:
Create an object mask
Description:
The main driving routine for the imcore object mask program.
Language:
C
Parameters:
infile The input image. The output object mask will be stored in the pixel mask for this image.
conf The input confidence map
ipix The minimum allowable size of an object
threshold The detection threshold in sigma above sky
nbsize The smoothing box size for background map estimation
filtfwhm The FWHM of the smoothing kernel in the detection algorithm
niter The number of detection iterations.
Return values:
VIR_OK if everything is ok
VIR_WARN,VIR_FATAL errors in the called routines
QC headers:
None
DRS headers:
The following values will go into the image extension propertylist
  • SKYLEVEL Mean sky brightness in ADU
  • SKYNOISE Pixel noise at sky level in ADU
Author:
Jim Lewis, CASU

Definition at line 112 of file imcore_opm.c.

References apfu(), apinit(), apline(), imcore_background(), imcore_backstats(), tabclose(), tabinit(), terminate(), vircam_fits_get_ehu(), vircam_fits_get_image(), vircam_fits_get_nexten(), and vircam_pfits_get_gain().

Referenced by vircam_opm().

float imcore_petrad ( float  areal0,
float  rcores[],
float  cflux[],
int  naper 
)

Work out the Petrosian.

Name:
imcore_petrad
Purpose:
Work out the Petrosian radius for an object
Description:
Given the lowest areal profile and the circular aperture fluxes already done, calculate the Petrosian radius
Language:
C
Parameters:
areal0 The lowest level areal profile for the object
rcores The list of aperture radii used
cflux The aperture fluxes for each radius
naper The number of radii used
Returns:
The Petrosian radius of the object
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 176 of file imcore_radii.c.

Referenced by process_results_2().

void moments ( ap_t *  ap,
float  results[] 
)

Do moments analysis on an object.

Name:
moments
Purpose:
Do moments analysis on an object in a Plessey array
Description:
The Plessey array is given from an ap structure for a single object. This routine does a basic zeroth, first and second moments analysis.
Language:
C
Parameters:
ap The current ap structure
results The output array with the moments results.
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 65 of file moments.c.

Referenced by process_results_1(), process_results_2(), and process_results_3().

void overlp ( ap_t *  ap,
float  parm[IMNUM][NPAR],
int *  nbit,
float  xbar,
float  ybar,
float  total,
int  npix,
float  tmax 
)

Deblend overlapping images.

Name:
overlp
Purpose:
Deblend overlapping images
Description:
An array of pixels that are believed to be part of a single large object are anaylsed with successively higher threhsolds to see if they resolve into multiple objects
Language:
C
Parameters:
ap The current input ap structure
parm The parameter array for the deblended objects
nbit The output number of objects found in the deblended object
xbar The X position of the input object
ybar The Y position of the input object
total The total flux of the input object
npix The number of pixels in the original object
tmax The peak flux of the original object
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 98 of file imcore_overlp.c.

References apclose(), apclust(), apinit(), and apreinit().

Referenced by process_results_1(), and process_results_2().

void phopt ( ap_t *  ap,
float  parm[IMNUM][NPAR],
int  nbit,
int  naper,
float  apertures[],
float  cflux[],
float  badpix[],
int  nrcore 
)

Do multiple profile fitting.

Name:
phopt
Purpose:
Do multiple profile fitting
Description:
Given a Plessey array and some parameters determined from a moments analysis for each of the objects detected in the array, this routine does multiple profile fitting for the given aperture set
Language:
C
Parameters:
ap The current ap structure
parm The input/output object parameters
nbit The number of objects detected in the current Plessey structure
naper The number of apertures
apertures Array of aperture radii
cflux Array of aperture fluxes
badpix Array saying how many bad pixels were included in the data for each object at each radius
nrcore The index of the apertures array that defines where the radius = Rcore
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 91 of file imcore_phopt.c.

Referenced by process_results_1(), and process_results_2().

int process_results ( ap_t *  ap  ) 

Process results.

Name:
process_results
Purpose:
Process the results for each object and store them in the table
Description:
Wrapper routine to call the relevant routine to work out the results for each of the allowed types of catalogues
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all went well
VIR_FATAL If catalogue type is unrecognised
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 171 of file create_table.c.

References process_results_1(), process_results_2(), process_results_3(), and process_results_4().

Referenced by terminate().

int process_results_1 ( ap_t *  ap  ) 

Process results for type 1 catalogue.

Name:
process_results_1
Purpose:
Create the results for objects in a type 1 catalogue
Description:
The pixel processing is done for all the parameters wanted for a type 1 catalogue
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well.
VIR_FATAL If peak flux < 0
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 223 of file create_table_1.c.

References areals(), extend(), imcore_backest(), moments(), overlp(), and phopt().

Referenced by process_results().

int process_results_2 ( ap_t *  ap  ) 

Process results for type 2 catalogue.

Name:
process_results_2
Purpose:
Create the results for objects in a type 2 catalogue
Description:
The pixel processing is done for all the parameters wanted for a type 2 catalogue
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well.
VIR_FATAL If peak flux < 0
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 323 of file create_table_2.c.

References areals(), extend(), imcore_backest(), imcore_exprad(), imcore_flux(), imcore_kronrad(), imcore_petrad(), moments(), overlp(), and phopt().

Referenced by process_results().

int process_results_3 ( ap_t *  ap  ) 

Process results for type 3 catalogue.

Name:
process_results_3
Purpose:
Create the results for objects in a type 3 catalogue
Description:
The pixel processing is done for all the parameters wanted for a type 3 catalogue
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well.
VIR_FATAL If peak flux < 0
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 203 of file create_table_3.c.

References areals(), and moments().

Referenced by process_results().

int process_results_4 ( ap_t *  ap  ) 

Process results for type 4 catalogue (object mask).

Name:
process_results_4
Purpose:
Create the results for objects in a type 4 catalogue (object mask)
Description:
The positions for pixels identified as being part of a detected object are flagged in the object pixel mask.
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. This is currently the only value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 143 of file create_table_4.c.

Referenced by process_results().

void restack ( ap_t *  ap,
int  ip 
)

Free information for an object from the ap structure.

Name:
restack
Purpose:
Free information for an object from the ap structure
Description:
The starting address for an object in the ap structure is given. Information relating to that object is erased and the space made available
Language:
C
Parameters:
ap The current ap structure
ip The parent number for the object
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 64 of file terminate.c.

Referenced by apfu(), and terminate().

void seeing ( ap_t *  ap,
int  nrows,
float *  ellipt,
float *  pkht,
float **  areal,
float *  work,
float *  fwhm 
)

Work out the median seeing.

Name:
seeing
Purpose:
Work out the median seeing
Description:
The areal profiles for an array of objects is examined. The point where the areal profile falls to half its peak value is found for each object and the final seeing estimate is the median of these results
Language:
C
Parameters:
ap The current ap structure
nrows The number rows in the object catalogue
ellipt The array of ellipticities from the object catalogue
pkht The array of peak heights from the object catalogue
areal The array of areal profiles from the object catalogue
work A work array (should probably allocate this local at some stage)
fwhm The output FWHM estimate
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 80 of file seeing.c.

Referenced by do_seeing_gen().

int tabclose ( ap_t *  ap  ) 

Close the table structure.

Name:
tabclose
Purpose:
Close the table structure
Description:
Wrapper routine to call the relevant routine to close the table for each of the allowed types of catalogues
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all went well
VIR_FATAL If catalogue type is unrecognised
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 225 of file create_table.c.

References tabclose_4().

Referenced by imcore_conf(), and imcore_opm().

int tabclose_4 ( ap_t *  ap  ) 

Close object mask.

Name:
tabclose_4
Purpose:
Close the object mask
Description:
The object mask array in the ap structure is freed and the internal mask in the input image is marked with the object locations.
Language:
C
Parameters:
ap The current ap structure
Return values:
VIR_OK If all is well. This is currently the only value
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 193 of file create_table_4.c.

Referenced by tabclose().

void tabinit ( ap_t *  ap  ) 

Initialise catalogues.

Name:
tabinit
Purpose:
Initialise the output table.
Description:
Wrapper routine to call the relevant initialisation routine for each of the allowed types of catalogues.
Language:
C
Parameters:
ap The current ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 65 of file create_table.c.

References tabinit_1(), tabinit_2(), tabinit_3(), and tabinit_4().

Referenced by imcore_conf(), imcore_opm(), and vircam_dummy_catalogue().

void tabinit_1 ( void   ) 

Initialise type 1 catalogue.

Name:
tabinit_1
Purpose:
Initialise type 1 catalogue
Description:
Type 1 catalogue is initialised and the xy columns are identified.
Language:
C
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 136 of file create_table_1.c.

References tabinit_gen().

Referenced by tabinit().

void tabinit_2 ( void   ) 

Initialise type 2 catalogue.

Name:
tabinit_2
Purpose:
Initialise type 2 catalogue
Description:
Type 2 catalogue is initialised and the xy columns are identified.
Language:
C
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 235 of file create_table_2.c.

References tabinit_gen().

Referenced by tabinit().

void tabinit_3 ( void   ) 

Initialise type 1 catalogue.

Name:
tabinit_3
Purpose:
Initialise type 3 catalogue
Description:
Type 3 catalogue is initialised and the xy columns are identified.
Language:
C
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 115 of file create_table_3.c.

References tabinit_gen().

Referenced by tabinit().

void tabinit_4 ( ap_t *  ap  ) 

Initialise type 4 catalogue (object mask).

Name:
tabinit_4
Purpose:
Initialise type 4 catalogue (object mask)
Description:
Type 4 catalogue is initialised. This is in fact an object mask.
Language:
C
Parameters:
ap The current ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 62 of file create_table_4.c.

Referenced by tabinit().

void tabinit_gen ( int  ncols,
const char *  ttype[],
const char *  tunit[],
cpl_type  tform[] 
)

Initialise tables (generic).

Name:
tabinit_gen
Purpose:
Initialise tables (generic)
Description:
Generic routine to create FITS tables for the output catalogues
Language:
C
Parameters:
ncols The number of columns in the table
ttype Array of column names for FITS table
tunit Array of units for each of the columns
tform Array of formats for each of the columns as defined in the FITS standard
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 272 of file create_table.c.

Referenced by tabinit_1(), tabinit_2(), and tabinit_3().

void terminate ( ap_t *  ap  ) 

Check for objects that have terminated.

Name:
terminate
Purpose:
Check for objects that have terminated
Description:
The parents in the current ap structure are examined to see which have not grown since the last pass. Any that have not grown are sent to the processing routine.
Language:
C
Parameters:
ap The current ap structure
Returns:
Nothing
QC headers:
None
DRS headers:
None
Author:
Jim Lewis, CASU

Definition at line 130 of file terminate.c.

References extract_data(), process_results(), and restack().

Referenced by imcore_conf(), and imcore_opm().


Generated on 5 Mar 2013 for VIRCAM Pipeline by  doxygen 1.6.1