fisherA2Z
Introduction
FisherA2Z is a Fisher forecasting code initially developed by Husni Almoubayyed for his PhD thesis Chapter 4. Tianqing Zhang refurbished the code in 2024 and prepared Zhang et al in prep. "A2Z" stands for the initial of Almoubayyed and Zhang.
This repository includes code used for the Fisher Information matrix computation used to assess the impact of photo-z modeling errors on 3x2pt inferences.
Installation
First, initialize a conda environment by
conda create -n 'fisher_env' python=3.8
conda activate fisher_env
If you want to install from Pypi:
pip install fisher-a2z
If you want to install from source, clone the repository, and install by
pip install -e .
Then you can add your conda environment to your jupyterLab by
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=fisher_env
Code
The code described in the paper is in fisher.py, and the Fisher class therein.
We developed a latest and greatest module that can do forecast for any n(z) and its realizations, survey configuration like fsky, number density, and shape noise, defined in fisher_flex.py
The Fisher class takes a CCL cosmo object and 3 iterables of length 5 each to specify the photo-z error model in terms of biases, standard deviations, and outlier fractions.
Examples
Flexible Fisher Forecast
To use the flexible fisher forecast, you need to define a bit more ingredient (but it is way more flexible)
from fisherA2Z.fisher_flex import FisherFlex
flex_y10_cs = FisherFlex(
# -- the n(z) and its uncertainty ---------------------------------
nz_source=nz_source,
nz_realizations=nz_realizations,
z_grid=z_grid,
# -- the survey ---------------------------------------------------
neff_source=[4, 5, 4, 2], # arcmin^-2, per tomographic bin
fsky=0.5, # ~0.5
sigma_e=0.26, # per-component ellipticity dispersion
# -- the analysis -------------------------------------------------
mode="cosmic_shear", # or '2x2pt' / '3x2pt'
nz_model="shift_stretch",
)
flex_y10_cs.compute(parallel=True)
res_y10_cs = flex_y10_cs.forecast(ell_max_cs=1800, ell_min_cs=300) # you can apply scale cuts here
See Tutorial_04 and Tutorial_05 for more examples on FisherFlex.
Original Fisher Forecast
To get the original fisher matrix for a certain case, it is sufficient to run
from fisher import Fisher
f = Fisher(cosmo=ccl_cosmo)
f.process()
then the Fisher information matrix will be stored in f.fisher. Also see Tutorial_01/02/03
Enjoy Fishering!
Metadata
Release files for fisher-a2z 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fisher_a2z-0.4.1.tar.gz | 16.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fisher_a2z-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 MB
Release files / fisher_a2z-0.4.1.tar.gz
| Download URL | fisher_a2z-0.4.1.tar.gz |
|---|---|
| Size | 16.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
974c7b6b7ba8272bac080c441bc7a473c8776cddde6559893cee752c0f0c8512
|
|
BLAKE2b-256 checksum How to use checksums |
05e743c42cb45d9acdceaea9bc7d406e6bcf2baa3106ff02597da30515d07760
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / fisher_a2z-0.4.1-py3-none-any.whl
| Download URL | fisher_a2z-0.4.1-py3-none-any.whl |
|---|---|
| Size | 14.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8110a24e3c648bca4f87257d2a89cc4d69483391af4af87ee162ebdffd504b9
|
|
BLAKE2b-256 checksum How to use checksums |
3443034c46f216a188ae5a613aeb4d09edf12ebba1fbb148ba22cd70946561a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log