SINFONI Pipeline Reference Manual
2.5.2
sinfoni
sinfo_utils.h
1
/*
2
* This file is part of the ESO SINFO Pipeline
3
* Copyright (C) 2004,2005 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, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18
*/
19
20
/*
21
* $Author: kmirny $
22
* $Date: 2010-09-30 14:00:03 $
23
* $Revision: 1.5 $
24
* $Name: not supported by cvs2svn $
25
*
26
*/
27
#ifndef SINFO_UTILS_H
28
#define SINFO_UTILS_H
29
30
31
#ifdef HAVE_CONFIG_H
32
# include <config.h>
33
#endif
34
#include <math.h>
35
#include <sinfo_msg.h>
36
#include <sinfo_error.h>
37
#include <cpl.h>
38
/*
39
* The purpose of this target is to
40
* decrease the amount of messages
41
* printed at the debug level.
42
*
43
* If set to non-zero, even more messages
44
* are printed at the debug level
45
* (sometimes 50 - 100 MB)
46
*
47
*/
48
#ifndef WANT_BIG_LOGFILE
49
#define WANT_BIG_LOGFILE 0
50
#endif
51
52
/*
53
* Set to 1 to show timing
54
* information on msg-level = info
55
*/
56
#ifndef WANT_TIME_MEASURE
57
#define WANT_TIME_MEASURE 0
58
#endif
59
60
61
#if WANT_TIME_MEASURE
62
#define SINFO_TIME_START(what) sinfo_msg("Timing (%s, l%d) %s start", \
63
__FILE__, __LINE__, what)
64
#define SINFO_TIME_END sinfo_msg("Timing (%s, l%d) end", \
65
__FILE__, __LINE__)
66
#else
67
#define SINFO_TIME_START(what) sinfo_msg_debug("Timing (%s, l%d) %s start", \
68
__FILE__, __LINE__, what)
69
#define SINFO_TIME_END sinfo_msg_debug("Timing (%s, l%d) end", \
70
__FILE__, __LINE__)
71
#endif
72
73
74
75
76
#ifndef stringify
77
#ifndef make_str
78
#define stringify(X) #X
79
#define make_str(X) stringify(X)
80
#endif
81
#endif
82
83
#define TWOSQRT2LN2 2.35482004503095
84
85
#ifndef M_PI
86
#define M_PI 3.1415926535897932384626433832795
87
#endif
88
89
#define COS_DEG(x) cos(((x)/180)*M_PI)
90
#define SIN_DEG(x) sin(((x)/180)*M_PI)
91
#define ACOS_DEG(x) (acos(x)*180/M_PI)
92
93
94
95
long
sinfo_round_double(
double
x);
96
int
97
sinfo_parameter_get_default_flag (
const
cpl_parameter* p );
98
99
#endif
Generated by
1.8.1.1