{ "cells": [ { "cell_type": "markdown", "id": "9aacc247", "metadata": {}, "source": [ "# Demo of the PHOENIX Interactive Dashboard for Stellar Spectra\n", "\n", "In this tutorial we will see how the spectra of stars vary as a function of their intrinsic properties." ] }, { "cell_type": "code", "execution_count": null, "id": "9e54e2c6", "metadata": {}, "outputs": [], "source": [ "from gollum.phoenix import PHOENIXGrid\n", "from specutils import Spectrum1D\n", "import pandas as pd\n", "import astropy.units as u\n", "import numpy as np" ] }, { "cell_type": "markdown", "id": "bffcdfb9", "metadata": {}, "source": [ "### Fetch example IGRINS data" ] }, { "cell_type": "code", "execution_count": null, "id": "8c6f77b7", "metadata": {}, "outputs": [], "source": [ "from muler.igrins import IGRINSSpectrum" ] }, { "cell_type": "code", "execution_count": null, "id": "f4318987", "metadata": {}, "outputs": [], "source": [ "path = 'https://github.com/OttoStruve/muler_example_data/raw/main/IGRINS/01_IGRINS_test_data/'\n", "filename='SDCH_20201202_0059.spec_a0v.fits'\n", "full_path = path + filename" ] }, { "cell_type": "code", "execution_count": null, "id": "36555e10", "metadata": {}, "outputs": [], "source": [ "spec = IGRINSSpectrum(file=full_path, order=12).normalize().remove_nans().trim_edges()\n", "spec.plot(color=None, ylo=0.7, yhi=1.1);" ] }, { "cell_type": "markdown", "id": "5ed9e848", "metadata": {}, "source": [ "### Telling gollum where to find your local files\n", "\n", "The online installation guide shows [how to download and store the PHOENIX models](https://gollum-astro.readthedocs.io/en/latest/fetching_models.html). In order to run the code below, you will need to update the `my_path` variable to the correct path on your local machine. \n", "\n", "In this demo, the `PHOENIX/` folder is houses all of the voluminous models:" ] }, { "cell_type": "code", "execution_count": null, "id": "4bdf507a", "metadata": {}, "outputs": [], "source": [ "grid = PHOENIXGrid(teff_range=(2500, 7000), logg_range=(2, 5), metallicity_range=(0, 0.5), wl_lo= 16200, wl_hi= 16400, path=\"C:/Users/sujay/libaries/raw/PHOENIX/\")" ] }, { "cell_type": "code", "execution_count": null, "id": "6e029540", "metadata": {}, "outputs": [], "source": [ "grid.show_dashboard(data=spec)" ] } ], "metadata": { "kernelspec": { "display_name": "blase", "language": "python", "name": "blase" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" } }, "nbformat": 4, "nbformat_minor": 5 }