MOONS Pipeline Reference Manual 0.13.1
Functions
PSF_SINGLE format

Functions

moo_psf_single * moo_psf_single_new (void)
 Create a new moo_psf_single

 
moo_psf_single * moo_psf_single_create (const char *filename, const char *extname)
 Create a new moo_psf_single from the given PSF filename.
 
cpl_error_code moo_psf_single_set_cube_ref (moo_psf_single *self, double crpix2, double cd2_2)
 Set cube parameters.
 
cpl_error_code moo_psf_single_get_cube_ref (moo_psf_single *self, double *crpix2, double *cd2_2)
 Set cube parameters.
 
cpl_error_code moo_psf_single_normalize (moo_psf_single *self)
 Normalize cube model profile.
 
void moo_psf_single_delete (moo_psf_single *self)
 Delete a moo_psf_single.
 
void moo_psf_single_save (const moo_psf_single *self, const char *filename)
 Save a moo_psf_single to a FITS file.
 
cpl_error_code moo_psf_single_dump (const moo_psf_single *self, FILE *stream)
 Dump structural information of PSF_SINGLE.
 
cpl_imagelist * moo_psf_single_get_cube (moo_psf_single *self)
 Get cube.
 

Detailed Description

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

Functionality include:

Synopsis:
#include "moo_psf_single.h"

Function Documentation

◆ moo_psf_single_create()

moo_psf_single * moo_psf_single_create ( const char *  filename,
const char *  extname 
)

Create a new moo_psf_single from the given PSF filename.

Parameters
filenamethe PSF filename
extnamethe PSF extension name
Returns
1 newly allocated moo_psf_single or NULL in case of an error

The returned object must be deallocated using moo_psf_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_psf_single.c.

References moo_psf_single_new().

Referenced by moo_psf_load().

◆ moo_psf_single_delete()

void moo_psf_single_delete ( moo_psf_single *  self)

Delete a moo_psf_single.

Parameters
selfmoo_psf_single to delete
Returns
void

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

Definition at line 356 of file moo_psf_single.c.

Referenced by moo_psf_delete().

◆ moo_psf_single_dump()

cpl_error_code moo_psf_single_dump ( const moo_psf_single *  self,
FILE *  stream 
)

Dump structural information of PSF_SINGLE.

Parameters
selfPSF_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 405 of file moo_psf_single.c.

◆ moo_psf_single_get_cube()

cpl_imagelist * moo_psf_single_get_cube ( moo_psf_single *  self)

Get cube.

Parameters
selfPSF_SINGLE
Returns
cube 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 429 of file moo_psf_single.c.

References moo_fits_load_extension_cube().

Referenced by moo_psf_single_normalize().

◆ moo_psf_single_get_cube_ref()

cpl_error_code moo_psf_single_get_cube_ref ( moo_psf_single *  self,
double *  crpix2,
double *  cd2_2 
)

Set cube parameters.

Parameters
selfmoo_psf_single
crpix2reference of Y axis in cube
cd2_2step of Y axis in cube
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

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

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 152 of file moo_psf_single.c.

References moo_pfits_get_cd2_2(), and moo_pfits_get_crpix2().

Referenced by moo_psf_single_normalize().

◆ moo_psf_single_new()

moo_psf_single * moo_psf_single_new ( void  )

Create a new moo_psf_single

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

The returned object must be deallocated using moo_psf_single_delete().

Definition at line 70 of file moo_psf_single.c.

Referenced by moo_psf_single_create().

◆ moo_psf_single_normalize()

cpl_error_code moo_psf_single_normalize ( moo_psf_single *  self)

Normalize cube model profile.

Parameters
selfmoo_psf_single
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

Definition at line 307 of file moo_psf_single.c.

References moo_psf_single_get_cube(), and moo_psf_single_get_cube_ref().

◆ moo_psf_single_save()

void moo_psf_single_save ( const moo_psf_single *  self,
const char *  filename 
)

Save a moo_psf_single to a FITS file.

Parameters
selfmoo_psf_single to write to disk or NULL
filenameName of the file to write
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

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

Definition at line 381 of file moo_psf_single.c.

References moo_fits_write_extension_cube().

Referenced by moo_psf_add_single(), and moo_psf_save().

◆ moo_psf_single_set_cube_ref()

cpl_error_code moo_psf_single_set_cube_ref ( moo_psf_single *  self,
double  crpix2,
double  cd2_2 
)

Set cube parameters.

Parameters
selfmoo_psf_single
crpix2reference of Y axis in cube
cd2_2step of Y axis in cube
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

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

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 116 of file moo_psf_single.c.