Skip to content

Inference of Stellar Population Parameters in PyTorch

Notifications You must be signed in to change notification settings

MaximeRobeyns/SPItorch

Repository files navigation

SPItorch

Stellar Population Inference in PyTorch

SPItorch (read 'spy-torch') is a library for estimating the parameters of galaxies and other stellar objects.

Installation

The installation guide contains detailed information on how to install the project, but for users looking to get started quickly, the following steps should be sufficient.

To install, run (ideally in a virtual environment)

git clone https://github.com/MaximeRobeyns/spitorch
cd SPItorch
make install

Then make sure that you export the following environment variable:

export SPS_HOME=`pwd`/deps/fsps

It is a good idea to either put this in your shell configuration or use something like direnv to do this automatically for you.

Tutorials

If you want to run the tutorial notebooks, you will need the tutorial datasets. These are hosted on GitHub using Git Large Object Storage (LFS). To download it, you will need to install git lfs. You can find the latest release on the release page. Here is an example installation, using Linux:

cd /tmp
curl -LO https://github.com/git-lfs/git-lfs/releases/download/v3.1.4/git-lfs-linux-amd64-v3.1.4.tar.gz
tar -xzf git-lfs-linux-amd64-v3.1.4.tar.gz
sudo ./install.sh
git lfs install
git lfs fetch --all

Note that we require Python 3.10 or later. If you do not have this version, then using a suitably configured conda environment is highly recommended. We make no assumptions about your virtual environment or shell configuration, however before calling any of the targets in the Makefile, please ensure that the python executable in your PATH points to the executable/version you want to use.

To run the notebooks, you can first install the kernel:

make kernel  # only need to run this once

Then you can open the notebooks in Jupyter Lab with:

make lab

For more usage information, please see the documentation or the tutorial notebooks.

About

Inference of Stellar Population Parameters in PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors