My recommendation is simply to load the DESI environment:
source /global/common/software/desi/users/adematti/cosmodesi_environment.sh main
Alternatively, you can install pyrecon from here, but there are quite a few dependencies.
pip install git+https://github.com/cosmodesi/pyrecon
analyze_reconstruction.py: Output the r coefficient between true and reconstructed velocitycorrelate_catalog.py: Compute the correlation function or power spectrumjoin_lc_catalog.py: Combine light cone mocks across different redshiftsprepare_lc_catalog.py: Read light cone mocks and output the necessary fieldsreconstruct_box_catalog.py: Apply reconstruction to a cubic box mockreconstruct_lc_catalog.py: Apply reconstruction to a light cone mockvisualize_correlation.py: Plot the correlation functionvisualize_power.py: Plot the power spectrum
You can start an interactive job on Perlmutter with:
salloc --nodes 1 --qos interactive --time 04:00:00 --constrain cpu
On Cori, cpu needs to be replaced by haswell.
After loading the environment, you can then just run the python command:
python reconstruct_box_catalog.py
When running MPI code (e.g., correlate_catalog.py), you also need to include srun -np N python ..., where N is some reasonable number given the architecture of the cluster (Note that Perlmutter has 128 physical threads, whereas Cori has 32).