Skip to content

Commit

Permalink
Merge pull request #191 from tcjansen/download_data-doc
Browse files Browse the repository at this point in the history
Reworded the bit about downloading data for pre-defined quantities
  • Loading branch information
pllim authored May 28, 2019
2 parents 8f407ae + 18d0108 commit b72f7bc
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,27 @@ You can install **synphot** using one of the following ways:
cd synphot_refactor
python setup.py install

To use the pre-defined standard star, extinction laws, and bandpasses, it is
recommended that you copy
`synphot.cfg <https://github.com/spacetelescope/synphot_refactor/blob/master/synphot/synphot.cfg>`_
to your ``$HOME/.astropy/config/`` directory.
In doing so, you can avoid connecting directly to STScI HTTP service,
which is slower and might not be available all the time.

If necessary (i.e., if you are not an internal STScI user), replace
``/grp/hst/cdbs`` with your local directory name
(e.g., ``/my/local/dir/cdbs``), where you plan to store the data files.
Then, follow the instructions below to "install" the data files.
To use the pre-defined standard star, extinction laws, and bandpasses, it is
recommended for non-internal STScI users to download the necessary data files to
a local directory so you can avoid connecting directly to STScI HTTP service,
which is slower and might not be available all the time. To download the files
via HTTP, create a local directory where you plan to store the data files
(e.g., ``/my/local/dir/cdbs``) and run the following:

>>> from synphot.utils import download_data
>>> file_list = download_data('/my/local/dir/cdbs')

Then copy `synphot.cfg <https://github.com/spacetelescope/synphot_refactor/blob/master/synphot/synphot.cfg>`_
to your ``$HOME/.astropy/config/`` directory, and replace every instance of
``/grp/hst/cdbs`` with ``/my/local/dir/cdbs`` so that ``synphot`` knows where to
look for these files.

.. note::

**synphot** data files are a minimal subset of those required by
**stsynphot**. If you plan to use the latter anyway, please also read the
instructions in its documentation.

To install local data files via HTTP into, say, ``/my/local/dir/cdbs``::

>>> from synphot.utils import download_data
>>> file_list = download_data('/my/local/dir/cdbs')

If you have your own version of the data files that you wish to use, you can
modify ``synphot.cfg`` to point to your own copies without having to download
using the function above. However, before you do so, make sure that your own
Expand Down

0 comments on commit b72f7bc

Please sign in to comment.