************ Installation ************ STIPS is a simulation tool that depends on other modules such as PSF and exposure time calculators. These underlying submodules need to be installed for STIPS to function properly along with their supporting datasets. There are multiple options for installation and they are listed in this section along with instructions. STIPS Requirements ################## * ``pandeia>=2025.9``: Exposure time calculator. * ``stpsf>=2.0.0``: Nancy Grace Roman PSF calculator. STIPS also requires that ``poppy``, a support package used by STPSF (Formerly WebbPSF), have version ``>=1.0.3``. * ``astropy``: STIPS uses Astropy in order to read and write ASCII tables (specifically in the IPAC format) and FITS files, as well as to generate Sersic profile models (if any are in the generated scene). * ``montage_wrapper``: STIPS uses ``montage`` to generate mosaics. It is only imported if STIPS is asked to generate a multi-detector image. * ``numpy``: STIPS uses ``numpy`` extensively for almost everything that it does. * ``photutils``: STIPS uses ``photutils`` to determine the flux inside the half-light radius in generated Sersic profiles. * ``synphot>=1.1.1`` and ``stsynphot>=1.1.0``: STIPS uses ``synphot`` and ``stsynphot`` to generate bandpasses, count rates, and zero points. Note that the reference data must also be downloaded, as described below in :ref:`downloading-required-ref-data`. * ``scipy``: STIPS uses SciPy to manipulate its internal images (zoom and rotate). * ``esutil``: Used for retrieving data from sqlite databases in the form of ``numpy`` arrays. .. warning:: ``esutil`` is not installed by the STIPS ``setup.py`` file because its pip installation has errors. After installing STIPS, you must run ``pip install esutil --no-cache-dir`` to have ``esutil`` available. .. note:: ``esutil`` is only needed if you are using ``stips.star_generator``. Finally, STIPS requires a set of data files whose location is marked by setting the environment variable ``stips_data``, which will be installed as part of these instructions. Installing Using a Package Manager and Source Code ################################################## STIPS can be installed using one of the YAML files provided in its source code. These YAML files define an environment that a package manager like `Micromamba `_, `Mamba `_, `Conda `_, or another can read and install on your machine. (If you don't have a package manager, follow any of the preceding links for installation instructions.) The YAML files include all packages required by STIPS. Please follow the steps below to install STIPS. .. _installing-as-a-user: Installing as a User ******************** #. You will need to clone the STIPS source code from the `spacetelescope/STScI-STIPS `_ repository. ``cd`` into the directory where you would like to store the source code and run:: git clone https://github.com/spacetelescope/STScI-STIPS.git cd STScI-STIPS #. The environment file can be used in two ways: * To create a new environment named ``stips``:: conda env create -f environment.yml conda activate stips * Or, to install to or update an existing environment:: conda env update --name --file environment.yml (If you are using mamba, substitute it for ``conda`` in the commands above. If you are using micromamba, substitute it for ``conda`` and also remove ``env`` in the commands above.) Installing as a Developer ************************* #. This step is identical to the first step of :ref:`installing-as-a-user`. #. Follow the second step of :ref:`installing-as-a-user` but using the ``environment_dev.yml`` file instead of ``environment.yml``. .. _downloading-required-ref-data: Installing with pip ******************* While it is possible to install STIPS with ``pip`` instead of a package manager, we recommend the latter due to the aforementioned warning about using ``pip`` with the ``esutil`` package. Downloading Required Reference Data ************************************ STIPS, Pandeia, and STPSF require additional reference datasets. You will need to download the data and add them to your environmental path. 1. Add the following paths to your bash environmental path. It is recommended that you add the path to your ``.bash_profile`` file: .. code-block:: text export stips_data="/ref_data/stips_data" export STPSF_PATH="/ref_data/stpsf-data" export PYSYN_CDBS="/ref_data/grp/redcat/trds" export pandeia_refdata="/ref_data/pandeia_data-xxxx.x_roman" # if your Pandeia installation is 2026.1 or higher, add the following: export PSF_DIR="/ref_data/pandeia_psfs-xxxx.x_roman" .. note:: Make sure that you have the correct version number for ``pandeia_refdata`` (replace the "x.x.x"). 2. ``cd`` into the ``ref_data`` directory in your ``STScI-STIPS`` clone. 3. Run the following code (after ensuring your package manager's ``stips`` environment is active):: python retrieve_stips_data.py .. caution:: Running ``retrieve_stips_data.py`` will fetch the latest versions of each package's reference data. If you have manually configured your software environment to use other versions of any of these packages, download their reference data separately and configure your environment variables appropriately to avoid confusion. Testing Installation ********************* To test if all the required files have been installed, please import STIPS in Python:: bash-3.2$ python3 Python 3.11.15 | packaged by conda-forge | (main, Mar 5 2026, 16:58:53) [Clang 19.1.7 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import stips >>> print(stips.__env__report__) You should receive an output of the following form: .. code-block:: text STIPS Version x.y.z with Data Version a.b.c at /Some/Path/To/stips_data. STIPS Grid Generated with STIPS Version x.y.z. Pandeia Version YYYY.n with Data Version YYYY.n at /Some/Path/To/pandeia_refdata. STPSF Version d.e.f with Data Version d.e.f at /Some/Path/To/stpsf_data_path. Ignore the following warning message if it appears: .. code-block:: text WARNING: stips_data environment variable not found. Falling back on local STIPS data.