MOONS Pipeline Reference Manual 0.13.1
Functions
LOC_SINGLE format

Functions

moo_loc_single * moo_loc_single_new (void)
 Create a new moo_loc_single.
 
moo_loc_single * moo_loc_single_create (const char *filename, const char *extname)
 Create a new moo_loc_single from the given LOC filename.
 
void moo_loc_single_delete (moo_loc_single *self)
 Delete a moo_loc_single.
 
void moo_loc_single_save (const moo_loc_single *self, const char *filename, int keep_points)
 Save a moo_loc_single to a FITS file.
 
cpl_error_code moo_loc_single_dump (const moo_loc_single *self, FILE *stream)
 Dump structural information of LOC_SINGLE.
 
cpl_propertylist * moo_loc_single_get_header (moo_loc_single *self)
 Get header of loc single.
 
cpl_image * moo_loc_single_get_f_centroids (moo_loc_single *self)
 Get image of fit centroids.
 
double moo_loc_single_eval_f_centroids (moo_loc_single *self, double x, int indexext, int *rej)
 Get the Y fit centroid for a x value.
 
cpl_image * moo_loc_single_get_m_centroids (moo_loc_single *self)
 Get image of measured centroids.
 
cpl_image * moo_loc_single_get_f_wlo (moo_loc_single *self)
 Get image of width low.
 
cpl_image * moo_loc_single_get_f_wup (moo_loc_single *self)
 Get image of width low.
 
cpl_image * moo_loc_single_get_flags (moo_loc_single *self)
 Get image of flags.
 
cpl_mask * moo_loc_single_get_ODR (moo_loc_single *self, int size_y)
 Get outside data range mask far a DET single.
 

Detailed Description

This module provides functions to create, use, and destroy a moo_loc_single

Functionality include:

Synopsis:
#include "moo_loc_single.h"

Function Documentation

◆ moo_loc_single_create()

moo_loc_single * moo_loc_single_create ( const char *  filename,
const char *  extname 
)

Create a new moo_loc_single from the given LOC filename.

Parameters
filenamethe LOC filename
extnamethe LOC det name
Returns
1 newly allocated moo_det or NULL in case of an error

The returned object must be deallocated using moo_loc_single_delete(). Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 89 of file moo_loc_single.c.

References moo_loc_single_new().

Referenced by moo_loc_load().

◆ moo_loc_single_delete()

void moo_loc_single_delete ( moo_loc_single *  self)

Delete a moo_loc_single.

Parameters
selfmoo_loc to delete
Returns
void

If the moo_loc_single self is NULL, nothing is done and no error is set.

Definition at line 117 of file moo_loc_single.c.

Referenced by moo_loc_delete().

◆ moo_loc_single_dump()

cpl_error_code moo_loc_single_dump ( const moo_loc_single *  self,
FILE *  stream 
)

Dump structural information of LOC_SINGLE.

Parameters
selfLOC_SINGLE to dump
streamOutput stream, accepts stdout or stderr
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 206 of file moo_loc_single.c.

Referenced by moo_loc_dump().

◆ moo_loc_single_eval_f_centroids()

double moo_loc_single_eval_f_centroids ( moo_loc_single *  self,
double  x,
int  indexext,
int *  rej 
)

Get the Y fit centroid for a x value.

Parameters
selfLOC_SINGLE
xx position
indexextindex in EXT
rejrejected flag
Returns
Y fit centroid for X position

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 291 of file moo_loc_single.c.

References moo_loc_single_get_f_centroids().

◆ moo_loc_single_get_f_centroids()

cpl_image * moo_loc_single_get_f_centroids ( moo_loc_single *  self)

Get image of fit centroids.

Parameters
selfLOC_SINGLE
Returns
image or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 260 of file moo_loc_single.c.

References moo_fits_load_extension_image().

Referenced by moo_loc_single_eval_f_centroids(), and moo_loc_single_get_ODR().

◆ moo_loc_single_get_f_wlo()

cpl_image * moo_loc_single_get_f_wlo ( moo_loc_single *  self)

Get image of width low.

Parameters
selfLOC_SINGLE
Returns
image or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 349 of file moo_loc_single.c.

References moo_fits_load_extension_image().

Referenced by moo_loc_single_get_ODR().

◆ moo_loc_single_get_f_wup()

cpl_image * moo_loc_single_get_f_wup ( moo_loc_single *  self)

Get image of width low.

Parameters
selfLOC_SINGLE
Returns
image or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 375 of file moo_loc_single.c.

References moo_fits_load_extension_image().

Referenced by moo_loc_single_get_ODR().

◆ moo_loc_single_get_flags()

cpl_image * moo_loc_single_get_flags ( moo_loc_single *  self)

Get image of flags.

Parameters
selfLOC_SINGLE
Returns
image or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 401 of file moo_loc_single.c.

References moo_fits_load_extension_image().

◆ moo_loc_single_get_header()

cpl_propertylist * moo_loc_single_get_header ( moo_loc_single *  self)

Get header of loc single.

Parameters
selfLOC_SINGLE
Returns
the header or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 231 of file moo_loc_single.c.

◆ moo_loc_single_get_m_centroids()

cpl_image * moo_loc_single_get_m_centroids ( moo_loc_single *  self)

Get image of measured centroids.

Parameters
selfLOC_SINGLE
Returns
image or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 321 of file moo_loc_single.c.

References moo_fits_load_extension_image().

◆ moo_loc_single_get_ODR()

cpl_mask * moo_loc_single_get_ODR ( moo_loc_single *  self,
int  size_y 
)

Get outside data range mask far a DET single.

Parameters
selfLOC_SINGLE
size_yDET size in Y
Returns
mask or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 561 of file moo_loc_single.c.

References moo_loc_single_get_f_centroids(), moo_loc_single_get_f_wlo(), and moo_loc_single_get_f_wup().

◆ moo_loc_single_new()

moo_loc_single * moo_loc_single_new ( void  )

Create a new moo_loc_single.

Returns
1 newly allocated moo_loc or NULL in case of an error

The returned object must be deallocated using moo_det_delete().

Definition at line 70 of file moo_loc_single.c.

Referenced by moo_loc_single_create().

◆ moo_loc_single_save()

void moo_loc_single_save ( const moo_loc_single *  self,
const char *  filename,
int  keep_points 
)

Save a moo_loc_single to a FITS file.

Parameters
selfmoo_loc to write to disk or NULL
filenameName of the file to write
keep_points1 if you want to save measured and flags
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

This function saves a moo_loc_single to a FITS file, using cfitsio. Only not NULL extensions are written.

Definition at line 160 of file moo_loc_single.c.

References moo_fits_write_extension_image().

Referenced by moo_loc_add_single(), and moo_loc_save().