forked from spacetelescope/webbpsf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request spacetelescope#145 from josePhoenix/docs-nbwidgets
Add widgetsnbextension install, rearrange installation docs
- Loading branch information
Showing
6 changed files
with
96 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,80 +3,74 @@ | |
Requirements & Installation | ||
=========================== | ||
|
||
The latest version of WebbPSF can be installed from either the `Python Package Index <https://pypi.python.org>`_ (PyPI) or the ``conda`` package management system. | ||
The latest released version of WebbPSF can be installed with the conda package management system or `using pip <install_pip>`_. | ||
|
||
For ease of installation, we recommend using `AstroConda <http://astroconda.readthedocs.io/en/latest/>`_, an astronomy-optimized software distribution for scientific Python built on Anaconda. Install AstroConda according to `their instructions <http://astroconda.readthedocs.io/en/latest/installation.html>`_, then activate the environment with:: | ||
|
||
$ source activate astroconda | ||
|
||
(Note: if you named your environment something other than ``astroconda``, change the above command appropriately.) | ||
|
||
Next, install WebbPSF (along with its dependencies and required reference data) with:: | ||
|
||
(astroconda)$ conda install webbpsf | ||
|
||
.. admonition:: Optional: sign up to receive announcement of updates | ||
|
||
This is entirely optional, but you may wish to sign up to the mailing list ``[email protected]``. This is a low-traffic moderated announce-only list, to which we will periodically post announcements of updates to this software. | ||
|
||
To subscribe, visit the `maillist.stsci.edu server <https://maillist.stsci.edu/scripts/wa.exe?SUBED1=Webbpsf-users&A=1>`_ | ||
|
||
Installing with AstroConda | ||
-------------------------- | ||
|
||
For ease of installation, we recommend using `AstroConda <http://astroconda.readthedocs.io/en/latest/>`_, which includes WebbPSF as well as NumPy, SciPy, and other packages that can be tricky to compile on your own. | ||
|
||
Installing AstroConda according to `their instructions <http://astroconda.readthedocs.io/en/latest/installation.html>`_ will also install WebbPSF, its dependencies, and the reference data it needs. | ||
.. _install-with-conda: | ||
|
||
Installing with conda (but no AstroConda) | ||
----------------------------------------- | ||
|
||
If you already use ``conda``, but do not want to install the full suite of STScI software, you can simply add the AstroConda *channel* and install as follows (for a conda environment named ``myenv``):: | ||
If you already use ``conda``, but do not want to install the full suite of STScI software, you can simply add the AstroConda *channel* and install WebbPSF as follows (creating a new environment named ``webbpsf-env``):: | ||
|
||
$ conda config --add channels http://ssb.stsci.edu/astroconda | ||
$ source activate myenv | ||
(myenv)$ conda install webbpsf | ||
$ conda create -n webbpsf-env webbpsf | ||
$ source activate webbpsf-env | ||
|
||
Upgrading to the latest version is done with ``conda update webbpsf``. | ||
Upgrading to the latest version is done with ``conda update -n webbpsf-env --all``. | ||
|
||
.. warning:: | ||
|
||
You must install WebbPSF into a specific environment; our conda package will not work if installed into the "root" environment. Activate the environment where you want to install WebbPSF, and ``conda install webbpsf`` as above. | ||
You *must* install WebbPSF into a specific environment (e.g. ``webbpsf-env``); our conda package will not work if installed into the default "root" environment. | ||
|
||
.. _install_pip: | ||
|
||
Installing with pip | ||
------------------- | ||
|
||
**If you have Python 2.7, 3.4, or 3.5 already installed another way**, WebbPSF and its underlying optical library POPPY may be installed from the `Python Package Index <http://pypi.python.org/pypi>`_ in the usual manner for Python packages. :: | ||
|
||
$ pip install webbpsf --upgrade | ||
$ pip install --upgrade webbpsf | ||
[... progress report ...] | ||
|
||
Successfully installed webbpsf | ||
|
||
However, ``pip install webbpsf`` only installs the program code. You still must download and install the data files, as :ref:`described below <data_install>`. To obtain source spectra for calculations, you should also follow :ref:`installation instructions for pysynphot <pysynphot_install>`. | ||
|
||
If you wish to install webbpsf on a machine for which you do not have administrative access, you can do so by using Python's | ||
built-in `"--user" mechanism <http://docs.python.org/2/install/#alternate-installation-the-user-scheme>`_ | ||
for installing packages into your home directory. :: | ||
|
||
$ pip install webbpsf --user | ||
|
||
.. warning:: | ||
|
||
If you get the message ``SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.`` during install *even when Python.h is available*, this means ``setup.py`` was unable to install NumPy. This can sometimes be fixed by executing ``pip install numpy`` separately, before installing WebbPSF. See the bug report at `numpy/numpy#2434 <https://github.com/numpy/numpy/issues/2434>`_ for details. | ||
Note that ``pip install webbpsf`` only installs the program code. You still must download and install the data files, as :ref:`described below <data_install>`. | ||
To obtain source spectra for calculations, you should also follow :ref:`installation instructions for pysynphot <pysynphot_install>`. | ||
|
||
Software Requirements | ||
--------------------- | ||
To use the Jupyter Notebook GUI, you will need to install ``ipywidgets``:: | ||
|
||
**Required Python version**: WebbPSF is supported on both Python 2.7 and 3.4+. | ||
$ pip install ipywidgets | ||
$ jupyter nbextension enable --py --sys-prefix widgetsnbextension | ||
|
||
**Required Python packages**: | ||
(See `the ipywidgets README <https://github.com/ipython/ipywidgets#install>`_ for more info.) | ||
|
||
* Recent versions of `NumPy, SciPy <http://www.scipy.org/scipylib/download.html>`_ and `matplotlib <http://matplotlib.org>`_, if not installed already. | ||
* `Astropy <http://astropy.org>`_, 1.0 or more recent. | ||
* `POPPY <https://pypi.python.org/pypi/poppy>`_, 0.5.0 or more recent. | ||
.. tip:: | ||
|
||
**Recommended Python packages**: | ||
If you wish to install WebbPSF on a machine for which you do not have administrative access, you can do so by using Python's | ||
built-in `"--user" mechanism <http://docs.python.org/2/install/#alternate-installation-the-user-scheme>`_ | ||
for installing packages into your home directory. :: | ||
|
||
* `pysynphot <https://pypi.python.org/pypi/pysynphot>`_ enables the simulation | ||
of PSFs with proper spectral response to realistic source spectra. Without | ||
this, PSF fidelity is reduced. See below for :ref:`installation instructions | ||
for pysynphot <pysynphot_install>`. Pysynphot is recommended for most users. | ||
$ pip install webbpsf --user | ||
|
||
**Optional Python packages**: | ||
.. warning:: | ||
|
||
Some calculations with POPPY can benefit from the optional packages `psutil <https://pypi.python.org/pypi/psutil>`_ and `pyFFTW <https://pypi.python.org/pypi/pyFFTW>`_, but these are not needed in general. See `the POPPY installation docs <http://pythonhosted.org//poppy/installation.html>`_ for more details. | ||
These optional packages are only worth adding for speed improvements if you are spending substantial time running calculations. | ||
If you get the message ``SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.`` during install *even when Python.h is available*, this means ``setup.py`` was unable to install NumPy. This can sometimes be fixed by executing ``pip install numpy`` separately, before installing WebbPSF. See the bug report at `numpy/numpy#2434 <https://github.com/numpy/numpy/issues/2434>`_ for details. | ||
|
||
.. _pysynphot_install: | ||
|
||
|
@@ -96,32 +90,46 @@ Files containing such information as the JWST pupil shape, instrument throughput | |
2. Untar ``webbpsf-data-0.5.0.tar.gz`` into a directory of your choosing. | ||
3. Set the environment variable ``WEBBPSF_PATH`` to point to that directory. e.g. :: | ||
|
||
setenv WEBBPSF_PATH $HOME/data/webbpsf-data | ||
export WEBBPSF_PATH=$HOME/data/webbpsf-data | ||
|
||
for tcsh/csh, or:: | ||
|
||
WEBBPSF_PATH=$HOME/data/webbpsf-data; export WEBBPSF_PATH | ||
|
||
for bash. (You will probably want to add this to your ``.cshrc`` or ``.bashrc``.) | ||
for bash. (You will probably want to add this to your ``.bashrc``.) | ||
|
||
You should now be able to successfully ``import webbpsf`` in a Python session, or start the GUI with the command ``webbpsfgui``. | ||
|
||
.. warning:: | ||
|
||
If you have previously installed the data files for an earlier version of webbpsf, and then update to a newer version, the | ||
If you have previously installed the data files for an earlier version of WebbPSF, and then update to a newer version, the | ||
software may prompt you that you must download and install a new updated version of the data files. | ||
|
||
.. admonition:: For STScI Users Only | ||
|
||
Users at STScI may access the required data files from the Central Storage network. If you use bash, export these environment variables:: | ||
Users at STScI may access the required data files from the Central Storage network. Set the following environment variables in your ``bash`` shell. (You will probably want to add this to your ``.bashrc``.) :: | ||
|
||
export WEBBPSF_PATH="/grp/jwst/ote/webbpsf-data" | ||
export PYSYN_CDBS="/grp/hst/cdbs" | ||
|
||
If you are using tcsh:: | ||
Software Requirements | ||
--------------------- | ||
|
||
**Required Python version**: WebbPSF is supported on both Python 2.7 and 3.4+. | ||
|
||
**Required Python packages**: | ||
|
||
* Recent versions of `NumPy, SciPy <http://www.scipy.org/scipylib/download.html>`_ and `matplotlib <http://matplotlib.org>`_, if not installed already. | ||
* `Astropy <http://astropy.org>`_, 1.0 or more recent. | ||
* `POPPY <https://pypi.python.org/pypi/poppy>`_, 0.5.0 or more recent. | ||
|
||
setenv WEBBPSF_PATH /grp/jwst/ote/webbpsf-data | ||
setenv PYSYN_CDBS /grp/hst/cdbs | ||
**Recommended Python packages**: | ||
|
||
* `pysynphot <https://pypi.python.org/pypi/pysynphot>`_ enables the simulation | ||
of PSFs with proper spectral response to realistic source spectra. Without | ||
this, PSF fidelity is reduced. See below for :ref:`installation instructions | ||
for pysynphot <pysynphot_install>`. Pysynphot is recommended for most users. | ||
|
||
**Optional Python packages**: | ||
|
||
Some calculations with POPPY can benefit from the optional packages `psutil <https://pypi.python.org/pypi/psutil>`_ and `pyFFTW <https://pypi.python.org/pypi/pyFFTW>`_, but these are not needed in general. See `the POPPY installation docs <http://pythonhosted.org//poppy/installation.html>`_ for more details. | ||
These optional packages are only worth adding for speed improvements if you are spending substantial time running calculations. | ||
|
||
.. _install_dev_version: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,20 @@ Finishing the release | |
#. Tag that commit as the release with ``git tag v0.X.Y`` and push the tags to origin and upstream with ``git push --tags origin`` and ``git push --tags upstream`` | ||
#. Edit ``setup.py`` to increment the version number in the ``VERSION`` variable and re-add the ``.dev`` suffix | ||
#. Edit ``relnotes.rst`` to add a new heading for the upcoming version | ||
#. Commit your edits with a message like "Back to development: version 0.X.Y+1" | ||
#. Commit your edits with a message like "Back to development: version 0.X.Y+1" | ||
#. Email an announcement to ``[email protected]`` | ||
|
||
Releasing a new version through AstroConda | ||
========================================== | ||
|
||
*Note: this uses the git tag created in the PyPI release.* | ||
|
||
#. Fork (if needed) and clone https://github.com/astroconda/astroconda-contrib | ||
#. If there is a new version of POPPY available to package, edit `poppy/meta.yaml <https://github.com/astroconda/astroconda-contrib/blob/master/poppy/meta.yaml>`_ to reflect the new ``version`` and ``git_tag``. | ||
#. If the minimum needed version of the webbpsf-data package has changed in ``webbpsf/__init__.py``, edit `webbpsf-data/meta.yaml <https://github.com/astroconda/astroconda-contrib/blob/master/webbpsf-data/meta.yaml>`_ to reflect the new ``version`` and ``url``. | ||
#. Edit `webbpsf/meta.yaml <https://github.com/astroconda/astroconda-contrib/blob/master/webbpsf/meta.yaml>`_ to reflect the new versions of POPPY and webbpsf-data, if necessary. | ||
#. Edit in the ``git_tag`` name from ``git tag`` in the PyPI release instructions (``v0.X.Y``). | ||
#. Commit your changes to a new branch and push to GitHub. | ||
#. Create a pull request against ``astroconda/astroconda-contrib``. | ||
#. Wait for SSB to build the conda packages. | ||
#. (optional) Create a new conda environment to test the package installation following :ref:`these instructions <install-with-conda>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters