Skip to content

CosmoLike/cocoa_lsst_les

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

  1. Running Cosmolike projects
  2. Deleting Cosmolike projects
  3. Updating the data folder
  4. Optimistic/Pessimistic choice of parameters
  5. Mask choices

Running Cosmolike projects

In this tutorial, we assume the user installed Cocoa via the Conda installation method, and the name of the Conda environment is cocoa. We also presume the user's terminal is in the folder where Cocoa was cloned.

1️⃣ Step 1 of 7: activate the Conda Cocoa environment

    $ conda activate cocoa

2️⃣ Step 2 of 7: go to the projects folder and clone the Cosmolike LSST-Y1 project:

    $(cocoa) cd ./cocoa/Cocoa/projects
    $(cocoa) git clone --depth 1 [email protected]:SBU-COSMOLIKE/cocoa_lsst_les lsst_les

The option --depth 1 prevents git from downloading the entire project history. By convention, the Cosmolike Organization hosts a Cobaya-Cosmolike project named XXX at CosmoLike/cocoa_XXX. However, our scripts and YAML files assume the removal of the cocoa_ prefix when cloning the repository.

3️⃣ Step 3 of 7: go to cocoa_les folder and uncompress the data folder

    $(cocoa) cd ./cocoa_les
    $(cocoa) tar xf data.xz

Git ignores the data folder (thanks to .gitignore) because the covariance files are too large not to be handled by Git-LFS. Git-LFS costs money, so we compress the folder using the xz file format.

4️⃣ Step 4 of 7: go back to the Cocoa main folder, and activate the private Python environment

    $(cocoa) cd ../
    $(cocoa) source start_cocoa

⚠️ (warning) ⚠️ Remember to run the start_cocoa script only after cloning the project repository. The script start_cocoa creates the necessary symbolic links and adds the Cobaya-Cosmolike interface of all projects to LD_LIBRARY_PATH and PYTHONPATH paths.

5️⃣ Step 5 of 7: compile the project

    $(cocoa)(.local) source ./projects/lsst_les/scripts/compile_lsst_y1

6️⃣ Step 6 of 7: select the number of OpenMP cores

    $(cocoa)(.local) export OMP_PROC_BIND=close; export OMP_NUM_THREADS=4

7️⃣ Step 7 of 7: run a template YAML file

One model evaluation:

    $(cocoa)(.local) mpirun -n 1 --oversubscribe --mca btl vader,tcp,self --bind-to core:overload-allowed --rank-by core --map-by numa:pe=${OMP_NUM_THREADS} cobaya-run ./projects/lsst_les/EXAMPLE_EVALUATE1.yaml -f

MCMC:

    $(cocoa)(.local) mpirun -n 4 --oversubscribe --mca btl vader,tcp,self --bind-to core:overload-allowed --rank-by core --map-by numa:pe=${OMP_NUM_THREADS} cobaya-run ./projects/lsst_les/EXAMPLE_MCMC1.yaml -f

Deleting Cosmolike projects

⚠️ (warning) ⚠️ Never delete the lsst_les folder from the project folder without running stop_cocoa first; otherwise, Cocoa will have ill-defined soft links at Cocoa/cobaya/cobaya/likelihoods/ , Cocoa/external_modules/code/ and Cocoa/external_modules/data/

Updating the data folder

In this tutorial, we assume the user installed Cocoa via the Conda installation method, and the name of the Conda environment is cocoa. We also presume the user's terminal is in the folder where Cocoa was cloned.

1️⃣ Step 1 of 3: activate the Conda Cocoa environment

    $ conda activate cocoa

The Conda Cocoa environment contains the xz compression program.

2️⃣ Step 2 of 3: go to the lsst_les folder and clone the Cosmolike LSST-Y1 project:

    $(cocoa) cd ./cocoa/Cocoa/projects/lsst_les

3️⃣ Step 3 of 3: delete the data.xz file, and then type

    $(cocoa) tar -cf - data/ | xz -k -9e --threads=4 -c - > data.xz

Compression may take a few minutes. Afterward, proceed with the usual git commit and git push commands.

Optimistic/Pessimistic choice of parameters

This is our suggestion for optimistic/pessimistic choices of IA, photo-z, and shear bias.

Screenshot 2023-08-03 at 3 57 17 PM

Mask choices

The Python file calculate_mask.py on /data allows the user to create mask files. We do provide the following mask files for Y1/Y3/Y6/Y10 data

    if (mask_choice == 1):
      # LSST_YX_M1.mask  (lmax = 3000) on CS -----------------------------------------
      # lmax x theta_min corresponds to the first zero of the Bessel 𝐽0/4
      # J0 first zero is 2.4048, J4 first zero is 7.5883
      # For theta = 1arc_min, lmax * theta_min = 0.87
      ξp_CUTOFF = 2.756  # cutoff scale in arcminutes
      ξm_CUTOFF = 8.6955  # cutoff scale in arcminutes
      gc_CUTOFF = 21     # Galaxy clustering cutoff in Mpc/h
    elif (mask_choice == 2):
      # LSST_YX_M2.mask  (lmax = 1500) on CS -----------------------------------------
      # lmax \times theta_min corresponds to the first zero of the Bessel 𝐽0/4
      ξp_CUTOFF = 5.512  # cutoff scale in arcminutes
      ξm_CUTOFF = 17.391  # cutoff scale in arcminutes
      gc_CUTOFF = 21     # Galaxy clustering cutoff in Mpc/h
    elif (mask_choice == 3):
      # LSST_YX_M3.mask  (lmax = 750) on CS -----------------------------------------
      # lmax \times \theta_min corresponds to the first zero of the Bessel 𝐽0/4
      ξp_CUTOFF = 11.024 # cutoff scale in arcminutes
      ξm_CUTOFF = 34.782 # cutoff scale in arcminutes
      gc_CUTOFF = 21     # Galaxy clustering cutoff in Mpc/h
    elif (mask_choice == 4):
      # LSST_YX_M4.mask  all ones ---------------------------------------------
      ξp_CUTOFF = 0 # cutoff scale in arcminutes
      ξm_CUTOFF = 0 # cutoff scale in arcminutes
      gc_CUTOFF = 0 # Galaxy clustering cutoff in Mpc/h

Releases

No releases published

Packages

No packages published

Languages

  • C++ 50.5%
  • Python 43.2%
  • Shell 6.3%