MOONS Pipeline Reference Manual 0.13.1
moo_scilist.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_SCILIST_H
21#define MOO_SCILIST_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_sci.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34/* detector structure */
35typedef struct
36{
37 moo_sci **list;
38 cpl_size size;
39} moo_scilist;
40/*-----------------------------------------------------------------------------
41 Functions prototypes
42 -----------------------------------------------------------------------------*/
43moo_scilist *moo_scilist_new(void);
44moo_scilist *moo_scilist_create(cpl_frameset *frameset);
45moo_scilist *moo_scilist_create_clean(cpl_frameset *frameset);
46cpl_size moo_scilist_get_size(const moo_scilist *self);
47
48cpl_error_code moo_scilist_set(moo_scilist *self, moo_sci *sci, cpl_size pos);
49
50cpl_error_code moo_scilist_push(moo_scilist *self, moo_sci *sci);
51
52void moo_scilist_delete(moo_scilist *self);
53
54void moo_scilist_empty(moo_scilist *self);
55
56moo_sci *moo_scilist_unset(moo_scilist *self, cpl_size pos);
57
58moo_sci *moo_scilist_get(moo_scilist *self, int i);
59moo_sci_single *
60moo_scilist_get_single(moo_scilist *self, int i, moo_detector_type type);
61
62cpl_error_code moo_scilist_load_single(const moo_scilist *self,
64 int level);
65
66hdrl_imagelist *
67moo_scilist_get_image(const moo_scilist *self, moo_detector_type type);
68
69cpl_imagelist *
70moo_scilist_get_sky(const moo_scilist *self, moo_detector_type type);
71cpl_imagelist *
72moo_scilist_get_qual(const moo_scilist *self, moo_detector_type type);
73/*
74cpl_error_code moo_detlist_free_single(const moo_detlist * self,
75 moo_detector_type type, int num);
76
77
78
79cpl_imagelist* moo_detlist_get_single_data(const moo_detlist * self,
80 moo_detector_type type, int num);
81cpl_imagelist* moo_detlist_get_single_qual(const moo_detlist * self,
82 moo_detector_type type, int num);
83 */
84#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_sci * moo_scilist_get(moo_scilist *self, int i)
Get the SCI at the position i in the list.
Definition: moo_scilist.c:384
moo_sci * moo_scilist_unset(moo_scilist *self, cpl_size pos)
Remove a SCI from a SCI list.
Definition: moo_scilist.c:82
hdrl_imagelist * moo_scilist_get_image(const moo_scilist *self, moo_detector_type type)
Get the all the images of the type part in the scilist.
Definition: moo_scilist.c:468
void moo_scilist_delete(moo_scilist *self)
Free all memory used by a moo_scilist object including the SCI.
Definition: moo_scilist.c:176
cpl_imagelist * moo_scilist_get_qual(const moo_scilist *self, moo_detector_type type)
Get the all the QUAL of the type part in the scilist.
Definition: moo_scilist.c:514
moo_sci_single * moo_scilist_get_single(moo_scilist *self, int i, moo_detector_type type)
Get the SCI SINGLE at the position i in the list for the given detector.
Definition: moo_scilist.c:409
cpl_error_code moo_scilist_load_single(const moo_scilist *self, moo_detector_type type, int level)
Load the type part for all SCI in the scilist.
Definition: moo_scilist.c:439
moo_scilist * moo_scilist_create(cpl_frameset *frameset)
Create a new moo_scilist from the given SCI frameset.
Definition: moo_scilist.c:321
cpl_error_code moo_scilist_set(moo_scilist *self, moo_sci *sci, cpl_size pos)
Insert a SCI into an moo_scilist.
Definition: moo_scilist.c:240
moo_scilist * moo_scilist_create_clean(cpl_frameset *frameset)
Create a new moo_scilist from the given SCI frameset ignoring SCI with 0 targets.
Definition: moo_scilist.c:345
moo_scilist * moo_scilist_new(void)
Create a new moo_scilist.
Definition: moo_scilist.c:56
void moo_scilist_empty(moo_scilist *self)
Empty an moo_scilist and deallocate all its SCI.
Definition: moo_scilist.c:120
cpl_size moo_scilist_get_size(const moo_scilist *self)
Get the number of SCI in the scilist.
Definition: moo_scilist.c:198
cpl_error_code moo_scilist_push(moo_scilist *self, moo_sci *sci)
Insert a SCI a the end of moo_scilist.
Definition: moo_scilist.c:304
cpl_imagelist * moo_scilist_get_sky(const moo_scilist *self, moo_detector_type type)
Get the all the SKY of the type part in the scilist.
Definition: moo_scilist.c:560