VIRCAM Pipeline  1.3.4
Functions

These are utility routines for manipulating data within a readout channel. More...

Functions

int vircam_chantab_verify (cpl_table *intab)
 
cpl_table * vircam_chantab_new (int nord, cpl_table *template)
 
int vircam_chan_fill (cpl_table *tab, parquet **p, long *np)
 
void vircam_chan_free (int np, parquet **p)
 
long vircam_chan_d2r (parquet *p, long l)
 
long vircam_chan_r2d (parquet *p, long k)
 
long vircam_chan_r2a (parquet *p, long naxis[2], long k)
 

Detailed Description

These are utility routines for manipulating data within a readout channel.

Author
Jim Lewis, CASU

Function Documentation

long vircam_chan_d2r ( parquet *  p,
long  l 
)
Name:
vircam_chan_d2r
Purpose:
Convert detector index to readout index
Description:
The detector data array index for a given channel is converted to the readout data array index. This can be used to reorder the data in a channel into readout order. Indexes always start at zero.
Language:
C
Parameters
pThe given parquet structure for the channel
lThe detector index
Return values
kThe readout index
Author
Jim Lewis, CASU

Definition at line 473 of file vircam_channel.c.

Referenced by vircam_lincor().

int vircam_chan_fill ( cpl_table *  tab,
parquet **  p,
long *  np 
)
Name:
vircam_chan_fill
Purpose:
Initialise an array of parquet structures given the a list of parquet parameters in a FITS table
Description:
The parameters of a number of parquet structures is read from a FITS table. An array of parquet structures is returned.
Language:
C
Parameters
tabThe full name for the FITS channel table to be read. This must include the header extension number
pThe returned parquet structure array for the channels included in the channel table.
npThe number of structures in the parquet array.
Return values
VIR_OKIf all is OK
VIR_FATALIf input values are nonsense.
Author
Jim Lewis, CASU

Definition at line 361 of file vircam_channel.c.

References vircam_chantab_verify().

Referenced by vircam_genlincur(), and vircam_lincor().

void vircam_chan_free ( int  np,
parquet **  p 
)
Name:
vircam_chan_free
Purpose:
Free workspace associated with a parquet structure array
Description:
Any memory associated with the entries in a parquet structure array is freed. The array itself is also freed.
Language:
C
Parameters
npThe number of elements in the parquet structure array
pThe given array of parquet structures.
Returns
Nothing
Author
Jim Lewis, CASU

Definition at line 437 of file vircam_channel.c.

Referenced by vircam_genlincur(), and vircam_lincor().

long vircam_chan_r2a ( parquet *  p,
long  naxis[2],
long  k 
)
Name:
vircam_chan_r2a
Purpose:
Convert readout index to absolute detector index
Description:
The readout data array index for a given channel is converted to the absolute detector data array index. This is the index for the whole detector, not just this channel. Indexes always start at zero.
Language:
C
Parameters
pThe given parquet structure for the channel
kThe readout index
naxisThe full size of the detector data array
Return values
lThe absolute detector index
Author
Jim Lewis, CASU

Definition at line 564 of file vircam_channel.c.

Referenced by vircam_lincor().

long vircam_chan_r2d ( parquet *  p,
long  k 
)
Name:
vircam_chan_r2d
Purpose:
Convert readout index to detector index
Description:
The readout data array index for a given channel is converted to the detector data array index. This can be used to reorder the data in a channel from readout order into the order it appears on the detector. Indexes always start at zero.
Language:
C
Parameters
pThe given parquet structure for the channel
kThe readout index
Return values
lThe detector index
Author
Jim Lewis, CASU

Definition at line 518 of file vircam_channel.c.

cpl_table* vircam_chantab_new ( int  nord,
cpl_table *  template 
)
Name:
vircam_chantab_new
Purpose:
Create a new channel table with required columns
Description:
Create a new channel table with all the required columns with the correct data types, but with now data rows.
Language:
C
Parameters
nordThe order of the fit
templateThe template table
Returns
The cpl_table pointer for the new channel table
Author
Jim Lewis, CASU

Definition at line 288 of file vircam_channel.c.

int vircam_chantab_verify ( cpl_table *  intab)
Name:
vircam_chantab_verify
Purpose:
Check a channel table for validity
Description:
An input channel table is checked to see if it has all of the required columns. For most of the columns it is impossible to check the actual content of the table very thoroughly. There is some range checking that can be done and we do check that the number of linearity coefficients matches the order fit.
Language:
C
Parameters
intabThe input channel table
Return values
VIR_OKIf all is OK
VIR_FATALIf there is information missing for the channel table
Author
Jim Lewis, CASU

Definition at line 114 of file vircam_channel.c.

Referenced by vircam_chan_fill().