MOONS Pipeline Reference Manual 0.13.1
moo_psf.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_H
21#define MOO_PSF_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_psf_single.h"
31#include "moo_detector.h"
32/*-----------------------------------------------------------------------------
33 Types
34 -----------------------------------------------------------------------------*/
35typedef struct
36{
37 cpl_propertylist *primary_header;
38 char *filename;
39 moo_psf_single *ri[2];
40 moo_psf_single *yj[2];
41 moo_psf_single *h[2];
42 /*cpl_table* fibre_table;*/
43} moo_psf;
44/*-----------------------------------------------------------------------------
45 Functions prototypes
46 -----------------------------------------------------------------------------*/
47moo_psf *moo_psf_new(void);
48cpl_error_code moo_psf_set_single(moo_psf *self,
50 int ntas,
51 moo_psf_single *s);
52moo_psf *moo_psf_create(const char *filename);
53
54moo_psf *moo_psf_load(const cpl_frame *psfframe);
55moo_psf_single *
56moo_psf_get_single(moo_psf *self, moo_detector_type type, int num);
57cpl_error_code moo_psf_add_single(moo_psf *self,
58 moo_psf_single *s,
60 int ntas);
61
62void moo_psf_delete(moo_psf *self);
63void moo_psf_save(moo_psf *self, const char *filename);
64cpl_error_code moo_psf_dump(const moo_psf *self, FILE *stream);
65#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_psf_single * moo_psf_get_single(moo_psf *self, moo_detector_type type, int num)
Get a PSF single from PSF.
Definition: moo_psf.c:151
moo_psf * moo_psf_new(void)
Create a new moo_psf
Definition: moo_psf.c:65
void moo_psf_save(moo_psf *self, const char *filename)
Save a moo_psf to a FITS file.
Definition: moo_psf.c:300
void moo_psf_delete(moo_psf *self)
Delete a moo_psf.
Definition: moo_psf.c:264
cpl_error_code moo_psf_set_single(moo_psf *self, moo_detector_type type, int ntas, moo_psf_single *s)
assign moo_psf_single structure in moo_psf structure
Definition: moo_psf.c:183
cpl_error_code moo_psf_add_single(moo_psf *self, moo_psf_single *s, moo_detector_type type, int ntas)
Add PSF_SINGLE extension to PSF filename and update moo_psf structure.
Definition: moo_psf.c:228
moo_psf * moo_psf_create(const char *filename)
Create a new empty PSF filename.
Definition: moo_psf.c:82
moo_psf * moo_psf_load(const cpl_frame *psfframe)
Load a PSF frame and create a moo_psf.
Definition: moo_psf.c:109
cpl_error_code moo_psf_dump(const moo_psf *self, FILE *stream)
Dump structural information of PSF.
Definition: moo_psf.c:333