Basic Installation¶
Requirements¶
pyNRC requires Python 3.7+ along with the following packages:
Recent version of Numpy, Scipy, and matplotlib
Astropy 4.2+
Astroquery 0.4.3+
pysynphot 2.0.0+
WebbPSF 1.0.0+
WebbPSF Extensions 1.0.3+
JWST Pipeline 1.3+
Recommended Python packages:
jwst_backgrounds 1.1.2+
psutil Library to retrieve information on system utilization and profiling
tqdm Progress bar for for loops
Installing with pip¶
You can install the pynrc
package through pip:
$ pip install pynrc
If you want to make sure that none of your existing dependencies get upgraded, instead you can do (assuming all dependencies are met!):
$ pip install pynrc --no-deps
Installing with conda¶
Todo
Not yet implemented
pyNRC can be installed with conda if you have installed Anaconda or Miniconda. To install pyNRC using the conda-forge Anaconda channel, simply add -c conda-forge
to the install command:
$ conda install -c conda-forge pynrc
Installing from source¶
To get the most up to date version of pynrc
, install directly from source, though stability is not guaranteed. The development version can be found on GitHub.
In this case, you will need to clone the git repository:
$ git clone https://github.com/JarronL/pynrc
Then install the package with:
$ cd pynrc
$ pip install .
For development purposes:
$ cd pynrc
$ pip install -e .
in order to create editable installations. This is great for helping to develop the code, create bug reports, pull requests to GitHub, etc.
Installing the data files¶
The above commands only installs the program code. You still must download and install the data files.
Files containing information such as the instrument throughputs, stellar models, and exoplanet models are already distributed through webbpsf_ext
.
In addition, pynrc
requires a number of files to simulate realistic detector data with DMS-like formatting and headers. In general, these are not necessary to run pynrc
and use its ETC capabilities and simple simulations.
But, in order to create DMS and pipeline-compliant data, you must download these files and define the PYNRC_PATH
environment variable.
Download the following file: pynrc_data_all_v1.0.0.tar [approx. 17.0 GB]
Untar into a directory of your choosing.
Set the environment variable
PYNRC_PATH
to point to that directory. For example, in.bashrc
shell file, add:$ export PYNRC_PATH=$HOME/data/pynrc_data
You should now be able to successfully import pynrc
in a Python session.
Testing¶
Todo
Not yet implemented
If you want to check that all the tests are running correctly with your Python configuration, you can also run:
$ python setup.py test
in the source directory. If there are no errors, you are good to go!