STAR-MELT is a Python package and Jupyter notebook toolkit for emission line analysis of young stellar objects (YSOs) and other stars. It provides tools for reading, visualising, and fitting stellar spectra, including automated and interactive routines for emission line identification, continuum/photosphere subtraction, and multi-component Gaussian fitting.
See the one-minute STAR-MELT overview video here.
See the STAR-MELT paper (Campbell-White+,MNRAS,2021) here.
To use the STAR-MELT package and Jupyter notebook, install directly from GitHub:
pip install git+https://github.com/justyncw/STAR_MELT.git
Or download or clone the repository into a local directory
cd STAR_MELT-main
pip install .
Then start Jupyter notebook / lab from that directory:
jupyter notebook
jupyter lab
Then open the STAR_MELT_example_notebook.ipynb or one of the other notebooks from the notebooks directory.
The example notebook contains a tutorial for the package functions using the example data.
Further example scripts are included, which feature routines for automatically carrying out simple measurements and analysis on multiple spectra.
To launch and try the STAR MELT tutorial notebook on Binder, click the badge below.
Or open the example notebook directly in Google Colab:
This will open the notebook in an online Jupyter or Colab instance.
Once in the notebook, click on a code cell and hit shift+enter to run it and advance to the next cell. Selections can be made with the ipywidgets and qgrids.
Simple STAR-MELT example notebook
This notebook shows you how to read in spectra from the compatabile .FITS files, plot the spectra, select an emission line to plot, and fit the emission line with (multiple) Gaussian components
- Justyn Campbell-White (ESO, University of Dundee)
- Aurora Sicilia-Aguilar (University of Dundee)
- Carlo F. Manara (ESO)
- Antonio Frasca (INAF Catania)
- Kyara Soto Villarreal (Smith College)
This is the development version of the STAR-MELT package. Please cite (“The STAR-MELT PYTHON package for emission-line analysis of YSOs” Campbell-White, Sicilia-Aguilar, Manara et al. MNRAS, 507, 3331, 2021) if you use STAR-MELT for your analysis.
Originally funded by STFC grant: ST/S000399/1Example data and standard star FITS files are from the ESO Science Archive.
- EX Lupi: ESO Programme IDs 099.A-9010, 082.C-0390, 085.C-0764
- GQ Lupi: ESO Programme IDs 075.C-0710, 085.A-9027
- CVSO109: ESO Programme IDs 106.20Z8.009, 106.20Z8.002, ODYSSEUS & PENELLOPE Zenodo
Emission line parameters are from the NIST database.
- Kramida, A., Ralchenko, Yu., Reader, J. and NIST ASD Team (2020). NIST Atomic Spectra Database (version 5.8), [Online]. Available: https://physics.nist.gov/asd [Tue Jun 22 2021].
STAR-MELT will read the spectral data directly from the FITS files for the following instruments:
- ESO FEROS
- ESO HARPS
- ESO XSHOOTER
- ESO UVES
- ESO ESPRESSO
- CFHT ESPaDOnS
- HST COS
- HST STIS
- XMM-Newton RGS
- CAFOS
- MIKE
Reference emission lines and radial velocity standard stars are provided for the ground based data.
If your FITS files have a similar structure to these, they may also work. Further full instrument compatibility is ongoing.
Alternatively, spectral data from any source can be provided as a txt/csv file of wave vs flux.
Full package compatibility with HST and XMM spectra is still under development.
The STAR-MELT notebook uses the QGRID next package for filtering dataframes
Installing with pip::
pip install qgridnext
jupyter nbextension enable --py --sys-prefix qgridnext
# only required if you have not enabled the ipywidgets nbextension yet
jupyter nbextension enable --py --sys-prefix widgetsnbextension
Installing with conda::
# only required if you have not added conda-forge to your channels yet
conda config --add channels conda-forge
conda install qgridnext
If using with Jupyter lab and you have any issues with the build, try:
#mirror maintained for lab
jupyter labextension install @j123npm/qgrid2@1.1.4
Usage:
#control/cmd/shift click to make selections
new_dataframe=qgrid_widget1.get_selected_df()#use qgrid column filters
new_dataframe=qgrid_widget1.get_changed_df()