forked from vterron/lemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.py
76 lines (64 loc) · 3.13 KB
/
defaults.py
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
#! /usr/bin/env python
# Copyright (c) 2012 Victor Terron. All rights reserved.
# Institute of Astrophysics of Andalusia, IAA-CSIC
#
# This file is part of LEMON.
#
# LEMON 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 3 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, see <http://www.gnu.org/licenses/>.
""" Definition of the default options used by the different modules """
import multiprocessing
# LEMON modules
import passband
import setup
desc = {} # option descriptions (for optparse)
ncores = multiprocessing.cpu_count()
desc['ncores'] = \
"the maximum number of cores available to the module. This option " \
"defaults to the number of CPUs in the system, which are automatically " \
"detected [default: %default]"
maximum = 50000
desc['maximum'] = \
"the CCD saturation level, in ADUs. Those star which have one or more " \
"pixels above this value are considered to be saturated. Note that, for " \
"coadded images, the effective saturation level is obtained by multiplying " \
"this value by the number of coadds (see --coaddk option) [default: %default]"
margin = 0
desc['margin'] = \
"the width, in pixels, of the areas adjacent to the edges that will be " \
"ignored when detecting sources on the reference image. Stars whose center " \
"is fewer than 'margin' pixels from any border (horizontal or vertical) of " \
"the FITS image are not considered. [default: %default]"
verbosity = 0
desc['verbosity'] = \
"increase the amount of information given during the execution. A single " \
"-v tracks INFO events, while two or more enable DEBUG messages. These " \
"are probably only useful when debugging the module."
snr_percentile = 25
desc['snr_percentile'] = \
"the score at the percentile of the signal-to-noise ratio of the " \
"astronomical objects that are to be included in the calculation of the " \
"FWHM / elongation of a FITS image. Objects whose SNR is below this " \
"score are excluded. Note that the percentile is calculated taking into " \
"account only the astronomical objects within the image margins (see " \
"the '--margin' option) [default: %default]"
desc['mean'] = \
"in order to compute the FWHM / elongation of a FITS image, take the " \
"arithmetic mean of the astronomical objects (detected by SExtractor) " \
"instead of the median. So you say you prefer a non-robust statistic?"
desc['filter'] = \
"The supported systems are Johnson, Cousins, Gunn, SDSS, 2MASS, Stromgren " \
"and H-alpha, but letters, designating a particular section of the " \
"electromagnetic spectrum, may also be used without a system (e.g., 'V'). " \
"In addition to the built-in photometric systems, custom filters are " \
"supported via the %s configuration file." % setup.CONFIG_FILENAME