File: irplib_strehl.h

package info (click to toggle)
cpl-plugin-vimos 4.1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,228 kB
  • sloc: ansic: 169,271; cpp: 16,177; sh: 4,344; python: 3,678; makefile: 1,138; perl: 10
file content (126 lines) | stat: -rw-r--r-- 4,946 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* $Id: irplib_strehl.h,v 1.12 2009-06-29 14:32:53 kmirny Exp $
 *
 * This file is part of the irplib package
 * Copyright (C) 2002,2003 European Southern Observatory
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
 */

/*
 * $Author: kmirny $
 * $Date: 2009-06-29 14:32:53 $
 * $Revision: 1.12 $
 * $Name: not supported by cvs2svn $
 */

#ifndef IRPLIB_STREHL_H
#define IRPLIB_STREHL_H

/*-----------------------------------------------------------------------------
                                   Includes
 -----------------------------------------------------------------------------*/

#include <cpl.h>

/*-----------------------------------------------------------------------------
                                   Define
 -----------------------------------------------------------------------------*/

#ifndef IRPLIB_STREHL_BORDER
#define IRPLIB_STREHL_BORDER        5
#endif

/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The diameter of the primary mirror, [m]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_M1                       8.0
/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The diameter of the secondary mirror, [m]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_M2                       1.1
/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The size of the internally used PSF-image, [pixel]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_BOX_SIZE                 64

/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The radius of the star, [Arcseconds]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_STAR_RADIUS              2.0
/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The inner radius of the noise-estimation region, [Arcseconds]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_BACKGROUND_R1            2.0
/*----------------------------------------------------------------------------*/
/**
   @hideinitializer
   @ingroup irplib_strehl
   @brief  The outer radius of the noise-estimation region, [Arcseconds]
   @see irplib_strehl_compute()
 */
/*----------------------------------------------------------------------------*/
#define IRPLIB_STREHL_BACKGROUND_R2            3.0

typedef enum {
    IRPLIB_BG_METHOD_AVER_REJ,
    IRPLIB_BG_METHOD_MEDIAN
} irplib_strehl_bg_method;

/*-----------------------------------------------------------------------------
                               Function prototypes
 -----------------------------------------------------------------------------*/

cpl_error_code irplib_strehl_compute(const cpl_image *, double, double, double,
                                     double, double, int, double, double,
                                     double, double, double, int, int,
                                     double *, double *, double *, double *,
                                     double *, double *, double *, double *);

double irplib_strehl_disk_flux(const cpl_image *, double, double, double,
                               double);

double irplib_strehl_ring_background(const cpl_image *, double, double, double,
                                     double, irplib_strehl_bg_method);

cpl_image * irplib_strehl_generate_psf(double, double, double, double, double,
                                       int);
cpl_error_code irplib_strehl_disk_max(const cpl_image *, double, double,
                                             double, double *);
#endif