Quickstart#

This guide will take you quickly to your first processing. We assume all the commands below are run in a new empty folder.

These instructions will install the latest RASSINE release. To work with the latest development version, follow the instructions here.

Python version and fresh virtual environment#

Before starting, verify your Python version is at least 3.8. If not, you may want to install a different Python interpreter using Conda or pyenv.

python --version

We now create a fresh virtual environment. This avoids the RASSINE installation changing packages on your main Python installation when it brings its required dependencies.

If you are using vanilla Python, type the following commands:

python -m venv .venv # create a fresh virtual environment, run it only once
source .venv/bin/activate # activate the virtual environment, run it every time you restart your shell/computer

If you are using Conda, use something like:

conda create --name rassinetest python=3.8
conda activate rassinetest

Install RASSINE, helper scripts and configuration files#

Simply use pip.

pip install rassine

pip installs the packages needed by RASSINE, the rassine Python package, and the command-line tools enumerated here.

In addition, you will need to download a few scripts:

  • the run_rassine.sh script that links the different steps of the pipeline together,

  • the GNU Parallel Perl script if GNU Parallel is not installed on your computer.

We will download those files in our folder, and set their executable flag. As an alternative, you could put those two scripts somewhere in your path.

You can skip the first two lines below if GNU Parallel is already installed on your computer.

curl -L -O https://raw.githubusercontent.com/pegasilab/rassine/master/parallel
chmod +x parallel
curl -L -O https://raw.githubusercontent.com/pegasilab/rassine/master/run_rassine.sh
chmod +x run_rassine.sh

We will also download the configuration files for the HARPN and HARPS03 instruments.

curl -L -O https://raw.githubusercontent.com/pegasilab/rassine/master/harpn.ini
curl -L -O https://raw.githubusercontent.com/pegasilab/rassine/master/harps03.ini

Download and unzip HD110315 observations#

This quickstart guide will work with the HD110315 data.

curl -L -o HD110315-master.zip https://github.com/pegasilab/HD110315/archive/refs/heads/master.zip
unzip HD110315-master.zip

We now run the pipeline, which takes a few minutes.

./run_rassine.sh -c harpn.ini HD110315-master/data/s1d/HARPN

Check the results in the HD110315-master/data/s1d/HARPN/STACKED directory.

How to customize the above for a different star#

To run the pipeline for a different star, you have to:

  1. Provide the relevant raw data. In the path above, the STARNAME/data/s1d/INSTRUMENTNAME prefix is a convention. RASSINE does not require you to use that convention. However, in the folder, you have to provide two sets of data. First, scalar information about the observation in DACE_TABLE/Dace_extracted_table.csv. The required columns are explained here. In the RAW/ subdirectory, you have to provide the fits files. Follow the INSTRUMENT.DATE_s1d_A.fits convention as in the examples we provide.

  2. Provide the correct configuration file. In the current release, we provide the HARPN and HARPS03 configuration files.

For the HD23249 star, the steps look like:

curl -L -o HD23249-master.zip https://github.com/pegasilab/HD23249/archive/refs/heads/master.zip
unzip HD23249-master.zip
./run_rassine.sh -c harps03.ini HD23249-master/data/s1d/HARPS03

The run_rassine.sh parameters#

$ ../../run_rassine.sh -h
Runs the RASSINE pipeline using standardized folder/file names

The pipeline will be run according to https://pegasilab.github.io/rassine/pipeline.html
with all the paths in this data graph relative to the provided RASSINE_ROOT
parameter. The RASSINE_ROOT can be a relative path, in which case it will be resolved
using the current working directory.

Note that the parallelization parameters (number of threads, size of chunks, nice level)
are set according to the provided configuration file.

The parameters [STEP1 STEP2 ...] must be taken from the list:
  import reinterpolate stacking rassine matching_anchors matching_diff

The order can be arbitrary, the pipeline always runs in the set order.

usage: ../../run_rassine.sh [-h] [-l {ERROR|WARNING|INFO|DEBUG}] [-c CONFIG_FILE] [RASSINE_ROOT] [STEP1 STEP2 ...]
  options:
    -h               Display usage information
    -l LOGGING_LEVEL Set the logging level (optional, default: WARNING)
    -c CONFIG_FILE   Sets the configuration (required)
                     In doubt, use harpn.ini or harps03.ini from
                     https://github.com/pegasilab/rassine

Examples:

  ./run_rassine.sh -c harpn.ini HD110315/data/s1d/HARPN
    runs the whole pipeline for the data in the given folder using the harpn.ini config file

  ./run_rassine.sh -c harpn.ini HD110315/data/s1d/HARPN import reinterpolate stacking
    runs the first three steps, which reinterpolates and stacks the spectra