https://github.com/lsst-dm/gauss2d
A package for defining and evaluating 2D Gaussian mixtures and images thereof.
https://github.com/lsst-dm/gauss2d
Last synced: 18 days ago
JSON representation
A package for defining and evaluating 2D Gaussian mixtures and images thereof.
- Host: GitHub
- URL: https://github.com/lsst-dm/gauss2d
- Owner: lsst-dm
- License: gpl-3.0
- Created: 2021-02-24T20:57:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T03:55:44.000Z (10 months ago)
- Last Synced: 2024-07-31T06:11:54.800Z (10 months ago)
- Language: C++
- Size: 436 KB
- Stars: 1
- Watchers: 65
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Gauss2D
#######*gauss2d* is a package for defining and evaluating 2D Gaussian mixtures and
images thereof. It is being developed primarily for use in astronomy -
specifically, by
`Vera C. Rubin Observatory Data Management `_
for the `Legacy Survey of Space and Time `_,
and the
`MultiProFit `_ source modelling
package - but it can be used for any kind of image or domain.*gauss2d* is provided in two parts; a C++ shared library (libgauss2d) and
optional Python bindings. The Python bindings include a sub-package for
the convenience of developers who wish to generate bindings for their own
templated Image class (e.g. based on something other than numpy arrays).Building the Package
####################*gauss2d* is built with `Meson `_. It can
be built as a standalone package or as an eups-managed Science Pipelines
package.EUPS build
##########To build with `eups `_ for use
with the Rubin/LSST `Science Pipelines `_,
call:.. code-block:: sh
:name: buildsetup -jr .
eupspkg -e -v 1 config
eupspkg -e -v 1 buildIf testing a ticket with Jenkins, see full instructions with more steps in the
`developer guide `_.Doc build
#########Sphinx package documentation is built by meson using
`documenteer `_, if available.
Unfortunately, C++ doctrings are not passed through to pybind11 objects, so
the Doxygen docs are generally more useful.C++ Doxygen docs are built with scons using
`sconsUtils `_, if available, either by
calling eupspkg install or manually running scons.
sconsUtils' ``tickets/DM-44144`` branch can be pip-installed outside of the
Science Pipelines (the next section).Standalone builds
#################A full example setup script is provided in ``setup-conda-release.sh``.
This defaults to using ``$CONDA_PREFIX``, but can be configured to output
elsewhere (e.g. ``~/.local``) like so:``CONDA_PREFIX=~ sh setup-conda.sh``
Once the build command is run once to create the build directories, subsequent
rebuilds can use the provided ``build.sh`` script.Note that the installation path for the Python bindings' module may not already
be in Python's sys.path, leading to import errors. This can be solved by
creating a .pth file. For example, in a conda environment with Python 3.12:``echo $CONDA_PREFIX/.local/lib/python3.12/site-packages > $CONDA_PREFIX/lib/python3.12/site-packages/conda.pth``
To manually create a build directory, call:
``meson builddir/``
Standalone builds require `pkg-config `_
to manage package configuration metadata.
If not using the provided `setup-conda.sh`, you will likely want to configure
meson to install in a local directory. For example, with conda:``PKG_CONFIG_PATH=$CONDA_PREFIX/.local/lib64/pkgconfig meson
--prefix=$CONDA_PREFIX/.local builddir/``Note: the default meson build directory is ``builddir/`` (build-release is
used in ``setup-conda.sh``), to disambiguate with the command ``meson build``.
However, many IDEs expect a build directory in ``build/``, as is typical with
``cmake``. It may be convenient to create a symbolic link between them, e.g. by
``ln -s build-release build``. Alternatively, some IDEs may support opening the
built ``compile_commands.json``, which you may also want to symlink to the
root directory.