High-Level Data Reduction Library: hdrl_strehl.h Source File

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
hdrl_strehl.h
Go to the documentation of this file.
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2014 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 HDRL_STREHL_H
21#define HDRL_STREHL_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26#include "hdrl_types.h"
27#include "hdrl_image.h"
28#include <cpl.h>
29
30CPL_BEGIN_DECLS
31
32/*-----------------------------------------------------------------------------
33 Define
34 -----------------------------------------------------------------------------*/
35
36/*-----------------------------------------------------------------------------
37 Functions prototypes
38 -----------------------------------------------------------------------------*/
39
40 typedef struct {
41 /* computed strehl value and its propagated error */
42 hdrl_value strehl_value;
43 /* computed x and y position of the star peak */
44 double star_x, star_y;
45 /* star peak and its propagated error */
46 hdrl_value star_peak;
47 /* star flux and its propagated error */
48 hdrl_value star_flux;
49 /* star background and its propagated error */
50 hdrl_value star_background;
51 /* star background error estimated from image
52 * on normal data sqrt(pi / 2) larger that star_background error as it is
53 * estimated via a median */
54 double computed_background_error;
55 /* number of pixels used for background estimation */
56 size_t nbackground_pixels;
57} hdrl_strehl_result;
58
59 hdrl_parameter * hdrl_strehl_parameter_create(double wavelength,
60 double m1_radius, double m2_radius,
61 double pixel_scale_x, double pixel_scale_y, double flux_radius,
62 double bkg_radius_low, double bkg_radius_high);
63
64cpl_parameterlist * hdrl_strehl_parameter_create_parlist(
65 const char * base_context,
66 const char * prefix,
67 hdrl_parameter * par);
68
69 hdrl_parameter * hdrl_strehl_parameter_parse_parlist(
70 const cpl_parameterlist * parlist,
71 const char * prefix);
72
73 hdrl_strehl_result
74 hdrl_strehl_compute(const hdrl_image * himg, hdrl_parameter* params);
75
76#if defined HDRL_USE_EXPERIMENTAL || defined HDRL_USE_PRIVATE
77
78cpl_boolean hdrl_strehl_parameter_check(const hdrl_parameter *);
79
80 double hdrl_strehl_parameter_get_wavelength(const hdrl_parameter * p);
81 double hdrl_strehl_parameter_get_m1(const hdrl_parameter * p);
82 double hdrl_strehl_parameter_get_m2(const hdrl_parameter * p);
83 double hdrl_strehl_parameter_get_pixel_scale_x(const hdrl_parameter * p);
84 double hdrl_strehl_parameter_get_pixel_scale_y(const hdrl_parameter * p);
85 double hdrl_strehl_parameter_get_flux_radius(const hdrl_parameter * p);
86 double hdrl_strehl_parameter_get_bkg_radius_low(const hdrl_parameter * p);
87 double hdrl_strehl_parameter_get_bkg_radius_high(const hdrl_parameter * p);
88
89#endif
90
91CPL_END_DECLS
92
93#endif
hdrl_types.h
hdrl_image.h
hdrl_parameter
struct _hdrl_parameter_ hdrl_parameter
Definition hdrl_parameter.h:27
hdrl_strehl_parameter_get_m1
double hdrl_strehl_parameter_get_m1(const hdrl_parameter *p)
Access the primary mirror radius in the Strehl parameter.
Definition hdrl_strehl.c:247
hdrl_strehl_parameter_create_parlist
cpl_parameterlist * hdrl_strehl_parameter_create_parlist(const char *base_context, const char *prefix, hdrl_parameter *par)
Create parameter list for the Strehl computation.
Definition hdrl_strehl.c:360
hdrl_strehl_compute
hdrl_strehl_result hdrl_strehl_compute(const hdrl_image *himg, hdrl_parameter *params)
This function computes the Strehl ratio.
Definition hdrl_strehl.c:1325
hdrl_strehl_parameter_get_flux_radius
double hdrl_strehl_parameter_get_flux_radius(const hdrl_parameter *p)
Access the total flux radius in the Strehl parameter.
Definition hdrl_strehl.c:303
hdrl_strehl_parameter_get_wavelength
double hdrl_strehl_parameter_get_wavelength(const hdrl_parameter *p)
Access the wavelength in the Strehl parameter.
Definition hdrl_strehl.c:233
hdrl_strehl_parameter_get_m2
double hdrl_strehl_parameter_get_m2(const hdrl_parameter *p)
Access the obstruction radius in the Strehl parameter.
Definition hdrl_strehl.c:261
hdrl_strehl_parameter_get_bkg_radius_high
double hdrl_strehl_parameter_get_bkg_radius_high(const hdrl_parameter *p)
Access the background region external radius in the Strehl parameter.
Definition hdrl_strehl.c:331
hdrl_strehl_parameter_create
hdrl_parameter * hdrl_strehl_parameter_create(double wavelength, double m1_radius, double m2_radius, double pixel_scale_x, double pixel_scale_y, double flux_radius, double bkg_radius_low, double bkg_radius_high)
Creates Strehl Parameters object.
Definition hdrl_strehl.c:188
hdrl_strehl_parameter_get_pixel_scale_x
double hdrl_strehl_parameter_get_pixel_scale_x(const hdrl_parameter *p)
Access the image X pixel scale in the Strehl parameter.
Definition hdrl_strehl.c:275
hdrl_strehl_parameter_get_bkg_radius_low
double hdrl_strehl_parameter_get_bkg_radius_low(const hdrl_parameter *p)
Access the background region internal radius in the Strehl parameter.
Definition hdrl_strehl.c:317
hdrl_strehl_parameter_parse_parlist
hdrl_parameter * hdrl_strehl_parameter_parse_parlist(const cpl_parameterlist *parlist, const char *prefix)
Parse parameter list to create input parameters for the Strehl.
Definition hdrl_strehl.c:448
hdrl_strehl_parameter_check
cpl_boolean hdrl_strehl_parameter_check(const hdrl_parameter *self)
Check that the parameter is a Strehl parameter.
Definition hdrl_strehl.c:221
hdrl_strehl_parameter_get_pixel_scale_y
double hdrl_strehl_parameter_get_pixel_scale_y(const hdrl_parameter *p)
Access the image Y pixel scale in the Strehl parameter.
Definition hdrl_strehl.c:289
_hdrl_image_
Definition hdrl_image_defs.h:40
hdrl_strehl_result
Definition hdrl_strehl.h:40
hdrl_strehl_result::star_background
hdrl_value star_background
Definition hdrl_strehl.h:50
hdrl_strehl_result::computed_background_error
double computed_background_error
Definition hdrl_strehl.h:54
hdrl_strehl_result::strehl_value
hdrl_value strehl_value
Definition hdrl_strehl.h:42
hdrl_strehl_result::star_flux
hdrl_value star_flux
Definition hdrl_strehl.h:48
hdrl_strehl_result::star_x
double star_x
Definition hdrl_strehl.h:44
hdrl_strehl_result::nbackground_pixels
size_t nbackground_pixels
Definition hdrl_strehl.h:56
hdrl_strehl_result::star_peak
hdrl_value star_peak
Definition hdrl_strehl.h:46
hdrl_value
Definition hdrl_types.h:77