Recommendation System for Spectroscopic follow-up
This repository holds the pipeline of the RESSPECT project, built as part of the inter-collaboration activities developed by the Cosmostatistics Initiative (COIN) and the LSST Dark Energy Science Collaboration (DESC). It was forked from the original RESSPECT repo that can be found here.
This work grew from activities developed within the COIN Residence Program #4, using as a starting point their ActSNClass software.
The active learning and telescope resources pipeline is described in Kennamer et al, 2020. The pre-processed data set used to obtain the results shown in the paper is available through zenodo at de Souza et al., 2020.
We kindly ask you to include the full citation for the above mentioned work if you use this material in your research.
Full documentation can be found at readthedocs.
Dependencies
For main code:
- python >= 3.10.10
- astropy >= 5.2.1
- matplotlib >= 3.7.0
- numpy >= 1.24.2
- pandas >= 1.5.3
- progressbar2 >= 4.2.0
- scikit_learn >= 1.2.1
- scipy >= 1.10.0
- seaborn >= 0.12.2
- setuptools >= 65.5.0
- xgboost >= 1.7.3
- iminuit >= 1.20.0
- setuptools>=49.2.1
- xgboost>=1.4.0
For cosmology metric:
- cmdstanpy>=1.1.0
For documentation:
- sphinx>=2.1.2
Install
The current version runs in Python-3.7 or higher and it was not tested on Windows.
We recommend that you work within a virtual environment.
You will need to install the Python package virtualenv. In MacOS or Linux, do
>> python3 -m pip install --user virtualenv
Navigate to a env_directory where you will store the new virtual environment and create it
>> python3 -m venv RESSPECT
Make sure you deactivate any
condaenvironment you might have running before moving forward.
Once the environment is set up you can activate it,
>> source <env_directory>/bin/activate
You should see a (RESSPECT) flag in the extreme left of terminal command line.
Next, clone this repository in another chosen location:
(RESSPECT) >> git clone https://github.com/COINtoolbox/RESSPECT.git
Navigate to the repository folder and do
(RESSPECT) >> pip install -r requirements.txt
You can now install this package with:
(RESSPECT) >>> pip install -e .
You may choose to create your virtual environment within the folder of the repository. If you choose to do this, you must remember to exclude the virtual environment directory from version control using e.g.,
.gitignore.
Starting the docker environment
The docker file in this repository can be run as a standalone environment for testing or developing RESSPECT, or in connection with tom. You will need to start by installing Docker Desktop for your chosen platform before you start.
Note: These workflows have only been tested on macs; however the standalone docker image is built on Linux in in Github Actions CI.
Using standalone
To use the container standalone first go into the root of the source directory, and build the container with:
docker build .
You can run the container two ways. The first way will use the version of resspect from your local checkout, which is probably what you want for development. After the container is built run:
docker run -it --rm --mount type=bind,source=.,target=/resspect/resspect-src resspect
This will put you into a bash shell in the container with the venv for resspect already activated, and the current version of resspect in your source checkout installed.
If you wish to use the version of resspect packaged at build time, simply omit --mount type=bind,source=.,target=/resspect/resspect-src from the command above.
Using with tom docker-compose setup
First checkout tom and follow TOM's docker compose setup instructions. You will need to load ELAsTiCC2 data into your tom environment in order to work with RESSPECT.
When you have finished that setup, go into the top level source directory and run these two commands:
docker compose build
docker compose up -d
You will now have a docker container called resspect which you can run resspect from. The version of resspect in use will be that of your local git checkout. That same docker container will be on the network with your tom setup, so you can access
the tom docker container on port 8080.
You can enter the resspect docker container to run commands with
docker compose run resspect
From the resspect container you should be able to log into the tom server with:
(resspect-venv) root@cd647ac7eca5:/resspect# python3
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from resspect import tom_client as tc
>>> tc = tc.TomClient(url="http://tom:8080", username='admin', password='<your tom password>')
Metadata
Release files for resspect 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| resspect-0.2.tar.gz | 3.7 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| resspect-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 MB
Release files / resspect-0.2.tar.gz
| Download URL | resspect-0.2.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
044f2451e57b249c1a11b14035ef3a36ad1385a30600f5859e6b4be8222e1382
|
|
BLAKE2b-256 checksum How to use checksums |
9e5e9146336e5e8dc8f6e98268c454cafc8afb0ee4fd6290f56a26a749ce1f2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.
Transparency logRelease files / resspect-0.2-py3-none-any.whl
| Download URL | resspect-0.2-py3-none-any.whl |
|---|---|
| Size | 142.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cfcfdc23f60082a29f8cc7cde6652c550f51a9ec94c20a09368e6b1b22db37d
|
|
BLAKE2b-256 checksum How to use checksums |
ac993dc49b7380f3936580e5d5f39a44d0dba400a1d3812b693d35d351374a93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.
Transparency logSecurity for resspect 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for resspect-0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.