CR2RE Pipeline Reference Manual 1.6.8
hdrl_spectrumlist.h
1/* $Id: hdrl_spectrum1Dlist.h,v 0.1 2017-04-26 18:30:28 msalmist Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2017 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * $Author: msalmist $
23 * $Date: 2017-04-26 18:30:28 $
24 * $Revision: 0.1 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_SPECTRUMLIST_H
29#define HDRL_SPECTRUMLIST_H
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include "hdrl_spectrum.h"
36
37#include <cpl.h>
38
39CPL_BEGIN_DECLS
40
41/*-----------------------------------------------------------------------------
42 Data Structures
43 -----------------------------------------------------------------------------*/
44typedef struct{
45 cpl_size length; /*Number of valid spectra*/
46 cpl_size capacity; /*Number of spectra that can fit in the internal buffer*/
47 hdrl_spectrum1D ** spectra; /*Internal buffer*/
48}hdrl_spectrum1Dlist;
49
50/*-----------------------------------------------------------------------------
51 Functions
52 -----------------------------------------------------------------------------*/
53
54hdrl_spectrum1Dlist * hdrl_spectrum1Dlist_new(void);
55
56hdrl_spectrum1Dlist * hdrl_spectrum1Dlist_duplicate(const hdrl_spectrum1Dlist * l);
57
58hdrl_spectrum1D *
59hdrl_spectrum1Dlist_get(hdrl_spectrum1Dlist *, const cpl_size);
60
61const hdrl_spectrum1D *
62hdrl_spectrum1Dlist_get_const(const hdrl_spectrum1Dlist *, const cpl_size);
63
64cpl_error_code
65hdrl_spectrum1Dlist_set(hdrl_spectrum1Dlist *, hdrl_spectrum1D *, const cpl_size);
66
67hdrl_spectrum1D *
68hdrl_spectrum1Dlist_unset(hdrl_spectrum1Dlist *, const cpl_size);
69
70void hdrl_spectrum1Dlist_delete(hdrl_spectrum1Dlist *);
71
72cpl_size
73hdrl_spectrum1Dlist_get_size(const hdrl_spectrum1Dlist *);
74
75#if defined HDRL_USE_EXPERIMENTAL || defined HDRL_USE_PRIVATE
76
77hdrl_spectrum1Dlist *
78hdrl_spectrum1Dlist_wrap(hdrl_spectrum1D ** self, const cpl_size sz);
79
80cpl_error_code
81hdrl_spectrum1Dlist_collapse(const hdrl_spectrum1Dlist *list,
82 const hdrl_parameter * stacking_par,
83 const cpl_array * wlengths, const hdrl_parameter * resample_par,
84 const cpl_boolean mark_bpm_in_interpolation,
85 hdrl_spectrum1D ** result, cpl_image ** contrib,
86 hdrl_imagelist ** resampled_and_aligned_fluxes);
87
88#endif
89
90CPL_END_DECLS
91
92#endif
cpl_size hdrl_spectrum1Dlist_get_size(const hdrl_spectrum1Dlist *)
hdrl_spectrum1Dlist getter for size
hdrl_spectrum1Dlist * hdrl_spectrum1Dlist_new(void)
hdrl_spectrum1Dlist default constructor
hdrl_spectrum1D * hdrl_spectrum1Dlist_unset(hdrl_spectrum1Dlist *, const cpl_size)
hdrl_spectrum1Dlist remove of the i-th element
cpl_error_code hdrl_spectrum1Dlist_set(hdrl_spectrum1Dlist *, hdrl_spectrum1D *, const cpl_size)
hdrl_spectrum1Dlist setter of the i-th element
void hdrl_spectrum1Dlist_delete(hdrl_spectrum1Dlist *)
hdrl_spectrum1Dlist destructor
hdrl_spectrum1D * hdrl_spectrum1Dlist_get(hdrl_spectrum1Dlist *, const cpl_size)
hdrl_spectrum1Dlist getter of the i-th element
const hdrl_spectrum1D * hdrl_spectrum1Dlist_get_const(const hdrl_spectrum1Dlist *, const cpl_size)
hdrl_spectrum1Dlist getter of the i-th element
hdrl_spectrum1Dlist * hdrl_spectrum1Dlist_duplicate(const hdrl_spectrum1Dlist *l)
hdrl_spectrum1Dlist copy-constructor
hdrl_spectrum1Dlist * hdrl_spectrum1Dlist_wrap(hdrl_spectrum1D **self, const cpl_size sz)
hdrl_spectrum1Dlist wrapper
cpl_error_code hdrl_spectrum1Dlist_collapse(const hdrl_spectrum1Dlist *list, const hdrl_parameter *stacking_par, const cpl_array *wlengths, const hdrl_parameter *resample_par, const cpl_boolean mark_bpm_in_interpolation, hdrl_spectrum1D **result, cpl_image **contrib, hdrl_imagelist **resampled_and_aligned_fluxes)
collapsing a hdrl_spectrum1Dlist. The spectra in list are first resampled on the wavelengths wlengths...