Skip to content

Repository for the STAR-MELT emission line analysis Jupyter notebook and Python package

License

Notifications You must be signed in to change notification settings

justyncw/STAR_MELT

Repository files navigation

STAR MELT

Repository for the STAR-MELT emission line analysis Jupyter notebook and Python package.
See the one-minute STAR-MELT overview video here.
See the STAR-MELT paper (Campbell-White+,MNRAS,2021) here.


Simple example notebook

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


Binder Notebook

To launch and try the STAR MELT tutorial notebook on binder, click the badge below.

Binder

This will open the notebook in an online Jupyter 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.


Release Notes

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. Funded by STFC grant: ST/S000399/1

Example 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
    Manara, C. F., et al. (2021), A&A, arXiv:2103.12446.

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].

Download

To use the STAR-MELT Jupyter notebook, download or clone the repository into a local directory and start Jupyter notebook from that directory:

cd STAR_MELT-main
jupyter notebook 

Then open the STAR_MELT_example_notebook.ipynb notebook.

Package requirements are given within the example notebook and in requirements.txt.
The example notebook contains a tutorial for the package functions using the example data.


Instrument Compatibility

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

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.


QGRID install and enable

The STAR-MELT notebook uses the QGRID package for filtering dataframes

Update: now using qgridnext as replacement

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()

About

Repository for the STAR-MELT emission line analysis Jupyter notebook and Python package

Resources

License

Stars

Watchers

Forks

Packages

No packages published