Skip to content

Commit

Permalink
Merge pull request #20 from pcubillos/pandeia4
Browse files Browse the repository at this point in the history
Pandeia 4!
  • Loading branch information
pcubillos authored Aug 2, 2024
2 parents 1d695ee + d85fc3a commit 0fa577e
Show file tree
Hide file tree
Showing 40 changed files with 530 additions and 163 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ✨ Gen TSO ✨
### A general ETC interface for time-series observations with JWST

(Getting there...)
(Nearly at official release...)

<!--
[![Tests](https://github.com/pcubillos/gen_tso/actions/workflows/python-package.yml/badge.svg?branch=master)](https://github.com/pcubillos/gen_tso/actions/workflows/python-package.yml)
Expand All @@ -14,11 +14,9 @@

### Install as:

Not yet on PyPI or Conda, but for the moment you can get the code from Github:
Available for Python 3.9+ from PyPI:
```
git clone https://github.com/pcubillos/gen_tso/
cd gen_tso
pip install .
pip install gen_tso
```

Then setup the pandeia reference files following these instructions: [https://pcubillos.github.io/gen_tso/install.html](https://pcubillos.github.io/gen_tso/install.html#pandeia-engine-installation)
Expand All @@ -40,3 +38,4 @@ tso

Comming soon ...


69 changes: 40 additions & 29 deletions docs/get_started.qmd
Original file line number Diff line number Diff line change
@@ -1,48 +1,59 @@
---
title: Get started
title: Getting started
page-navigation: true
---

## Walk through
With `Gen TSO` you can produce JWST simulated spectra in as few as four simple steps.

You can install `Gen TSO` from [PyPI](https://pypi.org/project/gen_tso/) with the following command:
## 1 Select target

```bash
pip install gen_tso
```
A drop down menu lets you search/type for confirmed planets and TESS candidates
(data provided by the NASA Exoplanet Archive). Once a target is selected:

### Instrument and mode selection
- [Editable fileds](select_target.qmd) are automatically filled with the system properties
- A link provides the target's name aliases full system properties
- A link leads you to the NASA Exoplanet Archive
- A link displays the exisiting JWST programs on the host star

To use `pandeia` you would need to download some files as per their [documentation](https://outerspace.stsci.edu/display/PEN/Pandeia+Engine+Installation).
---

{{< video images/select_target.webm width='800'>}}

---

## 2 Set instrument and mode

The top menu lets you select the JWST instrument and mode:

### Target selection
- All TSO spectroscopic and acquisition modes are available
- The detector setup panel gets automatically updated for the current instrument
- The right interactive viewer shows the available filter throughputs of the instrument

First you need to download the pandeia reference data (version 3.0) from
this folder: [https://stsci.app.box.com/v/pandeia-refdata-v3p0-jwst](https://stsci.app.box.com/v/pandeia-refdata-v3p0-jwst)
---

{{< video images/select_instrument.webm width='800'>}}

---

### Detector setup
## 3 Set transit/eclipse model

Unpack the file and set the `$pandeia_refdata` environment variable pointing
to the top folder of the data (the directory containing the VERSION_PSF file).
The transit or eclipse depth spectrum encodes the core of a science case,
so this is the one bit of information that a user has to provide.
In the `Gen TSO` application users can:

### Stellar atlases:
- Search and upload specific transit/eclipse depth spectra
- Pre-load spectra when launching the application
- Use blackbody or flat-transmission spectra for a quick S/N assessment
- Interactively view and compare spectra in the viewer panel

Then, you need to download these three reference stellar and calibration files, for example with these commands:
---

```{.bash filename=run.sh}
wget https://archive.stsci.edu/hlsps/reference-atlases/hlsp_reference-atlases_hst_multi_kurucz-1993-atlas_multi_v2_synphot4.tar
wget https://archive.stsci.edu/hlsps/reference-atlases/hlsp_reference-atlases_hst_multi_pheonix-models_multi_v3_synphot5.tar
wget https://archive.stsci.edu/hlsps/reference-atlases/hlsp_reference-atlases_hst_multi_everything_multi_v15_sed.tar
```
{{< video images/select_transit_depth.webm width='800'>}}

Unpack these files and set the environment variable: `$PYSYN_CDBS` pointing to
the trds directory.
---

### Vega reference SED:

Lastly, you need to download the Vega reference spectrum:
## 4 Run Pandeia

```bash
wget https://ssb.stsci.edu/trds/calspec/alpha_lyr_stis_010.fits
```
TBD

and place the file in your `$PYSYN_CDBS` trds/calspec/ folder.
Binary file added docs/images/select_instrument.webm
Binary file not shown.
Binary file added docs/images/select_target.webm
Binary file not shown.
Binary file added docs/images/select_transit_depth.webm
Binary file not shown.
Binary file added docs/images/status_display.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/status_gear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_aliases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_candidate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_magnitude.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_programs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_sed_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_sed_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_sed_viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_system_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/target_upload_sed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Gen TSO Documentation"
author: "Patricio Cubillos"
date: today
output: html_document
page-navigation: true
---

---
Expand Down
37 changes: 33 additions & 4 deletions docs/install.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,27 @@ To use `pandeia` you need to download some files as per their [documentation](ht

### 2.1 Reference data

If you don't have it yet, download the latest pandeia reference data,
unzip it, and place it in the folder pointed by `$pandeia_refdata`.
Here's the current latest version:
[https://stsci.app.box.com/v/pandeia-refdata-v4p0-jwst](https://stsci.app.box.com/v/pandeia-refdata-v4p0-jwst)

If this is your first time using pandeia, you likely need to setup a
`$pandeia_refdata` environment variable (e.g., in your `~/.bashrc` file).
`$pandeia_refdata` environment variable (e.g., in your `~/.bashrc`,
`~/.bash_profile`, or whichever bash file your machine uses).

Then you will need to start a new prompt terminal or source your bash
file, e.g.:
```bash
source ~/.bashrc
```

Then, download the pandeia reference data, unzip it, and place
it in the folder pointed by `$pandeia_refdata`. Here's the current latest version: [https://stsci.app.box.com/v/pandeia-refdata-v3p2-jwst](https://stsci.app.box.com/v/pandeia-refdata-v3p2-jwst)

You should end up with something like this:

```bash
echo $pandeia_refdata
/home/USERNAME/data/pandeia_data-3.2-jwst
/home/USERNAME/data/pandeia_data-4.0-jwst
```

### 2.2 Atlases data
Expand Down Expand Up @@ -71,6 +81,7 @@ wget https://ssb.stsci.edu/trds/calspec/alpha_lyr_stis_010.fits
If everything went right, then you should see something similar to this:

```bash
# (remember to source your bash file or start a new prompt terminal)
echo $PYSYN_CDBS
/home/USERNAME/data/pysynphot/trds

Expand All @@ -92,3 +103,21 @@ current date, you can run this prompt command:
```bash
TSO --update_exo
```

<br>

## Live status check

While you are running the `Gen TSO` application, click on this gear icon
at the top right of the screen:

![](images/status_gear.png){width=375px}

This will pop up a more detailed panel indicating whether any database needs
to be updated (and if needed, it will give you the instructions to do so):

![](images/status_display.png){width=600px}




106 changes: 106 additions & 0 deletions docs/select_target.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: Setting target properties
page-navigation: true
---

## Select target

::: {.column-margin}
![Target selection panel](images/target_panel.png){width=250px}
:::

The **Target** panel lets the user select the science target from a
dropdown menu of known target (from the NASA Exoplanet Archive). An
auto-complete feature facilitates searching for specific targets.

The gear icon lets users filter what kind of target to search:

![](images/target_filter.png){width=400px}


By selecting a target, the fields with the physical properties needed
to simulate an observation will be automatically updated. The values
in these fields can be edited if desired. The various information
links help to make an informed decision (see below).

---

### Info-links

For any given target, info-links on top of the name will provide
additional information about the target.

The first link (blue) shows any relevant name alias for the target:

![](images/target_aliases.png){width=250px fig-align="left"}

When clicked, `Gen TSO` will display the system parameters extracted
from the NASA Archive.
The second link (black) will open the NASA Archive page for the current
target.

![](images/target_system_parameters.png){width=450px}


The third link indicates whether the *host* has JWST observing
programs (gold color) or not (gray). For targets with JWST
programs one can click on the link to display a summary of the
programs (data from the
[Trexolists](https://www.stsci.edu/~nnikolov/TrExoLiSTS/JWST/trexolists.html)
website). Color coding indicates whether the program was carried out,
is in proprietary period, or is still to be observed.

![](images/target_programs.png){width=600px}


Lastly, unconfirmed candidate targets have an additional icon
highlighting that:

![](images/target_candidate.png){width=250px fig-align="left"}


## Stellar properties

The main stellar values to set for a simulation are the magnitude and
stellar energy distribution (SED).


::: {.column-margin}
![Target selection panel](images/target_panel.png){width=250px}
:::

`Gen TSO` provides the Ks magnitude value for the targets. Users can
choose among the J, H, Ks, Gaia, and V bands; although these values
rarely need to be edited since these magnitudes are well established:

![](images/target_magnitude.png){width=250px fig-align="left"}

The stellar effective temperature and log(g) values mainly inform the
user on the optimal SED to choose. `Gen TSO` provides a set of
PHOENIX, Kurucz, and Blackbody models.

::: {layout-ncol=2}

![SED types](images/target_sed_type.png){width=250px}

![Kurucz SED models](images/target_sed_model.png){width=250px}

:::

By clicking the bookmark (star) icon, users can display and compare
the SEDs on the right viewer panel. The instrumental observing band
will be highlighted in light-blue indicating the wavelength range of
the SED(s) being probed.

![](images/target_sed_viewer.png){width=550px fig-align="left"}


Users can also provide their own custom SED models by clicking the
*upload* icon, which will pop up the following panel:

![](images/target_upload_sed.png){width=350px fig-align="left"}

## Observation configuration

Users can choose between transit and eclipse observation modes.

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0fa577e

Please sign in to comment.