Installation
Install mejiro from GitHub. Currently, mejiro is not available on PyPI.
git clone https://github.com/AstroMusers/mejiro.git
cd mejiro
conda create -n mejiro python
conda activate mejiro
pip install -e .
The following optional dependencies can be installed for additional features:
dev: run unit tests and build documentationjax-cpu:jaxtronomyplus CPU-onlyjaxfor faster survey simulation and ray-shooting on machines without a GPUjax-gpu:jaxtronomyplusjax[cuda12]for GPU-accelerated survey simulation and ray-shooting. Requires a CUDA-12-compatible NVIDIA driver on the host (nvidia-smishould run);jax-gpuwill install on a CPU-only machine but JAX will fall back to CPU at runtime with a warning.roman: simulate Roman PSFs withSTPSFand Roman L2 and L3 data products withromanisimandromancalhwo: simulate HWO exposures withsyotoolsall: install all optional dependencies (assumes a GPU host; usesjax-gpu)
pip install -e .[all]
Note: if you are using zsh, the default shell on macOS, you will need to escape the square brackets, e.g., pip install -e .'[all]'.
Selecting the JAX backend at runtime: set JAX_PLATFORM_NAME=cpu or JAX_PLATFORM_NAME=gpu in the shell before launching Python (the variable must be set before jax is imported). The pipeline scripts read jaxtronomy.jax_platform from the YAML config and set this variable for you.
To simulate images from Roman, you will need to download the roman-technical-information repository here. Then, set the environment variable ROMAN_TECHNICAL_INFORMATION_PATH to the path where you downloaded the repository, e.g., in your .bashrc or .bash_profile:
export ROMAN_TECHNICAL_INFORMATION_PATH="/{your_path}"
To simulate images from HWO, follow these instructions for syotools to set the environment variables PYSYN_CDBS and SCI_ENG_DIR.
To generate PSFs with STPSF (formerly WebbPSF), follow the instructions here to download the required data files and set environment variables.