Unverified Commit 99c3353a authored by Emmanuel Bertin's avatar Emmanuel Bertin Committed by GitHub
Browse files

Merge pull request #46 from astromatic/doc

Update doc
parents 34c3c87c 752069af
......@@ -18,19 +18,26 @@ Background estimation
To compute the background map, |SExtractor| makes a first pass through the pixel data, estimating the local background in each mesh of a rectangular grid that covers the whole frame.
The background estimator is a combination of :math:`\kappa\,\sigma` clipping and mode estimation, similar to Stetson’s |DAOPHOT|_ program :cite:`1987PASP_99_191S,1992ASPC_23_90D`.
Briefly, the local background histogram is clipped iteratively until convergence at :math:`\pm 3\sigma` around its median. The mode of the histogram is estimated using:
Briefly, the local background histogram is clipped iteratively until convergence at :math:`\pm 3\sigma` around its median. The mode of the histogram is estimated using the semi-empirical relation
.. math::
:label: sexbackmode
:label: ksbackmode
\mbox{Mode} = 2.5 \times \mbox{Median} - 1.5 \times \mbox{Mean}.
\mbox{Mode} - \mbox{Mean} \approx \alpha_{\rm{Pearson}} \times (\mbox{Median} - \mbox{Mean}),
Using simulated images, the expression above was found more accurate with clipped distributions :cite:`1996AAS_117_393B` than the usual approximation (e.g., :cite:`stuart2009kendall`):
and therefore
.. math::
:label: ksbackmode
:label: sexbackmode
\mbox{Mode} \approx \alpha_{\rm{Pearson}} \times \mbox{Median} - (\alpha_{\rm{Pearson}} - 1) \times \mbox{Mean},
with :math:`\alpha_{\rm{Pearson}} \approx 3` :cite:`1895RSTA_0010,1911AITS,stuart2009kendall`.
\mbox{Mode} = 3 \times \mbox{Median} - 2 \times \mbox{Mean}.
Using simulated images, :cite:`1996AAS_117_393B` found :math:`\alpha_{\rm{Pearson}} \approx 2.5` more appropriate for determining the mode of the background histogram in |SExtractor|.
However, extensive photometric assessments carried out in the context of the `Dark Energy Survey <https://darkenergysurvey.org>`_ later showed that this value leads to a slight overestimation of the local background :cite:`2022ApJS_258_15E`, and a higher :math:`\alpha_{\rm{Pearson}} \approx 3.5` was adopted in |DES|.
Since |SExtractor| v2.28, :math:`\alpha_{\rm{Pearson}}` can be changed using the ``BACK_PEARSON`` configuration parameter.
However, for the sake of compatibility with previous results, the default value of ``BACK_PEARSON`` remains ``2.5``.
:numref:`fig_modevsmean` shows that the mode estimation in :eq:`sexbackmode` is considerably less affected by source crowding than a simple clipped mean :cite:`1981AJ_86_476J,1987AA_183_177I` but it is :math:`\approx 30\%` noisier.
Obviously :eq:`sexbackmode` is not valid for any distribution; |SExtractor| falls back to a simple median for estimating the local background value if the mode and the median disagree by more than 30%.
......@@ -56,7 +63,7 @@ In parallel with the making of the background map, an *RMS background map*, that
It may be used as an internal weight map if the ``WEIGHT_TYPE`` configuration parameter is to ``BACKGROUND`` (see :ref:`weight-map_format`).
Configuration and tuning
------------------------
~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
All background configuration parameters also affect background-RMS maps.
......
......@@ -269,7 +269,7 @@ Model-based star-galaxy separation: :param:`SPREAD_MODEL`
---------------------------------------------------------
The :param:`SPREAD_MODEL` estimator has been developed as a star/galaxy classifier for the DESDM pipeline :cite:`2012SPIE_8451E_0DM`, and has also been used in other surveys :cite:`2012ApJ_757_83D,2013AA_554A_101B`.
:param:`SPREAD_MODEL` indicates which of the best fitting local PSF model resampled at the current position :math:`\tilde{\boldsymbol{\phi}}` (representing a point source) or a slightly ``fuzzier'' resampled model :math:`\tilde{\boldsymbol{G}}` (representing a galaxy) matches best the image data.
:param:`SPREAD_MODEL` indicates which of the best fitting local PSF model resampled at the current position :math:`\tilde{\boldsymbol{\phi}}` (representing a point source) or a slightly "fuzzier" resampled model :math:`\tilde{\boldsymbol{G}}` (representing a galaxy) matches best the image data.
:math:`\tilde{\boldsymbol{G}}` is obtained by convolving the local PSF model with a circular exponential model with scalelength = 1/16 |FWHM|, and resampling the result at the current position on the pixel grid. :param:`SPREAD_MODEL` is normalized to allow comparing sources with different PSFs throughout the field:
.. math::
......@@ -306,6 +306,7 @@ In order to maintain a certain level of purity or completeness across the whole
.. math::
:label: spreaderr_model
:nowrap:
\begin{eqnarray}
{\tt SPREADERR\_MODEL} & = & \frac{1}{(\tilde{\boldsymbol{\phi}}^\mathsf{T} {\bf W}\,\boldsymbol{p})^2} \left((\tilde{\boldsymbol{G}}^\mathsf{T} {\bf V}\,\tilde{\boldsymbol{G}})\,(\tilde{\boldsymbol{\phi}}^\mathsf{T} {\bf W}\,\boldsymbol{p})^2\right.\nonumber \\
......
......@@ -27,6 +27,7 @@ These coordinates define two corners of a rectangle which encloses the detected
.. math::
:label: xminymax
:nowrap:
\begin{eqnarray}
{\tt XMIN} & = & \min_{i \in {\cal S}} x_i,\\
......@@ -47,6 +48,7 @@ Barycenter coordinates generally define the position of the “center” of a so
.. math::
:label: xy
:nowrap:
\begin{eqnarray}
{\tt X} & = & \overline{x} = \frac{\displaystyle \sum_{i \in {\cal S}}
......@@ -76,6 +78,7 @@ Second-order moments: :param:`X2`, :param:`Y2`, :param:`XY`
.. math::
:label: x2y2
:nowrap:
\begin{eqnarray}
{\tt X2} & = \overline{x^2} = & \frac{\displaystyle \sum_{i \in {\cal S}} p^{(f)}_i x_i^2}{\displaystyle \sum_{i \in {\cal S}} p^{(f)}_i} - \overline{x}^2,\\
......@@ -144,6 +147,7 @@ covariance :math:`\overline{xy}`.
.. math::
:label: aimage
:nowrap:
\begin{eqnarray}
{\tt A}^2 & = & \overline{x^2}_{\tt THETA},\ \ \ {\rm and}\\
......@@ -154,6 +158,7 @@ covariance :math:`\overline{xy}`.
.. math::
:label: aimage_2
:nowrap:
\begin{eqnarray}
{\tt A}^2 & = & \frac{\overline{x^2}+\overline{y^2}}{2}
......@@ -175,6 +180,7 @@ These parameters [#elongation]_ are directly derived from :param:`A` and :param:
.. math::
:label: elongation
:nowrap:
\begin{eqnarray}
{\tt ELONGATION} & = & \frac{\tt A}{\tt B}\ \ \ \ \ \mbox{and}\\
......@@ -206,6 +212,7 @@ parameters can be derived from the 2nd order moments:
.. math::
:label: ellipse_2
:nowrap:
\begin{eqnarray}
{\tt CXX} & = & \frac{\cos^2 {\tt THETA}}{{\tt A}^2} + \frac{\sin^2
......@@ -240,6 +247,7 @@ Furthermore, |SExtractor| does not currently take into account possible correlat
.. math::
:label: errxy
:nowrap:
\begin{eqnarray}
{\tt ERRX2} & = {\rm var}(\overline{x}) =
......@@ -261,6 +269,7 @@ where :math:`{\sigma_B}_i` is the local background noise and :math:`g_i` the loc
.. math::
:label: errabtheta
:nowrap:
\begin{eqnarray}
{\tt ERRA}^2 & = & \frac{{\rm var}(\overline{x})+{\rm var}(\overline{y})}{2}
......@@ -277,6 +286,7 @@ And the error ellipse parameters are:
.. math::
:label: errellipse
:nowrap:
\begin{eqnarray}
{\tt ERRCXX} & = & \frac{\cos^2 {\tt ERRTHETA}}{{\tt ERRA}^2} +
......
"""
ADSArxiv PybTeX style
"""
# Copyright Emmanuel Bertin CFHT/CNRS/SorbonneU
# Licensed under GPL v3
from packaging import version as vers
from pybtex import __version__ as pybtex_version
from pybtex.style.formatting.unsrt import Style as UnsrtStyle, date, pages, toplevel
from pybtex.style.template import * # ... and anything else needed
from pybtex.plugin import register_plugin
pybtex_new_version = vers.parse(pybtex_version) >= vers.parse("0.22")
if pybtex_new_version:
def _format_data(node, data):
try:
f = node.format_data
except AttributeError:
return node
else:
return f(data)
def _format_list(list_, data):
return (_format_data(part, data) for part in list_)
@node
def href2(children, data):
parts = _format_list(children, data)
if "http" in list(parts)[0]:
parts = _format_list(children, data)
return richtext.HRef(*parts)
else:
parts = _format_list(children, data)
return richtext.Tag('strong', *parts)
class ADSArxivStyle(UnsrtStyle):
if pybtex_new_version:
def format_names(self, role, as_sentence=True):
formatted_names = names(role, sep=', ', sep2 = ' and ', last_sep=', and ')
if as_sentence:
return sentence[ formatted_names ]
else:
return formatted_names
def get_article_template(self, e):
volume_and_pages = first_of[
# volume and pages, with optional issue number
optional[
join[
field('volume'),
optional[ '(', field('number'),')' ],
':', pages
],
],
# pages only
words[ 'pages', pages ],
]
myurl = first_of[
optional_field('adsurl'),
optional[ join[ 'http://arxiv.org/abs/', field('eprint') ]],
optional_field('url'),
optional[ join ['http://dx.doi.org/', field('doi') ]]
]
template = toplevel[
sentence[ self.format_names('author', as_sentence=False), field('year') ],
href2[ myurl, self.format_title(e, 'title') ],
sentence(capfirst=False) [
tag('emph')[ field('journal') ],
optional[ volume_and_pages ]],
sentence(capfirst=False) [ optional_field('note') ],
]
return template
def get_book_template(self, e):
myurl = first_of[
optional_field('adsurl'),
optional[ join ['http://arxiv.org/abs/', field('eprint') ]],
optional_field('url'),
optional[ join ['http://dx.doi.org/', field('doi') ]]
]
template = toplevel[
self.format_author_or_editor(e),
href2[ myurl, self.format_btitle(e, 'title') ],
self.format_volume_and_series(e),
sentence [
field('publisher'),
optional_field('address'),
self.format_edition(e),
date
],
optional[ sentence [ self.format_isbn(e) ] ],
sentence [ optional_field('note') ],
]
return template
def get_inproceedings_template(self, e):
myurl = first_of[
optional_field('adsurl'),
optional[ join ['http://arxiv.org/abs/', field('eprint') ]],
optional_field('url'),
optional[ join ['http://dx.doi.org/', field('doi') ]]
]
template = toplevel[
sentence[ self.format_names('author', as_sentence=False), field('year') ],
href2[ myurl, self.format_title(e, 'title') ],
words[
'In',
sentence(capfirst=False)[
optional[ self.format_editor(e, as_sentence=False) ],
self.format_btitle(e, 'booktitle', as_sentence=False),
self.format_volume_and_series(e, as_sentence=False),
optional[ pages ],
],
self.format_address_organization_publisher_date(e),
],
sentence(capfirst=False)[ optional_field('note') ],
]
return template
def get_misc_template(self, e):
myurl = first_of[
optional_field('adsurl'),
optional[ join ['http://arxiv.org/abs/', field('eprint') ]],
optional_field('url'),
optional[ join ['http://dx.doi.org/', field('doi') ]]
]
template = toplevel[
optional[ sentence[ self.format_names('author', as_sentence=False), optional [ field('year') ]]],
optional[ href2[ myurl, self.format_title(e, 'title') ]],
sentence[ optional[ field('howpublished') ]],
sentence[ optional_field('note') ],
]
return template
else:
def format_article(self, e):
volume_and_pages = first_of [
# volume and pages, with optional issue number
optional [
join [
field('volume'),
optional['(', field('number'),')'],
':', pages
],
],
# pages only
words ['pages', pages],
]
myurl = first_of [
optional_field('adsurl'),
optional [join ['http://arxiv.org/abs/'], field('eprint')],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
self.format_names('author'),
href [myurl, self.format_title(e, 'title')],
sentence(capfirst=False) [
tag('emph') [field('journal')],
optional[ volume_and_pages ],
field('year')],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
def format_book(self, e):
myurl = first_of [
optional_field('adsurl'),
optional [join ['http://arxiv.org/abs/'], field('eprint')],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
self.format_author_or_editor(e),
href [myurl, self.format_btitle(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_btitle(e, 'title')],
self.format_volume_and_series(e),
sentence [
field('publisher'),
optional_field('address'),
self.format_edition(e),
date
],
optional[ sentence [ self.format_isbn(e) ] ],
optional_field('note'),
]
return template.format_data(e)
def format_inproceedings(self, e):
myurl = first_of [
optional_field('adsurl'),
optional [join ['http://arxiv.org/abs/', field('eprint')]],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
sentence [self.format_names('author')],
href [myurl, self.format_title(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_title(e, 'title')],
words [
'In',
sentence(capfirst=False) [
optional[ self.format_editor(e, as_sentence=False) ],
self.format_btitle(e, 'booktitle', as_sentence=False),
self.format_volume_and_series(e, as_sentence=False),
optional[ pages ],
],
self.format_address_organization_publisher_date(e),
],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
register_plugin('pybtex.style.formatting', 'adsarxiv', ADSArxivStyle)
......@@ -16,32 +16,27 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os, sys
sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme
import adsarxiv
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
# 'sphinx.ext.intersphinx',
# 'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinxcontrib.bibtex',
'sphinx.ext.githubpages'
'sphinx.ext.githubpages',
'sphinx.ext.mathjax',
'sphinx.ext.todo',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['../theme']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
......@@ -59,7 +54,7 @@ master_doc = 'index'
# General information about the project.
project = u'SExtractor'
filename = 'sextractor'
copyright = u'2017, IAP/CNRS/UPMC'
copyright = u'2017-2023, CFHT/IAP/CNRS/SorbonneU'
author = u'E. Bertin'
# The version info for the project you're documenting, acts as replacement for
......@@ -71,13 +66,6 @@ version = '2.28.0'
# The full version, including alpha/beta/rc tags.
release = '2.28.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
......@@ -90,21 +78,7 @@ today = 'Tue Mar 07 2023'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['global.rst','keys.rst','roles.rst']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
exclude_patterns = ['global.rst','keys.rst','macro.rst','roles.rst']
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
......@@ -114,53 +88,17 @@ exclude_patterns = ['global.rst','keys.rst','roles.rst']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
numfig = True
# -- Options for HTML output ----------------------------------------------
smartquotes = False
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'SExtractor v2.28.0'
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
......@@ -168,49 +106,7 @@ html_static_path = ['../theme']
# Trick for having ReadTheDocs read custom theme changes
def setup(app):
app.add_stylesheet("css/custom.css")
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
html_show_sourcelink = False
app.add_css_file("css/custom.css")
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
......@@ -218,39 +114,9 @@ html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = filename + 'doc'
# -- Options for LaTeX output ---------------------------------------------
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
......@@ -263,11 +129,11 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
#
'preamble': '\usepackage{amssymb}',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
'preamble': r'''
\usepackage{amssymb}
\newcommand{\DUrolecredits}{\footnotesize\color{lightgray}\newline}
\usepackage{etoolbox}
\AtBeginEnvironment{figure}{\pretocmd{\hyperlink}{\protect}{}{}}'''
}
# Grouping the document tree into LaTeX files. List of tuples
......@@ -311,7 +177,7 @@ latex_show_urls = 'footnote'
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
......@@ -325,7 +191,7 @@ man_pages = [
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
......@@ -353,7 +219,7 @@ texinfo_documents = [
# texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
......@@ -437,74 +303,13 @@ epub_exclude_files = ['search.html']
#
# epub_use_index = True
# -- Extension configurations ------------------------------------------------
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
# -- Options for pybtex ----------------------------------------------
from pybtex.style.formatting.unsrt import Style as UnsrtStyle, date, pages, toplevel
from pybtex.style.template import * # ... and anything else needed
from pybtex.plugin import register_plugin
class ADSArxivStyle(UnsrtStyle):
def format_article(self, e):
volume_and_pages = first_of [
# volume and pages, with optional issue number
optional [
join [
field('volume'),
optional['(', field('number'),')'],
':', pages
],
],
# pages only
words ['pages', pages],
]
myurl = first_of [
optional_field('adsurl'),
join ['http://arxiv.org/abs/', optional_field('eprint')],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
self.format_names('author'),
href [myurl, self.format_title(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_title(e, 'title')],
sentence(capfirst=False) [
tag('emph') [field('journal')],
optional[ volume_and_pages ],
field('year')],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
def format_inproceedings(self, e):
myurl = first_of [
optional_field('adsurl'),
optional [join ['http://arxiv.org/abs/', field('eprint')]],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
sentence [self.format_names('author')],
href [myurl, self.format_title(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_title(e, 'title')],
words [
'In',
sentence(capfirst=False) [
optional[ self.format_editor(e, as_sentence=False) ],
self.format_btitle(e, 'booktitle', as_sentence=False),
self.format_volume_and_series(e, as_sentence=False),
optional[ pages ],
],
self.format_address_organization_publisher_date(e),
],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
register_plugin('pybtex.style.formatting', 'adsarxiv', ADSArxivStyle)
# -- Options for pybtex ------------------------------------------------------
bibtex_bibfiles = ['references.bib']
......@@ -16,32 +16,27 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os, sys
sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme
import adsarxiv
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
# 'sphinx.ext.intersphinx',
# 'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinxcontrib.bibtex',
'sphinx.ext.githubpages'
'sphinx.ext.githubpages',
'sphinx.ext.mathjax',
'sphinx.ext.todo',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['../theme']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
......@@ -59,7 +54,7 @@ master_doc = 'index'
# General information about the project.
project = u'@PACKAGE_NAME@'
filename = '@PACKAGE_TARNAME@'
copyright = u'2017, IAP/CNRS/UPMC'
copyright = u'2017-2023, CFHT/IAP/CNRS/SorbonneU'
author = u'E. Bertin'
# The version info for the project you're documenting, acts as replacement for
......@@ -71,13 +66,6 @@ version = '@PACKAGE_VERSION@'
# The full version, including alpha/beta/rc tags.
release = '@PACKAGE_VERSION@'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
......@@ -90,21 +78,7 @@ today = '@DATE2@'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['global.rst','keys.rst','roles.rst']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
exclude_patterns = ['global.rst','keys.rst','macro.rst','roles.rst']
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
......@@ -114,53 +88,17 @@ exclude_patterns = ['global.rst','keys.rst','roles.rst']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
numfig = True
# -- Options for HTML output ----------------------------------------------
smartquotes = False
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'@PACKAGE_NAME@ v@PACKAGE_VERSION@'
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
......@@ -168,49 +106,7 @@ html_static_path = ['../theme']
# Trick for having ReadTheDocs read custom theme changes
def setup(app):
app.add_stylesheet("css/custom.css")
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
html_show_sourcelink = False
app.add_css_file("css/custom.css")
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
......@@ -218,39 +114,9 @@ html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = filename + 'doc'
# -- Options for LaTeX output ---------------------------------------------
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
......@@ -263,11 +129,11 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
#
'preamble': '\usepackage{amssymb}',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
'preamble': r'''
\usepackage{amssymb}
\newcommand{\DUrolecredits}{\footnotesize\color{lightgray}\newline}
\usepackage{etoolbox}
\AtBeginEnvironment{figure}{\pretocmd{\hyperlink}{\protect}{}{}}'''
}
# Grouping the document tree into LaTeX files. List of tuples
......@@ -311,7 +177,7 @@ latex_show_urls = 'footnote'
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
......@@ -325,7 +191,7 @@ man_pages = [
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
......@@ -353,7 +219,7 @@ texinfo_documents = [
# texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
......@@ -437,74 +303,13 @@ epub_exclude_files = ['search.html']
#
# epub_use_index = True
# -- Extension configurations ------------------------------------------------
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
# -- Options for pybtex ----------------------------------------------
from pybtex.style.formatting.unsrt import Style as UnsrtStyle, date, pages, toplevel
from pybtex.style.template import * # ... and anything else needed
from pybtex.plugin import register_plugin
class ADSArxivStyle(UnsrtStyle):
def format_article(self, e):
volume_and_pages = first_of [
# volume and pages, with optional issue number
optional [
join [
field('volume'),
optional['(', field('number'),')'],
':', pages
],
],
# pages only
words ['pages', pages],
]
myurl = first_of [
optional_field('adsurl'),
join ['http://arxiv.org/abs/', optional_field('eprint')],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
self.format_names('author'),
href [myurl, self.format_title(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_title(e, 'title')],
sentence(capfirst=False) [
tag('emph') [field('journal')],
optional[ volume_and_pages ],
field('year')],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
def format_inproceedings(self, e):
myurl = first_of [
optional_field('adsurl'),
optional [join ['http://arxiv.org/abs/', field('eprint')]],
optional_field('url'),
optional [join ['http://dx.doi.org/', field('doi')]]
]
template = toplevel [
sentence [self.format_names('author')],
href [myurl, self.format_title(e, 'title')] \
if len(myurl.format_data(e)) > 0 \
else tag('strong') [self.format_title(e, 'title')],
words [
'In',
sentence(capfirst=False) [
optional[ self.format_editor(e, as_sentence=False) ],
self.format_btitle(e, 'booktitle', as_sentence=False),
self.format_volume_and_series(e, as_sentence=False),
optional[ pages ],
],
self.format_address_organization_publisher_date(e),
],
sentence(capfirst=False) [ optional_field('note') ],
]
return template.format_data(e)
register_plugin('pybtex.style.formatting', 'adsarxiv', ADSArxivStyle)
# -- Options for pybtex ------------------------------------------------------
bibtex_bibfiles = ['references.bib']
......@@ -7,6 +7,9 @@
.. |DAOPHOT| replace:: :program:`DAOPHOT`
.. _DAOPHOT: http://ascl.net/phpBB3/viewtopic.php?t=23410
.. |DES| replace:: :abbr:`Dark Energy Survey`
.. _DES: https://darkenergysurvey.org
.. |.dmg| replace:: :file:`.dmg`
.. _.dmg: https://en.wikipedia.org/wiki/Apple_Disk_Image
......
......@@ -141,6 +141,26 @@ archivePrefix = "arXiv",
pages = {1016-1022},
doi = {10.1175/1520-0450(1979)018<1016:LFIOAT>2.0.CO;2},
}
@ARTICLE{2022ApJS_258_15E,
author = {{Everett}, S. and {Yanny}, B. and {Kuropatkin}, N. and {Huff}, E.~M. and {Zhang}, Y. and {Myles}, J. and {Masegian}, A. and {Elvin-Poole}, J. and {Allam}, S. and {Bernstein}, G.~M. and {Sevilla-Noarbe}, I. and {Splettstoesser}, M. and {Sheldon}, E. and {Jarvis}, M. and {Amon}, A. and {Harrison}, I. and {Choi}, A. and {Hartley}, W.~G. and {Alarcon}, A. and {S{\'a}nchez}, C. and {Gruen}, D. and {Eckert}, K. and {Prat}, J. and {Tabbutt}, M. and {Busti}, V. and {Becker}, M.~R. and {MacCrann}, N. and {Diehl}, H.~T. and {Tucker}, D.~L. and {Bertin}, E. and {Jeltema}, T. and {Drlica-Wagner}, A. and {Gruendl}, R.~A. and {Bechtol}, K. and {Carnero Rosell}, A. and {Abbott}, T.~M.~C. and {Aguena}, M. and {Annis}, J. and {Bacon}, D. and {Bhargava}, S. and {Brooks}, D. and {Burke}, D.~L. and {Carrasco Kind}, M. and {Carretero}, J. and {Castander}, F.~J. and {Conselice}, C. and {Costanzi}, M. and {da Costa}, L.~N. and {Pereira}, M.~E.~S. and {De Vicente}, J. and {DeRose}, J. and {Desai}, S. and {Eifler}, T.~F. and {Evrard}, A.~E. and {Ferrero}, I. and {Fosalba}, P. and {Frieman}, J. and {Garc{\'\i}a-Bellido}, J. and {Gaztanaga}, E. and {Gerdes}, D.~W. and {Gutierrez}, G. and {Hinton}, S.~R. and {Hollowood}, D.~L. and {Honscheid}, K. and {Huterer}, D. and {James}, D.~J. and {Kent}, S. and {Krause}, E. and {Kuehn}, K. and {Lahav}, O. and {Lima}, M. and {Lin}, H. and {Maia}, M.~A.~G. and {Marshall}, J.~L. and {Melchior}, P. and {Menanteau}, F. and {Miquel}, R. and {Mohr}, J.~J. and {Morgan}, R. and {Muir}, J. and {Ogando}, R.~L.~C. and {Palmese}, A. and {Paz-Chinch{\'o}n}, F. and {Plazas}, A.~A. and {Rodriguez-Monroy}, M. and {Romer}, A.~K. and {Roodman}, A. and {Sanchez}, E. and {Scarpine}, V. and {Serrano}, S. and {Smith}, M. and {Soares-Santos}, M. and {Suchyta}, E. and {Swanson}, M.~E.~C. and {Tarle}, G. and {To}, C. and {Troxel}, M.~A. and {Varga}, T.~N. and {Weller}, J. and {Wilkinson}, R.~D. and {Wilkinson}, R.~D.},
title = "{Dark Energy Survey Year 3 Results: Measuring the Survey Transfer Function with Balrog}",
journal = {\apjs},
keywords = {343, 1464, 351, 1857, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
year = 2022,
month = jan,
volume = {258},
number = {1},
eid = {15},
pages = {15},
doi = {10.3847/1538-4365/ac26c1},
archivePrefix = {arXiv},
eprint = {2012.12825},
primaryClass = {astro-ph.CO},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022ApJS..258...15E},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{2002AA_395_1061G,
author = {{Greisen}, E.~W. and {Calabretta}, M.~R.},
title = "{Representations of world coordinates in FITS}",
......@@ -283,6 +303,18 @@ archivePrefix = "arXiv",
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{1895RSTA_0010,
author = {{Pearson}, K.},
title = "{Contributions to the mathematical theory of evolution.—II. Skew variation in homogeneous material}",
journal = {Philosophical Transactions of the Royal Society of London},
year = 1895,
month = jan,
volume = 186,
pages = {343-414},
doi = {10.1098/rsta.1895.0010},
url = {https://dx.doi.org/10.1098/rsta.1895.0010},
}
@ARTICLE{1976ApJ_209L_1P,
author = {{Petrosian}, V.},
title = "{Surface brightness and evolution of galaxies}",
......@@ -340,13 +372,13 @@ author={{Saerens}, M. and {Latinne}, P. and {Decaestecker}, C.},
journal={IEEE Transactions on Neural Networks},
title={Any reasonable cost function can be used for a posteriori probability approximation},
year={2002},
month={Sep},
volume={13},
number={5},
pages={1204-1210},
keywords={Bayes methods;decision theory;learning (artificial intelligence);Bayes decision making;a posteriori probability;class membership;cost function;learning machine;loss function;subjective probability theory;Artificial intelligence;Artificial neural networks;Bayesian methods;Computational modeling;Cost function;Decision making;Input variables;Laboratories;Machine learning;Mean square error methods},
doi={10.1109/TNN.2002.1031952},
ISSN={1045-9227},
month={Sep}
}
@ARTICLE{1987PASP_99_191S,
......@@ -542,6 +574,15 @@ publisher = {Cordoba, Argentina: Observatorio Astronomico, 1968},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@BOOK{1911AITS,
author = {{Yule}, G.~U.},
title = "{ An introduction to the theory of statistics}",
publisher = {C. Griffin and Company, limited},
year = 1911,
url = {https://archive.org/details/anintroductiont01yulegoog/page/n139/mode/2up},
}
@PHDTHESIS{1996PhDT_68B,
author = {{Bertin}, E.},
title = "{Photom\'etrie automatique de galaxies et contraintes sur leur \'evolution r\'ecente}",
......
......@@ -689,8 +689,8 @@ float backguess(backstruct *bkg, float *mean, float *sigma)
sig = 10.0*nlevelsm1;
sig1 = 1.0;
medfac = prefs.back_pearsons;
meafac = prefs.back_pearsons - 1.0;
medfac = prefs.back_pearson;
meafac = prefs.back_pearson - 1.0;
mea = med = bkg->mean;
for (n=100; n-- && (sig>=0.1) && (fabs(sig/sig1-1.0)>EPS);)
{
......
......@@ -61,7 +61,7 @@
{"BACK_FILTERSIZE", P_INTLIST, prefs.backfsize, 1,11, 0.0,0.0,
{""}, 1,2, &prefs.nbackfsize},
{"BACK_FILTTHRESH", P_FLOAT, &prefs.backfthresh, 0,0, 0.0,BIG},
{"BACK_PEARSONS", P_FLOAT, &prefs.back_pearsons, 0,0, 1.0,BIG},
{"BACK_PEARSON", P_FLOAT, &prefs.back_pearson, 0,0, 1.0,BIG},
{"BACKPHOTO_THICK", P_INT, &prefs.pback_size, 1, 256},
{"BACKPHOTO_TYPE", P_KEY, &prefs.pback_type, 0,0, 0.0,0.0,
{"GLOBAL","LOCAL",""}},
......@@ -262,8 +262,8 @@ char *default_prefs[] =
" ",
"*BACK_TYPE AUTO # AUTO or MANUAL",
"*BACK_VALUE 0.0 # Default background value in MANUAL mode",
"*BACK_PEARSONS 2.5 # Pearson's factor P >= 1 with",
"* # (mean - mode) ~ P * (mean - median)",
"*BACK_PEARSON 2.5 # Pearson's factor alpha >= 1 with",
"* # (mode - mean) ~ alpha * (median - mean)",
"* # Legacy value is 2.5, but 3.5 is more accurate",
"BACK_SIZE 64 # Background mesh: <size> or <width>,<height>",
"BACK_FILTERSIZE 3 # Background filter: <size> or <width>,<height>",
......
......@@ -136,7 +136,7 @@ typedef struct
int backfsize[2]; /* bkgnd filt. size */
int nbackfsize; /* nb of params */
double backfthresh; /* bkgnd fil. thresh */
double back_pearsons; /* Pearson's factor */
double back_pearson; /* Pearson's factor */
enum {GLOBAL, LOCAL} pback_type; /* phot. bkgnd type */
int pback_size; /* rect. ann. width */
/*----- memory */
......
......@@ -7,7 +7,7 @@
*
* This file part of: SExtractor
*
* Copyright: (C) 2006-2013 Emmanuel Bertin -- IAP/CNRS/UPMC
* Copyright: (C) 2006-2023 CFHT/IAP/CNRS/SorbonneU
*
* License: GNU General Public License
*
......@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 27/04/2013
* Last modified: 07/03/2023
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -231,8 +231,8 @@ INPUT Pointer to the output file (or stream),
Pointer to an error msg (or NULL).
OUTPUT RETURN_OK if everything went fine, RETURN_ERROR otherwise.
NOTES -.
AUTHOR E. Bertin (IAP)
VERSION 25/04/2013
AUTHOR E. Bertin (CFHT/IAP)
VERSION 07/03/2023
***/
int write_xml_meta(FILE *file, char *error)
{
......@@ -546,6 +546,7 @@ int write_xml_meta(FILE *file, char *error)
write_xmlconfigparam(file, "BackPhoto_Type", "","meta.code;obs.param", "");
write_xmlconfigparam(file, "BackPhoto_Thick", "pix", "obs.param", "%d");
write_xmlconfigparam(file, "Back_FiltThresh", "ct", "obs.param;", "%g");
write_xmlconfigparam(file, "Back_Pearson", "", "obs.param;", "%g");
write_xmlconfigparam(file, "CheckImage_Type","","meta.code;obs.param", "");
write_xmlconfigparam(file, "CheckImage_Name", "",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment