Slit Geometry
Functions | |
GiSlitGeometry * | giraffe_slitgeometry_new (void) |
Create a new GiSlitGeometry. | |
GiSlitGeometry * | giraffe_slitgeometry_duplicate (GiSlitGeometry *other) |
Creates a (deep) copy of the GiSlitGeometry. | |
GiSlitGeometry * | giraffe_slitgeometry_create (GiTable *slitgeometry, cxbool subslits) |
Create a slit geometry object from a slit geometry table. | |
void | giraffe_slitgeometry_delete (GiSlitGeometry *self) |
Destroy an GiSlitGeometry. | |
cxint | giraffe_slitgeometry_size (GiSlitGeometry *self) |
Returns current size of a GiSlitGeometry. | |
void | giraffe_slitgeometry_resize (GiSlitGeometry *self, cxint size) |
Destructive resize of a GiSlitGeometry. | |
void | giraffe_slitgeometry_set (GiSlitGeometry *self, cxint pos, cpl_matrix *nm) |
Sets (copies) a cpl_matrix to a specified position of the GiSlitGeometry. | |
cpl_matrix * | giraffe_slitgeometry_get (GiSlitGeometry *self, cxint pos) |
Gets a reference to the matrix at a specified position. | |
void | giraffe_slitgeometry_print (GiSlitGeometry *self) |
Dump the the information contained in a GiSlitGeometry to output. | |
GiTable * | giraffe_slitgeometry_load (const GiTable *fibers, const cxchar *filename, cxint pos, const cxchar *tag) |
Load the slit geometry information for a given fiber setup. |
Detailed Description
TBD
Function Documentation
GiSlitGeometry* giraffe_slitgeometry_create | ( | GiTable * | slitgeometry, | |
cxbool | subslits | |||
) |
Create a slit geometry object from a slit geometry table.
- Parameters:
-
slitgeometry Slit geometry table. subslits Flag controlling the use of multiple subslits.
- Returns:
- The function returns the newly created slit geometry, or
NULL
if an error occurred.
The function creates a slit geometry object from the slit geometry table slitgeometry. If subslits is 0
all fibers are put into a single subslit. If subslits is different from 0
, multiple subslits are created according to the subslit information found in slitgeometry, and each fiber is put into the corresponding subslit.
- See also:
- GiSlitGeometry
Definition at line 191 of file gislitgeometry.c.
References giraffe_fiberlist_query_index(), giraffe_slitgeometry_get(), giraffe_slitgeometry_new(), giraffe_slitgeometry_resize(), and giraffe_table_get().
Referenced by giraffe_wavelength_calibration().
void giraffe_slitgeometry_delete | ( | GiSlitGeometry * | self | ) |
Destroy an GiSlitGeometry.
- Parameters:
-
self GiSlitGeometry to destroy
- Returns:
- Nothing.
Destroys an GiSlitGeometry and frees all associated memory
Definition at line 356 of file gislitgeometry.c.
Referenced by giraffe_wavelength_calibration(), giraffe_wcalsolution_create(), and giraffe_wcalsolution_delete().
GiSlitGeometry* giraffe_slitgeometry_duplicate | ( | GiSlitGeometry * | other | ) |
Creates a (deep) copy of the GiSlitGeometry.
- Parameters:
-
other GiSlitGeometry to copy
- Returns:
- Pointer to new GiSlitGeometry or NULL if an error occured
Returns a pointer to a (deep)copy of the input GiSlitGeometry other.
Definition at line 133 of file gislitgeometry.c.
References giraffe_slitgeometry_get(), giraffe_slitgeometry_set(), GiSlitGeometry::nsubslits, and GiSlitGeometry::subslits.
cpl_matrix* giraffe_slitgeometry_get | ( | GiSlitGeometry * | self, | |
cxint | pos | |||
) |
Gets a reference to the matrix at a specified position.
- Parameters:
-
self GiSlitGeometry from which to retrieve the reference pos Position from which to retrieve it
- Returns:
- Pointer to cpl_matrix or NULL if an error occured
Returns a reference i.e. a pointer to a cpl_matrix contained in the GiSlitGeometry self at position pos.
Definition at line 516 of file gislitgeometry.c.
Referenced by giraffe_slitgeometry_create(), giraffe_slitgeometry_duplicate(), giraffe_slitgeometry_print(), and giraffe_wcalsolution_dump().
GiTable* giraffe_slitgeometry_load | ( | const GiTable * | fibers, | |
const cxchar * | filename, | |||
cxint | pos, | |||
const cxchar * | tag | |||
) |
Load the slit geometry information for a given fiber setup.
- Parameters:
-
fibers Table of fibers for which the slit geometry is needed. filename The name of the file containing the slit geometry. pos The data set index of the slit geometry within the file. tag The data set name of the slit geometry.
- Returns:
- The function returns a table containing the slit geometry for the given fiber setup if no error occurred, or
NULL
otherwise.
The function creates the slit geometry table for the fiber setup specified by the fiber table fibers. The slit geometry information is read from the data set pos of the file filename. If the data set identifier tag is not NULL
, it is used to validate the data set with the number pos to contain a valid slit geometry. In this case tag must match the name of the data set pos.
Definition at line 606 of file gislitgeometry.c.
References giraffe_fiberlist_query_index(), giraffe_get_mode(), giraffe_table_delete(), giraffe_table_get(), giraffe_table_load(), giraffe_table_new(), and giraffe_table_set().
GiSlitGeometry* giraffe_slitgeometry_new | ( | void | ) |
Create a new GiSlitGeometry.
- Returns:
- Pointer to newly created GiSlitGeometry or
NULL
if an error occured
Creates a new slit geometry setup object.
Definition at line 104 of file gislitgeometry.c.
Referenced by giraffe_slitgeometry_create(), and giraffe_wcalsolution_create().
void giraffe_slitgeometry_print | ( | GiSlitGeometry * | self | ) |
Dump the the information contained in a GiSlitGeometry to output.
- Parameters:
-
self GiSlitGeometry to dump
Dump the information contained in a GiSlitGeometry self using the CPL messaging subsystem.
Definition at line 547 of file gislitgeometry.c.
References gi_message(), giraffe_matrix_dump(), and giraffe_slitgeometry_get().
void giraffe_slitgeometry_resize | ( | GiSlitGeometry * | self, | |
cxint | size | |||
) |
Destructive resize of a GiSlitGeometry.
- Parameters:
-
self GiSlitGeometry which to destory size New size
Resizes the GiSlitGeometry self by first deallocating the old informatin contained in it. Afterwards new memory is allocated for the size given
Definition at line 423 of file gislitgeometry.c.
Referenced by giraffe_slitgeometry_create(), and giraffe_wcalsolution_create().
void giraffe_slitgeometry_set | ( | GiSlitGeometry * | self, | |
cxint | pos, | |||
cpl_matrix * | nm | |||
) |
Sets (copies) a cpl_matrix to a specified position of the GiSlitGeometry.
- Parameters:
-
self GiSlitGeometry to copy matrix into pos Position to which to copy the matrix nm Matrix to copy
Copies a cpl_matrix nm to position pos inside the GiSlitGeometry self. If a cpl_matrix is already present at position pos, it is properly deallocated first. nm can be NULL, in that case the matrix at position pos is deleted and the position is marked as being empty.
Definition at line 470 of file gislitgeometry.c.
Referenced by giraffe_slitgeometry_duplicate(), and giraffe_wcalsolution_create().
cxint giraffe_slitgeometry_size | ( | GiSlitGeometry * | self | ) |
Returns current size of a GiSlitGeometry.
- Parameters:
-
self GiSlitGeometry for which to return the size
Returns the current size of the GiSlitGeometry i.e. how many matrices can be stored in it/are stored in it.
- Returns:
- Maximum number of cpl_matrix to store in GiSlitGeometry or <0 if an error occured
Definition at line 394 of file gislitgeometry.c.
Referenced by giraffe_wcalsolution_dump().