Skip to content

Commit

Permalink
Started drafting getting_started docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcubillos committed Jul 30, 2024
1 parent 1d695ee commit d85c880
Show file tree
Hide file tree
Showing 17 changed files with 139 additions and 30 deletions.
60 changes: 31 additions & 29 deletions docs/get_started.qmd
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
---
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 Select instrument and mode

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

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

### Detector setup
---

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).
{{< video images/select_instrument.webm width='800'>}}

### Stellar atlases:
---

Then, you need to download these three reference stellar and calibration files, for example with these commands:
## 3 Set transit/eclipse model

```{.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
```
---

Unpack these files and set the environment variable: `$PYSYN_CDBS` pointing to
the trds directory.
{{< video images/select_transit_depth.webm width='800'>}}

---

### 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/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
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.

2 changes: 1 addition & 1 deletion gen_tso/gen_tso_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ def target_label():
name = input.target.get()
target = catalog.get_target(name, is_transit=None, is_confirmed=None)
if target is None:
return ui.span('Known target?')
return ui.span('Science target')

if len(target.aliases) > 0:
aliases = ', '.join(target.aliases)
Expand Down

0 comments on commit d85c880

Please sign in to comment.