Skip to main content

picca

Coverage Status

Package for Igm Cosmological-Correlations Analyses.

This package contains tools used for the analysis of the Lyman-alpha forest sample from the extended Baryon Oscillation Spectroscopic Survey (eBOSS) and the Dark Energy Spectroscopic Instrument (DESI). Here you will find tools to

  • fit continua of forests
  • compute correlation functions (1D and 3D) and power-spectra (1D)
  • compute covariance matrices
  • fit models for the correlation functions

The current reference is du Mas des Bourboux et al. 2020 (https://arxiv.org/abs/2007.08995).

Installation

First, create a clean environment with version>=3.9:

conda create -n my_picca_env python==version
conda activate my_picca_env

If you already have an environment, you just need to activate it. After you have the environment, you can install picca with:

pip install picca

If you are a developer, or want the most recent version of picca, you can download and install manually:

git clone https://github.com/igmhub/picca.git
cd picca
pip install -e .

Optionally, you can add the path to picca to your bashrc:

export PICCA_BASE=<path to your picca>

Or you can add picca/py/ to your PYTHONPATH. Both of these are optional and picca will work without them.

If you are at working at NERSC, we recommend to keep everything clean by adding a function like this in your bashrc:

picca_env () {
    module load python
    conda activate my_picca_env
}

Whenever you need picca just write:

picca_env

This is cleaner than directly adding the commands to the bashrc file, and avoids potential issues with the transition to Perlmutter.

If you want to compute models for the correlations computed with picca, or you want to fit these correlations, see https://github.com/andreicuceu/vega.

If you are running MPI code (only needed for some tasks in fitter2), see https://docs.nersc.gov/development/languages/python/parallel-python/#mpi4py-in-your-custom-conda-environment. If want to run the PolyChord sampler for fitter2, see https://github.com/andreicuceu/fitter2_tutorial. Note that fitter2 is deprecated, and will be removed in the future.

If you need to run the "picca_compute_pk_pksb.py" script you will also need to install the following packages:

pip install camb
pip install cython
pip install nbodykit

Reproducing the BAO measurement in eBOSS DR16 (du Mas des Bourboux et al. 2020)

Picca v4.0 was used in du Mas des Bourboux et al. (2020) to compute the final Lyman-alpha BAO measurement from eBOSS DR16.

You can find a tutorial describing the different steps needed to reproduce the analysis (starting from the public catalogs) in tutorials/eboss_dr16.

Examples

example run over 1000 spectra (the DLA catalog is not required):

delta field

picca_delta_extraction.py config.ini
  • To reproduce the eBOSS analysis (du Mas des Bourboux et al. 2020) this needs to be run four times, two for calibration purposes, one for the Lyman $\alpha$ region and one for the Lyman $\beta$ region

  • Check the tutorial picca_delta_extraction_configuration_tutorial to review the available options. Find it under tutorials/delta_extraction

  • Check the folder examples/delta_extraction with examples to reproduce the eBOSS analysis

old delta field (deprecated)

picca_deltas.py
--in-dir data/
--drq ../DR14Q_v1_1.fits
--dla-vac ../dlas/DLA_DR14_v1b.dat
--out-dir deltas/
--mode pix
  • for eBOSS, currently --mode can be spplate, spec, pix, or spcframe, all but the first 2 are about to be retired
  • NOTE: reading the spec files is very slow
  • for DESI currently --mode can be desi_mocks (for reading healpix based mocks), desi_survey_tilebased (for reading cumulative tiles directories and coadding data across tiles) or desi_sv_no_coadd (for reading tile based directories without coadding, will probably be retired)
  • --in-dir points to the directory containing the data (in case of desi_survey_tilebased the full path until and including cumulative is needed, in case of desi-mocks the full path until spectra-16)
  • the --drq points towards a quasar catalog in either the DESI format or eBOSS format

correlation function

picca_cf.py
--in-dir deltas/
--out cf.fits.gz
--nside 32
  • nside determines the healpixelization used for the subsamples. nside=32 gives ~3200 subsamples for DR12.

distortion matrix

picca_dmat.py
--in-dir deltas/
--out dmat.fits.gz
--rej 0.95
  • --rej is 1-fraction of pairs used for the calculation

wick covariance (optional)

Only T123 implemented

# first calculate cf_1d from data
picca_cf1d.py
--in-dir deltas/
--out cf1d.fits.gz

# then use it for wick
picca_wick.py
--in-dir deltas/
--out t123.fits.gz
--rej 0.999
--cf1d cf1d.fits.gz

## use the export script to export to picca fitter format
picca_export.py
--data cf.fits.gz
--dmat dmat.fits.gz
--out cf-exp.out.gz

Name of tags

The tags name follow the names of the king of France:
https://fr.wikipedia.org/wiki/Liste_des_monarques_de_France#Liste_des_monarques_de_France

For Developers

Before submitting a PR please make sure to:

  1. Check the tutorials. Update them if necessary (typically the tutorial picca_delta_extraction_configuration_tutorial will need to be updated.
  2. Update the data model
  3. For every file you have modified run
    yapf --style google file.py -i
    
    to ensure the coding styles are maintained.
  4. Consider using pylint to help in the debug process. From the repo folder run
    pylint py/picca/delta_extraction/
    pylint py/picca/pk1d/
    
    depending on the module you are working on.

New scripts should be added to pyproject.toml file under the [project.scripts] section.

When merging PRs (or committing to main directly):

  • by default the patch version is increased via a github action, so every change of main will generate a new version This behaviour can be changed by adding one of the following to the commit-msg of the merge commit:
  • by specifying [bump minor] or [bump major] a new minor or major version will be generated instead, but tags and releases need to be created manually (and are auto-pushed to pypi when they are created)
  • by specifying [no bump] the version bump can be circumvented altogether when some other behaviour is wanted, in that case bump2version should be run manually

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

picca-9.21.0.tar.gz (467.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picca-9.21.0-py3-none-any.whl (557.9 kB view details)

Uploaded Python 3

File details

Details for the file picca-9.21.0.tar.gz.

File metadata

  • Download URL: picca-9.21.0.tar.gz
  • Upload date:
  • Size: 467.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for picca-9.21.0.tar.gz
Algorithm Hash digest
SHA256 38e26246f6bfc6ed83d24baef8a0cee02293c7fc08fa4a02bb5a45837847307a
MD5 08480015725b546d8f7b69f583b164d1
BLAKE2b-256 06894279dd1f2c905396a3b930448a7065b65b3208bc105e43ebb8d3216e98cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for picca-9.21.0.tar.gz:

Publisher: publish-to-test-pypi.yml on igmhub/picca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file picca-9.21.0-py3-none-any.whl.

File metadata

  • Download URL: picca-9.21.0-py3-none-any.whl
  • Upload date:
  • Size: 557.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for picca-9.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae414fead615fc39da55c46c70727a16ca3033de699528f52a0101d26d5d4254
MD5 4598234c0d7d45a0422fc9ed392e2c0e
BLAKE2b-256 e8c7b2b204fd501153d9cfb7d27a1f828273a157512ed3bdd2acbf79f13cab5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for picca-9.21.0-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on igmhub/picca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

9.21.0 This release

2 files

9.20.0

2 files

9.19.0

2 files

9.17.0

2 files

9.16.0

2 files

9.15.1

2 files

9.13.0

2 files

9.12.0

2 files

9.11.0

2 files

9.10.0

2 files

9.9.0

2 files

9.6.1

2 files

9.6.0

2 files

9.5.0

2 files

9.3.0

2 files

9.2.0

2 files

9.1.0

2 files

9.0.0

2 files

8.3.0

2 files

8.2.0

2 files

8.1.0

2 files

8.0.0

2 files

7.2.0

2 files

7.1.0

2 files

7.0.3

2 files

7.0.0

2 files

6.1.0

2 files

6.0.0

2 files

5.1.0

2 files

5.0.0

2 files

4.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page