Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

pysme-wrapper

Installation

1. Install Miniforge (recommended)

It is recommended to use Miniforge for managing your Python environment: https://conda-forge.org/download/

Alternatively, you can also use conda, miniconda or any other environment manager.

2. Create and activate the environment

Use the provided environment file. You can edit it to include more packages or change the environment name.

mamba create -f environment.yaml
mamba activate <environment_name>

If you choose not to use conda, ensure that all packages listed in environment.yaml are installed by other means, as they are required dependencies.

3. Install pip packages

pip install PyAstronomy pysme-astro

4. Install this package

From the root directory of this repository, run:

pip install -e .

This installs the package in editable mode, so any changes to the source code are immediately reflected without reinstalling.

5. Download the linelists and example data

The VALD linelists and the example FEROS spectra are large and are not tracked in this repository. They are attached to the data-v1 release. Download the archives and unzip them at the root of this repository:

unzip vald_linelists.zip   # required
unzip feros_spectra.zip    # only needed to run the tutorial notebooks

This gives:

vald_linelists/
├── linelist_solar_0.001_350-900nm   # required: default solar linelist
├── Gaia RVS/                        # optional: per-element and stellar linelists
└── HIRES/                           # optional: per-element and stellar linelists
feros_spectra/                       # spectra, fit segments and grids used by the notebooks

linelist_solar_0.001_350-900nm is required: it is loaded when pysme_wrapper is imported, which raises a FileNotFoundError without it. The Gaia RVS and HIRES folders are only needed if you use those linelists (e.g. with merge_stellar_linelists and merge_element_linelists).

To keep the linelists elsewhere (or if you did not install with pip install -e .), set the PYSME_WRAPPER_LINELISTS environment variable to the folder's path:

export PYSME_WRAPPER_LINELISTS=/path/to/vald_linelists

Tutorial

For the typical workflow used with pymse-wrapper, see the pysme_wrapper_tutorial.ipynb notebook.

PySME documentation

For PySME documentation, see https://pysme-astro.readthedocs.io/en/stable/. pysme-wrapper creates helper classes and functions to streamline workflow based on my experience with noisy FEROS spectra, so it is quite possible you will want to use "pure" pysme instead of the wrapper at some point.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages