Installing the software¶
Hardware requirements¶
Terminal¶
SourceXtractor++ runs in (ANSI) text-mode from a shell. A graphical environment is not necessary to operate the software.
Memory¶
Memory requirements depend mostly on the number of images to be analyzed. A rule of thumb is that SourceXtractor++ requires about 100MB of resident memory per input frame. Extra-memory is taken advantage of through caching of pixel data.
CPUs¶
SourceXtractor++’s measurement pipeline is multithreaded and can take advantage of multiple CPU cores. As of version 0.16, SourceXtractor++ scales reasonably well up to 30 cores.
Obtaining SourceXtractor++¶
From Fedora or EPEL repositories ¶
SourceXtractor++ is available in Fedora 30 and greater, and in EPEL 7 as well. On those platforms, you can use your package manager to install in the usual way:
# dnf install sourcextractor++
From Anaconda Cloud ¶
SourceXtractor++ is also available for Linux and MacOS via Anaconda cloud. You can install it as follows:
$ conda install -c conda-forge -c astrorama sourcextractor
Or you can, of course, add permanently the astrorama
channel to your
conda configuration:
$ conda config --add channels conda-forge
$ conda config --add channels astrorama
$ conda install sourcextractor
It is recommended to install SourceXtractor++ into its own environment to avoid dependency conflicts.
From Sources ¶
The source package may be downloaded from the official GitHub repository. Links to binary packages for a selection of operating systems are also available at the URL above.
SourceXtractor++ relies on the Elements and Alexandria packages, which may be downloaded from Astrorama repositories.
They are also available in Fedora and EPEL as elements
and elements-alexandria
.
It also requires the following packages for installation:
The following packages are optional:
GSL (model fitting engine)
LevMar (model fitting engine)
Ncurses (progress bar display)
ONNXRunTime (AI-based features)
All or most of these packages are available in the main Linux distributions.
You will also need the development version (-devel
or -dev
) of the packages if you compile SourceXtractor++ from the source, plus the following packages:
If you have installed Elements and Alexandria from your distribution repository (right now, only in Fedora), you can skip the following section.
# dnf install elements-devel elements-alexandria-devel
Elements is a C++ and CMake framework. It is capable of managing the dependencies
of projects based on CMake as long as it knows where to find them.
By convention, this location usually is ~/Work/Projects
, but you can choose
any other.
$ export CMAKE_PROJECT_PATH=~/Work/Projects
$ export CMAKE_PREFIX_PATH=$CMAKE_PROJECT_PATH/Elements/cmake
$ mkdir -p $CMAKE_PROJECT_PATH
Since Python 2 has been deprecated since the 1st of January 2020, it is recommended to tell Elements and other projects to use Python 3 instead.
You can also disable the build of documentation with -DUSE_SPHINX=OFF
.
$ export CMAKEFLAGS="-DPYTHON_EXPLICIT_VERSION=3 -DUSE_SPHINX=OFF"
You can always add for convenience these environment variables to your
.bashrc
, or the one corresponding to your shell.
Elements can handle multiple versions of a given project, or with just one.
For the later, it suffices to clone the project into $CMAKE_PROJECT_PATH
.
$ cd $CMAKE_PROJECT_PATH
$ git clone https://github.com/astrorama/Elements.git --branch 5.10
$ cd Elements
$ make install -j # -j uses multiple cores
Similarly for Alexandria:
$ cd $CMAKE_PROJECT_PATH
$ git clone https://github.com/astrorama/Alexandria.git --branch 2.15
$ cd Alexandria
$ make install -j
If you have compiled and installed Elements and Alexandria as described on the above section, make sure you are using the proper environment.
$ export CMAKE_PROJECT_PATH=~/Work/Projects
$ export CMAKE_PREFIX_PATH=$CMAKE_PROJECT_PATH/Elements/cmake
For system-wide installs, this step is not necessary.
Configure the project flags if you have not yet done it:
$ export CMAKEFLAGS="-DPYTHON_EXPLICIT_VERSION=3 -DUSE_SPHINX=OFF"
As a reminder, that tells SourceXtractor++ to compile with Python 3, and not to build the documentation. SourceXtractor++ can be built with Python 2, but this is strongly discouraged.
The sources can be obtained either from the releases as a compressed archive, or cloned with git
the usual way.
If you download an archived version, you need to uncompress it:
$ unzip SourceXtractorPlusPlus-<version>.zip
A new directory called SourceXtractorPlusPlus-<version>
should now appear
at the current location on your disk.
If you opt for cloning the repository, make sure you are pointing to the latest commit in the master
branch.
$ git pull
Either way, enter the directory you have just created, and build the software.
$ cd SourceXtractorPlusPlus
$ make -j4
After the binaries are now compiled and available, SourceXtractor++ can be run with:
$ ~/Work/Projects/SourceXtractorPlusPlus/build/run sextractor++ --help