GIRAFFE Pipeline Reference Manual

giextract.h
1/*
2 * This file is part of the GIRAFFE Pipeline
3 * Copyright (C) 2002-2019 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 St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef GIEXTRACT_H
21#define GIEXTRACT_H
22
23#include <cpl_macros.h>
24#include <cpl_parameterlist.h>
25
26#include <giimage.h>
27#include <gitable.h>
28#include <gilocalization.h>
29#include <giextraction.h>
30
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36
37enum GiExtractMethod {
38 GIEXTRACT_SUM,
39 GIEXTRACT_HORNE,
40 GIEXTRACT_OPTIMAL
41};
42
43typedef enum GiExtractMethod GiExtractMethod;
44
45
46struct GiExtractConfig {
47 GiExtractMethod emethod;
48
49 cxdouble ron;
50
51 struct {
52 cxchar* model;
53 cxdouble sigma;
54 cxint iterations;
55 } psf;
56
57 struct {
58 cxint ewidth;
59 cxint mingood;
60 } horne;
61
62 struct {
63 cxint bkgorder;
64 cxdouble wfactor;
65 cxdouble fraction;
66 } optimal;
67
68};
69
70typedef struct GiExtractConfig GiExtractConfig;
71
72
73/*
74 * Spectrum extraction
75 */
76
77cxint giraffe_extract_spectra(GiExtraction* result, GiImage* image,
78 GiTable* fibers, GiLocalization* sloc,
79 GiImage* bpixel, GiImage* slight,
80 GiExtractConfig* config);
81
82/*
83 * Convenience functions
84 */
85
86GiExtractConfig* giraffe_extract_config_create(cpl_parameterlist* list);
87void giraffe_extract_config_destroy(GiExtractConfig* config);
88
89void giraffe_extract_config_add(cpl_parameterlist *list);
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* GIEXTRACT_H */
void giraffe_extract_config_add(cpl_parameterlist *list)
Adds parameters for the spectrum extraction.
Definition: giextract.c:3508
cxint giraffe_extract_spectra(GiExtraction *result, GiImage *image, GiTable *fibers, GiLocalization *sloc, GiImage *bpixel, GiImage *slight, GiExtractConfig *config)
Extracts the spectra from a preprocessed frame.
Definition: giextract.c:2479
GiExtractConfig * giraffe_extract_config_create(cpl_parameterlist *list)
Creates a setup structure for the spectrum extraction.
Definition: giextract.c:3404
void giraffe_extract_config_destroy(GiExtractConfig *config)
Destroys a spectrum extraction setup structure.
Definition: giextract.c:3478

This file is part of the GIRAFFE Pipeline Reference Manual 2.18.3.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri May 23 2025 16:31:10 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2004