MOONS Pipeline Reference Manual 0.13.2
moo_psf_single.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_PSF_SINGLE_H
21#define MOO_PSF_SINGLE_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_single.h"
31#include "moo_loc_single.h"
32#include "moo_detector.h"
33/*-----------------------------------------------------------------------------
34 Types
35 -----------------------------------------------------------------------------*/
36#define MOO_PSF_SINGLE_PREFIX_EXTNAME "FF2D"
37#define MOO_PSF_SINGLE_CUNIT1 "pixel"
38
39typedef struct
40{
41 const char *filename;
42 const char *extname;
43 cpl_imagelist *cube;
44 cpl_propertylist *header;
45} moo_psf_single;
46/*-----------------------------------------------------------------------------
47 Functions prototypes
48 -----------------------------------------------------------------------------*/
49moo_psf_single *moo_psf_single_new(void);
50
51moo_psf_single *
52moo_psf_single_create(const char *filename, const char *extname);
53cpl_error_code
54moo_psf_single_set_cube_ref(moo_psf_single *self, double crpix2, double cd2_2);
55cpl_imagelist *moo_psf_single_get_cube(moo_psf_single *self);
56cpl_error_code moo_psf_single_get_cube_ref(moo_psf_single *self,
57 double *crpix2,
58 double *cd2_2);
59cpl_error_code moo_psf_single_normalize(moo_psf_single *self);
60
61cpl_image *moo_psf_single_reproject_model(moo_psf_single *self,
62 moo_single *det,
63 moo_loc_single *loc,
64 const int *health,
65 cpl_array *indexes);
66void moo_psf_single_delete(moo_psf_single *self);
67cpl_error_code moo_psf_single_dump(const moo_psf_single *self, FILE *stream);
68void moo_psf_single_save(const moo_psf_single *self, const char *filename);
69void moo_psf_single_delete(moo_psf_single *self);
70#endif
cpl_error_code moo_psf_single_set_cube_ref(moo_psf_single *self, double crpix2, double cd2_2)
Set cube parameters.
void moo_psf_single_delete(moo_psf_single *self)
Delete a moo_psf_single.
cpl_error_code moo_psf_single_get_cube_ref(moo_psf_single *self, double *crpix2, double *cd2_2)
Set cube parameters.
moo_psf_single * moo_psf_single_new(void)
Create a new 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_error_code moo_psf_single_normalize(moo_psf_single *self)
Normalize cube model profile.
cpl_imagelist * moo_psf_single_get_cube(moo_psf_single *self)
Get cube.
moo_psf_single * moo_psf_single_create(const char *filename, const char *extname)
Create a new moo_psf_single from the given PSF filename.