Installation
Basic install
Install from PyPI:
pip install jacscanomaly
The default PSPL survey workflow uses the compiled C++ backend. PyPI provides
platform wheels containing this backend, so a normal install does not require
a local compiler. If no compatible wheel is available for your platform,
pip falls back to a source build. To force that source build explicitly,
run:
pip install --no-binary jacscanomaly jacscanomaly
You can verify that the compiled backend is available with:
python -c "import jacscanomaly._cpp_grid"
For local development, install the repository in editable mode:
git clone git@github.com:NunotaKansuke/jacscanomaly.git
cd jacscanomaly
pip install -e .
Optional dependencies
Documentation dependencies:
pip install -e ".[docs]"
Test dependencies:
pip install -e ".[test]"
All development dependencies:
pip install -e ".[dev]"
FSPL and microjax
The PSPL workflow only needs the standard package dependencies. FSPL
magnification currently relies on the GitHub source version of microjax
because the PyPI package may not expose microjax.fastlens.fspl_disk.
Install microjax from source before using FSPL fitters:
git clone https://github.com/ShotaMiyazaki94/microjax.git
cd microjax
pip install -e .
C++ backend
The package includes a C++ grid backend and C++ PSPL fitting backend. They are
built through setup.py using OpenMP:
pip install -e .
The C++ backend is required by the default PSPL survey workflow. If the
extension cannot be built, installation should fail rather than producing a
runtime-only failure when FinderConfig(grid_backend="cpp") is used.
If the extension does not build, check that your compiler supports C++17
and OpenMP. On Linux this usually means installing a recent gcc/g++
toolchain. On macOS this may require installing libomp and using compiler
flags that can find it.
If you only need a temporary pure-Python/JAX workaround for debugging, request the JAX backend explicitly in your configuration:
config = FinderConfig(
grid_backend="jax",
single_fit_backend="jax",
)