Skip to content

Commit

Permalink
Restructure WFC3 notebooks (#264)
Browse files Browse the repository at this point in the history
* Update WFC3 README with appropriate hyperlinks and installation

* Remove READMEs from each notebook

* Keep WFC3/dash notebook README until published

* Remove WFC3 legacy environments

* Add WFC3 subsection READMEs

* Add WFC3 subsections to TOC
  • Loading branch information
FDauphin authored Apr 5, 2024
1 parent 4448567 commit e8ccdee
Show file tree
Hide file tree
Showing 23 changed files with 215 additions and 776 deletions.
31 changes: 18 additions & 13 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,25 @@ parts:
- file: notebooks/STIS/extraction/1D_Extraction.ipynb
- caption: WFC3
chapters:
- file: notebooks/WFC3/README.md
- file: notebooks/WFC3/calwf3_recalibration/calwf3_recal_tvb.ipynb
- file: notebooks/WFC3/calwf3_v1.0_cte/calwf3_with_v1.0_PCTE.ipynb
# - file: notebooks/WFC3/dash/dash.ipynb
- file: notebooks/WFC3/exception_report/wfc3_exception_report.ipynb
- file: notebooks/WFC3/README.md
- file: notebooks/WFC3/general_tools.md
sections:
- file: notebooks/WFC3/image_displayer_analyzer/wfc3_image_displayer_analyzer.ipynb
- file: notebooks/WFC3/exception_report/wfc3_exception_report.ipynb
- file: notebooks/WFC3/calwf3_v1.0_cte/calwf3_with_v1.0_PCTE.ipynb
- file: notebooks/WFC3/persistence/wfc3_ir_persistence.ipynb
- file: notebooks/WFC3/ir_tvb.md
sections:
- file: notebooks/WFC3/ir_ima_visualization/IR_IMA_Visualization_with_an_Example_of_Time_Variable_Background.ipynb
- file: notebooks/WFC3/calwf3_recalibration/calwf3_recal_tvb.ipynb
- file: notebooks/WFC3/tvb_flattenramp/TVB_flattenramp_notebook.ipynb
- file: notebooks/WFC3/ir_scattered_light_calwf3_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_Using_calwf3_to_Mask_Bad_Reads.ipynb
- file: notebooks/WFC3/ir_scattered_light_manual_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_by_Manually_Subtracting_Bad_Reads.ipynb
- file: notebooks/WFC3/photometry.md
sections:
- file: notebooks/WFC3/filter_transformations/filter_transformations.ipynb
- file: notebooks/WFC3/flux_conversion_tool/flux_conversion_tool.ipynb
- file: notebooks/WFC3/image_displayer_analyzer/wfc3_image_displayer_analyzer.ipynb
- file: notebooks/WFC3/ir_ima_visualization/IR_IMA_Visualization_with_an_Example_of_Time_Variable_Background.ipynb
- file: notebooks/WFC3/ir_scattered_light_calwf3_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_Using_calwf3_to_Mask_Bad_Reads.ipynb
- file: notebooks/WFC3/ir_scattered_light_manual_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_by_Manually_Subtracting_Bad_Reads.ipynb
- file: notebooks/WFC3/persistence/wfc3_ir_persistence.ipynb
- file: notebooks/WFC3/zeropoints/zeropoints.ipynb
- file: notebooks/WFC3/tvb_flattenramp/TVB_flattenramp_notebook.ipynb
- file: notebooks/WFC3/photometry_examples/phot_examples.ipynb
- file: notebooks/WFC3/uvis_pam_corrections/WFC3_UVIS_Pixel_Area_Map_Corrections_for_Subarrays.ipynb
- file: notebooks/WFC3/uvis_time_dependent_photometry/uvis_timedep_phot.ipynb
- file: notebooks/WFC3/zeropoints/zeropoints.ipynb
- file: notebooks/WFC3/uvis_pam_corrections/WFC3_UVIS_Pixel_Area_Map_Corrections_for_Subarrays.ipynb
125 changes: 57 additions & 68 deletions notebooks/WFC3/README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,84 @@
WFC3 Notebooks
==============

Here the user will find the latest Python-based software notebooks for the Wide
Field Camera 3 (WFC3) on the Hubble Space Telescope (HST). For our primary WFC3
user-support tools, see [wfc3tools](https://github.com/spacetelescope/wfc3tools) and
[WFC3 Software Tools](https://www.stsci.edu/hst/instrumentation/wfc3/software-tools).

WFC3Library is the primary repository for Jupyter notebooks, including general tools,
WFC3/IR, time variable background (TVB), and photometry. This repository contains the
complementary notebooks mentioned in the [WFC3 Data Handbook](https://hst-docs.stsci.edu/wfc3dhb).
WFC3 Notebooks is the primary repository for analyzing data from the
[Wide Field Camera 3](https://www.stsci.edu/hst/instrumentation/wfc3) on the
Hubble Space Telescope. The Jupyter notebooks include tools for general data analysis,
WFC3/IR time variable background (TVB), and photometry. This repository contains the
complementary notebooks mentioned in the [WFC3 Data Handbook](https://hst-docs.stsci.edu/wfc3dhb).
These notebooks include:

General Tools:
- WFC3 Image Displayer and Analyzer
- Exception Report Checklist - WFC3
- Processing WFC3/UVIS Data with `calwf3` Using the v1.0 CTE-Correction

WFC3/IR:
- Masking Persistence in WFC3/IR Images
- How to use `wfc3_dash` on DASH data
- [WFC3 Image Displayer and Analyzer](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/image_displayer_analyzer/wfc3_image_displayer_analyzer.html)
- [Exception Report Checklist - WFC3](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/exception_report/wfc3_exception_report.html)
- [Processing WFC3/UVIS Data with `calwf3` Using the v1.0 CTE-Correction](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/calwf3_v1.0_cte/calwf3_with_v1.0_PCTE.html)
- [Masking Persistence in WFC3/IR Images](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/persistence/wfc3_ir_persistence.html)

WFC3/IR Time Variable Background (TVB):
- WFC3/IR IMA Visualization Tools with an Example of Time Variable Background
- Manual Recalibration of Images using `calwf3`: Turning off the WFC3/IR Linear Ramp Fit
- Correcting for Helium Line Emission Background in WFC3/IR Exposures using the "Flatten-Ramp" Technique
- Correcting for Scattered Light in WFC3/IR Exposures: Manually Subtracting Bad Reads
- Correcting for Scattered Light in WFC3/IR Exposures: Using `calwf3` to Mask Bad Reads
- [WFC3/IR IMA Visualization Tools with an Example of Time Variable Background](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/ir_ima_visualization/IR_IMA_Visualization_with_an_Example_of_Time_Variable_Background.html)
- [Manual Recalibration of Images using `calwf3`: Turning off the WFC3/IR Linear Ramp Fit](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/calwf3_recalibration/calwf3_recal_tvb.html)
- [Correcting for Helium Line Emission Background in WFC3/IR Exposures using the "Flatten-Ramp" Technique](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/tvb_flattenramp/TVB_flattenramp_notebook.html)
- [Correcting for Scattered Light in WFC3/IR Exposures: Manually Subtracting Bad Reads](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/ir_scattered_light_manual_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_by_Manually_Subtracting_Bad_Reads.html)
- [Correcting for Scattered Light in WFC3/IR Exposures: Using `calwf3` to Mask Bad Reads](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/ir_scattered_light_calwf3_corrections/Correcting_for_Scattered_Light_in_IR_Exposures_Using_calwf3_to_Mask_Bad_Reads.html)

Photometry:
- WFC3/UVIS Filter Transformations with `stsynphot`
- Flux Unit Conversions with `synphot` and `stsynphot`
- Synthetic Photometry Examples for WFC3
- WFC3/UVIS Time-dependent Photometry
- Calculating WFC3 Zeropoints with `stsynphot`
- WFC3/UVIS Pixel Area Map Corrections for Subarrays

Each folder in `notebooks` has an individual `README.md` with further
details and a HTML file that can be opened in a browser after cloning this
repository. The HTML file is identical to the notebook, except they contain
output plots and tables.
- [WFC3/UVIS Filter Transformations with `stsynphot`](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/filter_transformations/filter_transformations.html)
- [Flux Unit Conversions with `synphot` and `stsynphot`](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/flux_conversion_tool/flux_conversion_tool.html)
- [Synthetic Photometry Examples for WFC3](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/photometry_examples/phot_examples.html)
- [WFC3/UVIS Time-dependent Photometry](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/uvis_time_dependent_photometry/uvis_timedep_phot.html)
- [Calculating WFC3 Zeropoints with `stsynphot`](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/zeropoints/zeropoints.html)
- [WFC3/UVIS Pixel Area Map Corrections for Subarrays](https://spacetelescope.github.io/hst_notebooks/notebooks/WFC3/uvis_pam_corrections/WFC3_UVIS_Pixel_Area_Map_Corrections_for_Subarrays.html)

See the [WFC3 Instrument Handbook](https://hst-docs.stsci.edu/wfc3ihb),
[WFC3 Data Handbook](https://hst-docs.stsci.edu/wfc3dhb),
[wfc3tools](https://github.com/spacetelescope/wfc3tools), and
[WFC3 Software Tools](https://www.stsci.edu/hst/instrumentation/wfc3/software-tools)
for more information on instrumentation, data, calibration, and software.

Installation
------------

All notebooks require the virtual environment `stenv-stable` (last stable
version used for review was December 2022), which contains libraries necessary
for processing and analyzing data from the Hubble Space Telescope (HST) and the
James Webb Space Telescope (JWST).

To install, see [stenv readthedocs](https://stenv.readthedocs.io/en/latest/)
or [stenv GitHub](https://github.com/spacetelescope/stenv).

In addition, the individual `README.md` files in `notebooks` may have
further installation instructions. Please read them to run the notebooks
properly.

With the environment activated and additional libraries installed based on the
individual `README.md` files, you will be able to complete the notebooks.
It is recommended to clone the entire repository. To do so, run the following
command in terminal:

Installation (Legacy Environment)
---------------------------------
```
git clone https://github.com/spacetelescope/hst_notebooks
```

**WARNING: `wfc3_env` is a legacy environment, meaning it is deprecated**
**and no longer maintained. We recommend using `stenv-stable` in all cases.**
`stenv` is the preferred base virtual environment for running WFC3 Noteboks since
it contains libraries necessary for processing and analyzing data from the Hubble
Space Telescope (HST) and the James Webb Space Telescope (JWST). To install, see
[stenv readthedocs](https://stenv.readthedocs.io/en/latest/) or
[stenv GitHub](https://github.com/spacetelescope/stenv).

All notebooks used to require the same anaconda virtual environment named
`wfc3_env`. To create the virtual environment, run this line in a terminal
window:
`hst_notebooks/notebooks_env` is the default virtual environment for HST Notebooks,
which contains the same scientific computing libraries in `stenv`, but not the HST and
JWST libraries. This environment can also be used as a base, but is not recommended.

conda env create -f wfc3_env_legacy.yml
In addition, each notebook contains a `requirements.txt` file that needs to be
installed before running the notebooks. Some notebooks contain a `pre-requirements.sh`
file, usually to install [HSTCAL](https://github.com/spacetelescope/hstcal), which
is the calibration software for HST. Here is a common set of commands to run
before executing the notebooks (assuming your virtual environment is activated):

To activate `wfc3_env`, run this line in a terminal window:
```
bash pre-requirements.sh
pip install -r requirements.txt
pip install notebook
```

conda activate wfc3_env

You can also create and activate `wfc3_env_no_builds`, which is `wfc3_env`
but without the build specifications to avoid platform specific conflicts.

Please read the individual `README.md` files in `notebooks` for further
installation instructions.
With the environment activated and additional libraries installed based on the
individual requirement files, you will be able to complete the notebooks.

Contributing
------------

Please open a new issue or new pull request for bugs, feedback, or new features
you would like to see. If there is an issue you would like to work on, please
leave a comment and we will be happy to assist. New contributions and
contributors are very welcome!
New contributions and feedback are very welcomed! Please open a new issue or new
pull request for bugs, feedback, or new features you would like to see. If there
is an issue you would like to work on, please leave a comment and we will be happy
to assist. Questions can also be sent through the [HST Help Desk](https://stsci.service-now.com/hst).

WFC3Library follows the
WFC3 Notebooks follows the
[Astropy Code of Conduct](https://www.astropy.org/code_of_conduct.html)
and strives to provide a welcoming community to all of our users and
contributors.
Expand All @@ -99,8 +89,7 @@ the the `astropy`
and [developer](https://docs.astropy.org/en/stable/index.html#developer-documentation)
documentation.


License
-------

WFC3Library is licensed under a 3-clause BSD style license (see the `LICENSE.txt` file).
WFC3 Notebooks is licensed under a BSD 3-Clause License (see the `LICENSE.txt` file).
13 changes: 0 additions & 13 deletions notebooks/WFC3/calwf3_recalibration/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions notebooks/WFC3/calwf3_v1.0_cte/README.md

This file was deleted.

Empty file modified notebooks/WFC3/dash/README.md
100755 → 100644
Empty file.
24 changes: 0 additions & 24 deletions notebooks/WFC3/exception_report/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions notebooks/WFC3/filter_transformations/README.md

This file was deleted.

1 change: 0 additions & 1 deletion notebooks/WFC3/flux_conversion_tool/README.md

This file was deleted.

26 changes: 26 additions & 0 deletions notebooks/WFC3/general_tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# General Tools
Here are brief descriptions of WFC3 Notebooks for general tools:

## WFC3 Image Displayer and Analyzer
We present `display_image`, a tool for displaying full images
with metadata, individual WFC3/UVIS chip images, a section of an image with
various colormaps/scaling, and individual WFC3/IR `ima` reads. In addition, we
present `row_column_stats`, a tool for computing row and column statistics for
the types of WFC3 images previously mentioned.

## Exception Report Checklist - WFC3
We present the steps that should be taken when an observer receives a WFC3
Exception Report Email.

## Processing WFC3/UVIS Data with `calwf3` Using the v1.0 CTE-Correction
We compare `calwf3` v1.0 CTE correction versus v2.0, and explore
when each version is useful. v1.0 will provide the most up-to-date calibration
procedures such as time-dependent photometric corrections and zeropoints, while
also including the v1.0 CTE correction.

## Masking Persistence in WFC3/IR Images
We present how to use the WFC3/IR persistence model to flag pixels affected by
persistence in the calibrated (FLT) science images. When the images are
sufficiently dithered to step over the observed persistence artifacts,
AstroDrizzle may be used to exclude those flagged pixels when combining the FLT
frames.
Loading

0 comments on commit e8ccdee

Please sign in to comment.