Unverified Commit 08c0ebe3 authored by Emmanuel Bertin's avatar Emmanuel Bertin Committed by GitHub
Browse files

Merge pull request #47 from astromatic/develop

Develop
parents 9689a1c4 f7c10f46
name: doc
on:
push:
paths:
- 'doc/**'
pull_request:
paths:
- 'doc/**'
workflow_dispatch:
jobs:
#############
# Build doc #
#############
build:
name: Make doc
continue-on-error: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
pip3 install -r doc/requirements.txt
sudo apt-get -y install latexmk texlive-latex-recommended texlive-fonts-recommended texlive-formats-extra
- name: Build doc
run: |
./autogen.sh
./configure --disable-model-fitting --disable-cfitsio --disable-threads
cd doc
make html
make latexpdf
cp build/latex/sextractor.pdf build/html/
- name: Set destination dir
if: github.ref_name != 'main'
run: |
echo "DOC_DEST=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: doc-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/build/html/
destination_dir: ${{ env.DOC_DEST }}
...@@ -4,7 +4,7 @@ Installing the software ...@@ -4,7 +4,7 @@ Installing the software
Hardware requirements Hardware requirements
===================== =====================
PSFEx runs in (ANSI) text-mode from a shell. A window system is SExtractor runs in (ANSI) text-mode from a shell. A window system is
not necessary for basic operation. not necessary for basic operation.
When it comes to memory usage, the amount required by SExtractor depends When it comes to memory usage, the amount required by SExtractor depends
...@@ -75,18 +75,19 @@ locations: ...@@ -75,18 +75,19 @@ locations:
$ ./configure $ ./configure
Compared to "gcc" and the librairies above, the combination of the Compared to "gcc" and the librairies above, the combination of the
Intel compiler ("icc") and the MKL (Math Kernel Library) libraries Intel compiler ("icc" or "icx") and the MKL (Math Kernel Library)
can give the SExtractor executable a significant boost in performance, libraries can give the SExtractor executable a significant boost in
thanks to better vectorized code, and reduced memory usage. If "icc" performance, thanks to better vectorized code, and reduced memory
and the MKL (Math Kernel Library) are installed on your system [4], usage. If "icc" (or "icx") and the MKL (Math Kernel Library) are
you can take advantage of those using instead installed on your system [4], you can take advantage of those using
instead
$ ./configure --enable-mkl $ ./configure --enable-mkl
Additionally, if the SExtractor binary is to be run on a different Additionally, if the SExtractor binary is to be run on a different
machine that does not have "icc" and the MKL (Math Kernel Library) machine that does not have "icc" (or "icx") and the MKL installed
installed (e.g., a cluster computing node), you must configure a (e.g., a cluster computing node), you must configure a partially
partially statically linked executable using statically linked executable using
$ ./configure --enable-mkl --enable-auto-flags --enable-best-link $ ./configure --enable-mkl --enable-auto-flags --enable-best-link
...@@ -118,6 +119,5 @@ path). ...@@ -118,6 +119,5 @@ path).
options "--enable-threads --enable-float". options "--enable-threads --enable-float".
[4] The Linux versions of the Intel compiler and MKL (Math [4] The Linux versions of the Intel compiler and MKL (Math
Kernel Library) are available for free to academic researchers, Kernel Library) are now available for free on Intel's website.
students, educators and open source contributors.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2022 IAP/CNRS/SorbonneU # Copyright: (C) 2002-2023 CFHT/IAP/CNRS/SorbonneU
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 11/03/2022 # Last modified: 07/03/2023
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -31,8 +31,8 @@ define([AC_CACHE_LOAD],) ...@@ -31,8 +31,8 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],) define([AC_CACHE_SAVE],)
# This is your standard AstrOmatic source code... # This is your standard AstrOmatic source code...
AC_INIT(SExtractor, 2.25.3, [astromatic@astromatic.net], AC_INIT([SExtractor],[2.28.0],[astromatic@astromatic.iap.fr],
sextractor, [http://astromatic.net/software/sextractor]) [sextractor],[http://astromatic.net/software/sextractor])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_SRCDIR(src/makeit.c) AC_CONFIG_SRCDIR(src/makeit.c)
...@@ -53,6 +53,7 @@ sinclude(acx_atlas.m4) ...@@ -53,6 +53,7 @@ sinclude(acx_atlas.m4)
sinclude(acx_openblas.m4) sinclude(acx_openblas.m4)
sinclude(acx_fftw.m4) sinclude(acx_fftw.m4)
sinclude(acx_mkl.m4) sinclude(acx_mkl.m4)
sinclude(acx_cfitsio.m4)
sinclude(acx_prog_cc_optim.m4) sinclude(acx_prog_cc_optim.m4)
sinclude(acx_pthread.m4) sinclude(acx_pthread.m4)
sinclude(acx_urbi_resolve_dir.m4) sinclude(acx_urbi_resolve_dir.m4)
...@@ -79,24 +80,38 @@ AC_ARG_ENABLE(auto-flags, ...@@ -79,24 +80,38 @@ AC_ARG_ENABLE(auto-flags,
AC_MSG_RESULT([yes]), AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
# Provide special option for the Linux Intel C compiler # Provide special option for the Linux Intel C "classic" compiler
AC_MSG_CHECKING([whether the INTEL compiler is enabled]) AC_MSG_CHECKING([whether the classic INTEL compiler is enabled])
AC_ARG_ENABLE(icc, AC_ARG_ENABLE(icc,
[AS_HELP_STRING([--enable-icc], [AS_HELP_STRING([--enable-icc],
[Use the Intel compiler (default = no)])], [Use the Intel compiler (default = no)])],
CC="icc" CC="icc"
enable_iccx="yes"
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
# Provide special option for the Linux Intel OneAPI C compiler
AC_MSG_CHECKING([whether the INTEL compiler is enabled])
AC_ARG_ENABLE(icx,
[AS_HELP_STRING([--enable-icx],
[Use the Intel compiler (default = no)])],
CC="icx"
enable_iccx="yes"
AC_MSG_RESULT([yes]), AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
# Provide special options for INTEL MKL # Provide special options for INTEL MKL
# We force the use of icc # We use icc if available, if not Intel OneAPI's icx
# (we don't use AC_PROG_CC as it does not play nice
# in a conditional block)
AC_MSG_CHECKING([whether INTEL's MKL is enabled]) AC_MSG_CHECKING([whether INTEL's MKL is enabled])
AC_ARG_ENABLE(mkl, AC_ARG_ENABLE(mkl,
[AS_HELP_STRING([--enable-mkl], [AS_HELP_STRING([--enable-mkl],
[Use INTEL's MKL for solvers and FFTs (default = no)])], [Use INTEL's MKL for solvers and FFTs (default = no)])],
enable_icc="yes" AC_MSG_RESULT([yes])
CC="icc" CC=""
AC_MSG_RESULT([yes]), [AC_CHECK_PROGS(CC, [icc icx cc])]
enable_iccx="yes",
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
# Checks for programs. # Checks for programs.
...@@ -115,11 +130,10 @@ AC_PROG_INSTALL ...@@ -115,11 +130,10 @@ AC_PROG_INSTALL
AC_CHECK_LIB(m, sin) AC_CHECK_LIB(m, sin)
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/mman.h \ AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/mman.h \
sys/types.h unistd.h]) sys/types.h unistd.h])
# Checks for INTEL math header files. # Checks for INTEL math header files.
if test "$enable_icc" = "yes"; then if test "$enable_iccx" = "yes"; then
AC_CHECK_HEADERS(mathimf.h) AC_CHECK_HEADERS(mathimf.h)
fi fi
...@@ -135,7 +149,6 @@ AC_TYPE_UID_T ...@@ -135,7 +149,6 @@ AC_TYPE_UID_T
# Checks for library functions. # Checks for library functions.
AC_FUNC_ERROR_AT_LINE AC_FUNC_ERROR_AT_LINE
AC_FUNC_MMAP AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_FUNC_STAT AC_FUNC_STAT
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
AC_CHECK_FUNCS([atexit getenv gettimeofday isinf isnan logf memcpy memmove \ AC_CHECK_FUNCS([atexit getenv gettimeofday isinf isnan logf memcpy memmove \
...@@ -180,6 +193,24 @@ AC_ARG_WITH(openblas-incdir, ...@@ -180,6 +193,24 @@ AC_ARG_WITH(openblas-incdir,
[AS_HELP_STRING([--with-openblas-incdir=<OpenBLAS header dir>], [AS_HELP_STRING([--with-openblas-incdir=<OpenBLAS header dir>],
[Provide an alternative path to the OpenBLAS header directory])]) [Provide an alternative path to the OpenBLAS header directory])])
# Provide special option for CFITSIO
AC_MSG_CHECKING([whether CFITSIO support should be disabled (default=enabled)])
AC_ARG_ENABLE(cfitsio,
[AS_HELP_STRING([--disable-cfitsio],
[Disable support for compressed FITS files through the CFITSIO library (default=enabled)])],
if test "$enable_cfitsio" = "no"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi,
AC_MSG_RESULT([no]))
AC_ARG_WITH(cfitsio-libdir,
[AS_HELP_STRING([--with-cfitsio-libdir=<CFITSIO library path>],
[Provide an alternative path to the CFITSIO library])])
AC_ARG_WITH(cfitsio-incdir,
[AS_HELP_STRING([--with-cfitsio-incdir=<CFITSIO include dir>],
[Provide an alternative path to the CFITSIO include directory])])
# Provide a special option for the default XSLT URL # Provide a special option for the default XSLT URL
with_xsl_url="file://"$(URBI_RESOLVE_DIR([$datadir]))"/$PACKAGE_TARNAME/$PACKAGE_TARNAME.xsl" with_xsl_url="file://"$(URBI_RESOLVE_DIR([$datadir]))"/$PACKAGE_TARNAME/$PACKAGE_TARNAME.xsl"
AC_ARG_WITH(xsl_url, AC_ARG_WITH(xsl_url,
...@@ -222,7 +253,7 @@ use_pthreads="no" ...@@ -222,7 +253,7 @@ use_pthreads="no"
AC_MSG_CHECKING([for profiler mode]) AC_MSG_CHECKING([for profiler mode])
AC_ARG_ENABLE(profiling, AC_ARG_ENABLE(profiling,
[AS_HELP_STRING([--enable-profiling], [AS_HELP_STRING([--enable-profiling],
[Enable special mode for profiling (default = no)])] [Enable special mode for profiling (default = no)])],
AC_MSG_RESULT([yes]), AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
...@@ -256,10 +287,7 @@ if test "$enable_model_fitting" != "no"; then ...@@ -256,10 +287,7 @@ if test "$enable_model_fitting" != "no"; then
if test "$enable_mkl" = "yes"; then if test "$enable_mkl" = "yes"; then
convlibs="${srcdir}/wcs/libwcs_c.a,${srcdir}/levmar/liblevmar.a" convlibs="${srcdir}/wcs/libwcs_c.a,${srcdir}/levmar/liblevmar.a"
ACX_MKL($with_mkl_dir,,$enable_best_link,$convlibs) ACX_MKL($with_mkl_dir,,$enable_best_link,$convlibs)
if test "$MKL_WARN" == ""; then if test "$MKL_WARN" != ""; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([$MKL_WARN]) AC_MSG_WARN([$MKL_WARN])
fi fi
AM_CFLAGS="$AM_CFLAGS $MKL_CFLAGS " AM_CFLAGS="$AM_CFLAGS $MKL_CFLAGS "
...@@ -305,11 +333,21 @@ if test "$enable_model_fitting" != "no"; then ...@@ -305,11 +333,21 @@ if test "$enable_model_fitting" != "no"; then
fi fi
fi fi
########################## handle the CFITSIO library ########################
if test "$enable_cfitsio" != "no"; then
ACX_CFITSIO($with_cfitsio_libdir, $with_cfitsio_incdir,
[LIBS="$CFITSIO_LIBS $LIBS"]
if test "$CFITSIO_WARN" != ""; then
AC_MSG_WARN([$CFITSIO_WARN])
fi,
AC_MSG_ERROR([$CFITSIO_ERROR Exiting.]))
fi
AM_CONDITIONAL(USE_MODEL, [test "$enable_model_fitting" != "no"]) AM_CONDITIONAL(USE_MODEL, [test "$enable_model_fitting" != "no"])
# Compile with profiling option # Compile with profiling option
if test "$enable_profiling" = "yes"; then if test "$enable_profiling" = "yes"; then
if test "$enable_icc" = "yes"; then if test "$enable_iccx" = "yes"; then
AM_CFLAGS="$AM_CFLAGS -pq" AM_CFLAGS="$AM_CFLAGS -pq"
else else
AM_CFLAGS="$AM_CFLAGS -pg" AM_CFLAGS="$AM_CFLAGS -pg"
...@@ -319,9 +357,9 @@ fi ...@@ -319,9 +357,9 @@ fi
# "Best" linking option # "Best" linking option
if test "$enable_best_link" = "yes"; then if test "$enable_best_link" = "yes"; then
if test "$enable_icc" = "yes"; then if test "$enable_iccx" = "yes"; then
AM_LDFLAGS="-static-intel -qopenmp-link static -shared-libgcc \ AM_LDFLAGS="-static-intel -qopenmp-link=static -shared-libgcc \
-static-libtool-libs -no-intel-extensions -avoid-version $AM_LDFLAGS" -static-libtool-libs -avoid-version $AM_LDFLAGS"
else else
AM_LDFLAGS="-shared-libgcc -static-libtool-libs -avoid-version $AM_LDFLAGS" AM_LDFLAGS="-shared-libgcc -static-libtool-libs -avoid-version $AM_LDFLAGS"
fi fi
......
...@@ -15,7 +15,7 @@ ifeq ($(USE_BEST),1) ...@@ -15,7 +15,7 @@ ifeq ($(USE_BEST),1)
dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \ --prefix=/usr --mandir=\$${prefix}/share/man \
--enable-icc --enable-mkl \ --enable-icx --enable-mkl \
--enable-auto-flags --enable-best-link \ --enable-auto-flags --enable-best-link \
--with-release=$(PACKAGE_RELEASE) --with-release=$(PACKAGE_RELEASE)
else else
......
sphinxcontrib-bibtex sphinx >= 5.0
sphinx_rtd_theme >= 1.1
sphinxcontrib-bibtex >= 2.4.0
...@@ -18,19 +18,26 @@ Background estimation ...@@ -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. 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`. 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:: .. 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:: .. 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. :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%. 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 ...@@ -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`). 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 Configuration and tuning
------------------------ ~~~~~~~~~~~~~~~~~~~~~~~~
.. note:: .. note::
All background configuration parameters also affect background-RMS maps. All background configuration parameters also affect background-RMS maps.
......
...@@ -269,7 +269,7 @@ Model-based star-galaxy separation: :param:`SPREAD_MODEL` ...@@ -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`. 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:`\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:: .. math::
...@@ -306,6 +306,7 @@ In order to maintain a certain level of purity or completeness across the whole ...@@ -306,6 +306,7 @@ In order to maintain a certain level of purity or completeness across the whole
.. math:: .. math::
:label: spreaderr_model :label: spreaderr_model
:nowrap:
\begin{eqnarray} \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 \\ {\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 ...@@ -27,6 +27,7 @@ These coordinates define two corners of a rectangle which encloses the detected
.. math:: .. math::
:label: xminymax :label: xminymax
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt XMIN} & = & \min_{i \in {\cal S}} x_i,\\ {\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 ...@@ -47,6 +48,7 @@ Barycenter coordinates generally define the position of the “center” of a so
.. math:: .. math::
:label: xy :label: xy
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt X} & = & \overline{x} = \frac{\displaystyle \sum_{i \in {\cal S}} {\tt X} & = & \overline{x} = \frac{\displaystyle \sum_{i \in {\cal S}}
...@@ -76,6 +78,7 @@ Second-order moments: :param:`X2`, :param:`Y2`, :param:`XY` ...@@ -76,6 +78,7 @@ Second-order moments: :param:`X2`, :param:`Y2`, :param:`XY`
.. math:: .. math::
:label: x2y2 :label: x2y2
:nowrap:
\begin{eqnarray} \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,\\ {\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}`. ...@@ -144,6 +147,7 @@ covariance :math:`\overline{xy}`.
.. math:: .. math::
:label: aimage :label: aimage
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt A}^2 & = & \overline{x^2}_{\tt THETA},\ \ \ {\rm and}\\ {\tt A}^2 & = & \overline{x^2}_{\tt THETA},\ \ \ {\rm and}\\
...@@ -154,6 +158,7 @@ covariance :math:`\overline{xy}`. ...@@ -154,6 +158,7 @@ covariance :math:`\overline{xy}`.
.. math:: .. math::
:label: aimage_2 :label: aimage_2
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt A}^2 & = & \frac{\overline{x^2}+\overline{y^2}}{2} {\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: ...@@ -175,6 +180,7 @@ These parameters [#elongation]_ are directly derived from :param:`A` and :param:
.. math:: .. math::
:label: elongation :label: elongation
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt ELONGATION} & = & \frac{\tt A}{\tt B}\ \ \ \ \ \mbox{and}\\ {\tt ELONGATION} & = & \frac{\tt A}{\tt B}\ \ \ \ \ \mbox{and}\\
...@@ -206,6 +212,7 @@ parameters can be derived from the 2nd order moments: ...@@ -206,6 +212,7 @@ parameters can be derived from the 2nd order moments:
.. math:: .. math::
:label: ellipse_2 :label: ellipse_2
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt CXX} & = & \frac{\cos^2 {\tt THETA}}{{\tt A}^2} + \frac{\sin^2 {\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 ...@@ -240,6 +247,7 @@ Furthermore, |SExtractor| does not currently take into account possible correlat
.. math:: .. math::
:label: errxy :label: errxy
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt ERRX2} & = {\rm var}(\overline{x}) = {\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 ...@@ -261,6 +269,7 @@ where :math:`{\sigma_B}_i` is the local background noise and :math:`g_i` the loc
.. math:: .. math::
:label: errabtheta :label: errabtheta
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt ERRA}^2 & = & \frac{{\rm var}(\overline{x})+{\rm var}(\overline{y})}{2} {\tt ERRA}^2 & = & \frac{{\rm var}(\overline{x})+{\rm var}(\overline{y})}{2}
...@@ -277,6 +286,7 @@ And the error ellipse parameters are: ...@@ -277,6 +286,7 @@ And the error ellipse parameters are:
.. math:: .. math::
:label: errellipse :label: errellipse
:nowrap:
\begin{eqnarray} \begin{eqnarray}
{\tt ERRCXX} & = & \frac{\cos^2 {\tt ERRTHETA}}{{\tt ERRA}^2} + {\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)
# -*- coding: utf-8 -*-
#
# SExtractor documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 27 15:11:21 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# 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 sphinx_rtd_theme
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# 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'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'SExtractor'
filename = 'sextractor'
copyright = u'2017, IAP/CNRS/UPMC'
author = u'E. Bertin'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.25.3'
# The full version, including alpha/beta/rc tags.
release = '2.25.3'
# 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:
#
today = 'Fri Mar 11 2022'
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'
# 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
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False
# 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 ----------------------------------------------
# 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.25.3'
# 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".
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
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is 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 ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
'preamble': '\usepackage{amssymb}',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, filename + '.tex', project + u' Documentation',
author, 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#
# latex_use_parts = False
# If true, show page references after internal links.
#
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#
latex_show_urls = 'footnote'
# Documents to append as an appendix to all manuals.
#
# latex_appendices = []
# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True
# If false, no module index is generated.
#
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, filename, project + u' Documentation',
author, 1)
]
# If true, show URL addresses after external links.
#
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, filename, project + u' Documentation',
author, project, 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#
# texinfo_appendices = []
# If false, no module index is generated.
#
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
# epub_basename = project
# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub
# output is usually not wise. This defaults to 'epub', a theme designed to save
# visual space.
#
# epub_theme = 'epub'
# The language of the text. It defaults to the language option
# or 'en' if the language is not set.
#
# epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
# epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A tuple containing the cover image and cover page html template filenames.
#
# epub_cover = ()
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
#
# epub_guide = ()
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#
# epub_pre_files = []
# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#
# epub_post_files = []
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# The depth of the table of contents in toc.ncx.
#
# epub_tocdepth = 3
# Allow duplicate toc entries.
#
# epub_tocdup = True
# Choose between 'default' and 'includehidden'.
#
# epub_tocscope = 'default'
# Fix unsupported image types using the Pillow.
#
# epub_fix_images = False
# Scale large images.
#
# epub_max_image_width = 0
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# epub_show_urls = 'inline'
# If false, no index is generated.
#
# epub_use_index = 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)
...@@ -16,32 +16,27 @@ ...@@ -16,32 +16,27 @@
# add these directories to sys.path here. If the directory is relative to the # 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. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
# import os import os, sys
# import sys sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme import sphinx_rtd_theme
import adsarxiv
# -- General configuration ------------------------------------------------ # -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
# 'sphinx.ext.intersphinx',
# 'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinxcontrib.bibtex', '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. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['../theme']
# The suffix(es) of source filenames. # The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string: # You can specify multiple suffix as a list of string:
...@@ -59,7 +54,7 @@ master_doc = 'index' ...@@ -59,7 +54,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'@PACKAGE_NAME@' project = u'@PACKAGE_NAME@'
filename = '@PACKAGE_TARNAME@' filename = '@PACKAGE_TARNAME@'
copyright = u'2017, IAP/CNRS/UPMC' copyright = u'2017-2023, CFHT/IAP/CNRS/SorbonneU'
author = u'E. Bertin' author = u'E. Bertin'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
...@@ -71,13 +66,6 @@ version = '@PACKAGE_VERSION@' ...@@ -71,13 +66,6 @@ version = '@PACKAGE_VERSION@'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '@PACKAGE_VERSION@' 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 # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:
# #
...@@ -90,21 +78,7 @@ today = '@DATE2@' ...@@ -90,21 +78,7 @@ today = '@DATE2@'
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path # This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['global.rst','keys.rst','roles.rst'] exclude_patterns = ['global.rst','keys.rst','macro.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
# If true, sectionauthor and moduleauthor directives will be shown in the # If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default. # output. They are ignored by default.
...@@ -114,53 +88,17 @@ exclude_patterns = ['global.rst','keys.rst','roles.rst'] ...@@ -114,53 +88,17 @@ exclude_patterns = ['global.rst','keys.rst','roles.rst']
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' 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 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 # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
# #
html_theme = 'sphinx_rtd_theme' 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, # 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, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
...@@ -168,49 +106,7 @@ html_static_path = ['../theme'] ...@@ -168,49 +106,7 @@ html_static_path = ['../theme']
# Trick for having ReadTheDocs read custom theme changes # Trick for having ReadTheDocs read custom theme changes
def setup(app): def setup(app):
app.add_stylesheet("css/custom.css") app.add_css_file("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
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
# #
...@@ -218,39 +114,11 @@ html_show_sphinx = False ...@@ -218,39 +114,11 @@ html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# #
# html_show_copyright = True html_show_copyright = True
html_logo = 'figures/cover.png'
html_favicon = '../theme/images/astromaticO.png'
# If true, an OpenSearch description file will be output, and all pages will # -- Options for LaTeX output ------------------------------------------------
# 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 ---------------------------------------------
latex_elements = { latex_elements = {
# The paper size ('letterpaper' or 'a4paper'). # The paper size ('letterpaper' or 'a4paper').
...@@ -263,11 +131,11 @@ latex_elements = { ...@@ -263,11 +131,11 @@ latex_elements = {
# Additional stuff for the LaTeX preamble. # Additional stuff for the LaTeX preamble.
# #
'preamble': '\usepackage{amssymb}', 'preamble': r'''
\usepackage{amssymb}
# Latex figure (float) alignment \newcommand{\DUrolecredits}{\footnotesize\color{lightgray}\newline}
# \usepackage{etoolbox}
# 'figure_align': 'htbp', \AtBeginEnvironment{figure}{\pretocmd{\hyperlink}{\protect}{}{}}'''
} }
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
...@@ -281,7 +149,7 @@ latex_documents = [ ...@@ -281,7 +149,7 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
# the title page. # the title page.
# #
# latex_logo = None latex_logo = 'figures/cover.pdf'
# For "manual" documents, if this is true, then toplevel headings are parts, # For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters. # not chapters.
...@@ -294,7 +162,7 @@ latex_documents = [ ...@@ -294,7 +162,7 @@ latex_documents = [
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
# #
latex_show_urls = 'footnote' # latex_show_urls = False
# Documents to append as an appendix to all manuals. # Documents to append as an appendix to all manuals.
# #
...@@ -311,7 +179,7 @@ latex_show_urls = 'footnote' ...@@ -311,7 +179,7 @@ latex_show_urls = 'footnote'
# latex_domain_indices = True # latex_domain_indices = True
# -- Options for manual page output --------------------------------------- # -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
...@@ -325,7 +193,7 @@ man_pages = [ ...@@ -325,7 +193,7 @@ man_pages = [
# man_show_urls = False # man_show_urls = False
# -- Options for Texinfo output ------------------------------------------- # -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples # Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author, # (source start file, target name, title, author,
...@@ -353,7 +221,7 @@ texinfo_documents = [ ...@@ -353,7 +221,7 @@ texinfo_documents = [
# texinfo_no_detailmenu = False # texinfo_no_detailmenu = False
# -- Options for Epub output ---------------------------------------------- # -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info. # Bibliographic Dublin Core info.
epub_title = project epub_title = project
...@@ -437,74 +305,13 @@ epub_exclude_files = ['search.html'] ...@@ -437,74 +305,13 @@ epub_exclude_files = ['search.html']
# #
# epub_use_index = True # 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. # -- Options for pybtex ------------------------------------------------------
intersphinx_mapping = {'https://docs.python.org/': None} bibtex_bibfiles = ['references.bib']
# -- 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)
...@@ -21,10 +21,3 @@ Contents ...@@ -21,10 +21,3 @@ Contents
Measurements Measurements
references references
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
.. |DAOPHOT| replace:: :program:`DAOPHOT` .. |DAOPHOT| replace:: :program:`DAOPHOT`
.. _DAOPHOT: http://ascl.net/phpBB3/viewtopic.php?t=23410 .. _DAOPHOT: http://ascl.net/phpBB3/viewtopic.php?t=23410
.. |DES| replace:: :abbr:`Dark Energy Survey`
.. _DES: https://darkenergysurvey.org
.. |.dmg| replace:: :file:`.dmg` .. |.dmg| replace:: :file:`.dmg`
.. _.dmg: https://en.wikipedia.org/wiki/Apple_Disk_Image .. _.dmg: https://en.wikipedia.org/wiki/Apple_Disk_Image
......
...@@ -141,6 +141,26 @@ archivePrefix = "arXiv", ...@@ -141,6 +141,26 @@ archivePrefix = "arXiv",
pages = {1016-1022}, pages = {1016-1022},
doi = {10.1175/1520-0450(1979)018<1016:LFIOAT>2.0.CO;2}, 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, @ARTICLE{2002AA_395_1061G,
author = {{Greisen}, E.~W. and {Calabretta}, M.~R.}, author = {{Greisen}, E.~W. and {Calabretta}, M.~R.},
title = "{Representations of world coordinates in FITS}", title = "{Representations of world coordinates in FITS}",
...@@ -283,6 +303,18 @@ archivePrefix = "arXiv", ...@@ -283,6 +303,18 @@ archivePrefix = "arXiv",
adsnote = {Provided by the SAO/NASA Astrophysics Data System} 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, @ARTICLE{1976ApJ_209L_1P,
author = {{Petrosian}, V.}, author = {{Petrosian}, V.},
title = "{Surface brightness and evolution of galaxies}", title = "{Surface brightness and evolution of galaxies}",
...@@ -340,13 +372,13 @@ author={{Saerens}, M. and {Latinne}, P. and {Decaestecker}, C.}, ...@@ -340,13 +372,13 @@ author={{Saerens}, M. and {Latinne}, P. and {Decaestecker}, C.},
journal={IEEE Transactions on Neural Networks}, journal={IEEE Transactions on Neural Networks},
title={Any reasonable cost function can be used for a posteriori probability approximation}, title={Any reasonable cost function can be used for a posteriori probability approximation},
year={2002}, year={2002},
month={Sep},
volume={13}, volume={13},
number={5}, number={5},
pages={1204-1210}, 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}, 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}, doi={10.1109/TNN.2002.1031952},
ISSN={1045-9227}, ISSN={1045-9227},
month={Sep}
} }
@ARTICLE{1987PASP_99_191S, @ARTICLE{1987PASP_99_191S,
...@@ -542,6 +574,15 @@ publisher = {Cordoba, Argentina: Observatorio Astronomico, 1968}, ...@@ -542,6 +574,15 @@ publisher = {Cordoba, Argentina: Observatorio Astronomico, 1968},
adsnote = {Provided by the SAO/NASA Astrophysics Data System} 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, @PHDTHESIS{1996PhDT_68B,
author = {{Bertin}, E.}, author = {{Bertin}, E.},
title = "{Photom\'etrie automatique de galaxies et contraintes sur leur \'evolution r\'ecente}", title = "{Photom\'etrie automatique de galaxies et contraintes sur leur \'evolution r\'ecente}",
......
dnl
dnl acx_cfitsio.m4
dnl
dnl Figure out if the CFITSIO library and header files are installed.
dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl
dnl This file part of: AstrOmatic software
dnl
dnl Copyright: (C) 2013 Emmanuel Bertin -- IAP/CNRS/UPMC
dnl
dnl License: GNU General Public License
dnl
dnl AstrOmatic software is free software: you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation, either version 3 of the
dnl License, or (at your option) any later version.
dnl AstrOmatic software is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl You should have received a copy of the GNU General Public License
dnl along with AstrOmatic software.
dnl If not, see <http://www.gnu.org/licenses/>.
dnl
dnl Last modified: 27/02/2013
dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl
dnl @synopsis ACX_CFITSIO([CFITSIO_DIR, CFITSIO_INCDIR,
dnl [ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
dnl This macro figures out if the CFITSIO libraries and header
dnl files are installed.
dnl You may wish to use these variables in your default LIBS and CFLAGS:
dnl
dnl LIBS="$CFITSIO_LIBS $LIBS"
dnl
dnl You may wish to use these variables in your default CFLAGS:
dnl
dnl CFLAGS="$CFLAGS $CFITSIO_CFLAGS"
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if CFITSIO
dnl is found (HAVE_CFITSIO are defined first), and ACTION-IF-NOT-FOUND
dnl is a list of commands to run it if it is not found.
AC_DEFUN([ACX_CFITSIO], [
AC_REQUIRE([AC_CANONICAL_HOST])
dnl --------------------
dnl Search include files
dnl --------------------
acx_cfitsio_ok=no
if test x$2 = x; then
AC_CHECK_HEADER(fitsio.h,[acx_cfitsio_ok=yes])
if test x$acx_cfitsio_ok = xyes; then
AC_DEFINE(CFITSIO_H, "fitsio.h", [CFITSIO header filename.])
else
AC_CHECK_HEADER(cfitsio/fitsio.h,[acx_cfitsio_ok=yes])
if test x$acx_cfitsio_ok = xyes; then
AC_DEFINE(CFITSIO_H, "cfitsio/fitsio.h", [CFITSIO header filename.])
else
CFITSIO_ERROR="CFITSIO include files not found at default location!"
fi
fi
else
AC_CHECK_HEADER($2/fitsio.h,[acx_cfitsio_ok=yes])
if test x$acx_cfitsio_ok = xyes; then
AC_DEFINE_UNQUOTED(CFITSIO_H, "$2/fitsio.h", [CFITSIO header filename.])
else
CFITSIO_ERROR="CFITSIO include files not found in $2!"
fi
fi
dnl --------------------
dnl Search library files
dnl --------------------
CFITSIO_LIBS=""
OLIBS="$LIBS"
LIBS=""
if test x$acx_cfitsio_ok = xyes; then
if test x$1 = x; then
AC_CHECK_LIB(cfitsio, ffopen, [acx_cfitsio_ok=yes], [acx_cfitsio_ok=no])
if test x$acx_cfitsio_ok = xyes; then
AC_DEFINE(HAVE_CFITSIO,1, [Define if you have the CFITSIO libraries and header files.])
CFITSIO_LIBS="-lcfitsio"
else
CFITSIO_ERROR="CFITSIO library files not found at usual locations!"
fi
else
dnl -------------------------
dnl Specific libdir specified
dnl -------------------------
AC_CHECK_LIB(cfitsio, ffopen, [acx_cfitsio_ok=yes], [acx_cfitsio_ok=no], [-L$1])
if test x$acx_cfitsio_ok = xyes; then
AC_DEFINE(HAVE_CFITSIO,1, [Define if you have the CFITSIO libraries and header files.])
CFITSIO_LIBS="-L$1 -lcfitsio"
else
CFITSIO_ERROR="CFITSIO library files not found in $1!"
fi
fi
fi
LIBS="$OLIBS"
if test x$acx_cfitsio_ok = xyes; then
AC_SUBST(CFITSIO_LIBS)
$3
else
AC_SUBST(CFITSIO_ERROR)
$4
fi
])dnl ACX_CFITSIO
...@@ -7,7 +7,7 @@ dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ...@@ -7,7 +7,7 @@ dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl dnl
dnl This file part of: AstrOmatic software dnl This file part of: AstrOmatic software
dnl dnl
dnl Copyright: (C) 2003-2016 IAP/CNRS/UPMC dnl Copyright: (C) 2003-2022 IAP/CNRS/SorbonneU
dnl dnl
dnl License: GNU General Public License dnl License: GNU General Public License
dnl dnl
...@@ -23,7 +23,7 @@ dnl You should have received a copy of the GNU General Public License ...@@ -23,7 +23,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with AstrOmatic software. dnl along with AstrOmatic software.
dnl If not, see <http://www.gnu.org/licenses/>. dnl If not, see <http://www.gnu.org/licenses/>.
dnl dnl
dnl Last modified: 16/03/2016 dnl Last modified: 15/09/2022
dnl dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl dnl
...@@ -73,11 +73,11 @@ dnl Set architecture flags ...@@ -73,11 +73,11 @@ dnl Set architecture flags
dnl ---------------------- dnl ----------------------
dnl check if INTEL compiler is present dnl check if INTEL compiler is present
icc -V 2>&1 | grep -i "Intel" > /dev/null 2>&1 && flagicc=yes $CC -V 2>&1 | grep -i "Intel" > /dev/null 2>&1 && flagicc=yes
dnl check if INTEL compiler uses x86_64 architecture dnl check if INTEL compiler uses x86_64 architecture
icc -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 && flag64=yes $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 && flag64=yes
dnl check if the platform is OSX dnl check if the platform is OSX
icc -dumpmachine 2>&1 | grep -i "darwin" > /dev/null 2>&1 && flagosx=yes $CC -dumpmachine 2>&1 | grep -i "darwin" > /dev/null 2>&1 && flagosx=yes
dnl ---------------------- dnl ----------------------
dnl Exit if INTEL compiler is not found dnl Exit if INTEL compiler is not found
......
...@@ -7,7 +7,7 @@ dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ...@@ -7,7 +7,7 @@ dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl dnl
dnl This file part of: AstrOmatic software dnl This file part of: AstrOmatic software
dnl dnl
dnl Copyright: (C) 2002-2013 Emmanuel Bertin -- IAP/CNRS/UPMC dnl Copyright: (C) 2002-2022 Emmanuel Bertin -- IAP/CNRS/SorbonneU
dnl (C) 2002 Ville Lauriki (original version) dnl (C) 2002 Ville Lauriki (original version)
dnl dnl
dnl Licenses: GPL (this version) dnl Licenses: GPL (this version)
...@@ -25,7 +25,7 @@ dnl You should have received a copy of the GNU General Public License ...@@ -25,7 +25,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with AstrOmatic software. dnl along with AstrOmatic software.
dnl If not, see <http://www.gnu.org/licenses/>. dnl If not, see <http://www.gnu.org/licenses/>.
dnl dnl
dnl Last modified: 13/03/2013 dnl Last modified: 07/09/2022
dnl dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl dnl
...@@ -60,14 +60,14 @@ EOF ...@@ -60,14 +60,14 @@ EOF
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 && if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 && $CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll" prog_cc_optim_cv_flags="-O3 -axSSSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I"
prog_ld_optim_cv_flags="" prog_ld_optim_cv_flags=""
dnl INTEL C 32bits compiler dnl INTEL C 32bits compiler
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 && elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 && $CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll" prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I"
prog_ld_optim_cv_flags="" prog_ld_optim_cv_flags=""
dnl GCC dnl GCC
......
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