« Antonio Ragagnin Homepage

c2pap web portal batch script for hydrodynamic simulations

Last update: 02/09/2026;

In this paget I (Antonio Ragagnin) present you batch jobs for c2papcosmosim.uc.lrz.de with the script c2pap_batch.py.

Install

Download the script from this website:

  wget https://aragagnin.github.io/c2pap_batch/c2pap_batch.py
  pip install mechanize
  pip install pyyaml

Test it

Download a sample dataset of haloes obtained from the webportal, and execute some services on it:

  wget https://aragagnin.github.io/c2pap_batch/dataset.csv
  python c2pap_batch.py -f dataset.csv -s SMAC -p content="bolometric x-ray luminosity" IMG_SIZE=512 IMG_Z_SIZE=5000 \
  PROJECT='along z, xy plane' r500factor=2.0 -u 'your user'
  # add -x 'your pass' to avoid typing it

Usage

Given a list of clusters previously extracted from the c2pap web portal (the output file name is dataset.csv), the script c2pap_batch.py automatize the process of sending the same jobs parameter to all those haloes.

The script takes the parameter -s {Service name} where the service name can be SMAC, SimCut, PHOX, query, the path of the dataset file name -f {daraset.csv}, the job parameters must be set with -p and must consist of the value displayes in the web portal.

Below a list of all parameters. Note: they are case sensitive.

    Form parameters.
    SimCut:
    IMG_Z_SIZE
    r500factor

    SMAC:
    content
    IMG_SIZE
    IMG_Z_SIZE
    PROJECT
    r500factor

    PHOX:
    mode
    instrument (-1 for generic)
    instrument_a (only if generic)
    instrument_fov (only if generic)
    t_obs_input
    img_z_size
    simulate

Troubleshooting

To avoid running duplicate jobs, use the flags --existing-jobs --cache-jobs cachefile.pickle to make the script check for existing jobs with identical parameters.

In case you get an error urllib.error.URLError: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1010)> , then run the python script with the option --weak-ssl to ignore SSL verificaiton.

For any question ask me (Antonio Ragagnin) using the address antonio.ragagni(at) inaf.it or a more updated one on my home page aragagnin.github.io.

Credits and citations

Likewise using the webportal, publications using this script should cite Ragagnin et al. (2017), e.g. if you use PHOX cite Biffi et al. (2012), or if you use SMAC cite Dolag et al. (2005), as well as the other citations provided in the web portal credit page: https://c2papcosmosim.uc.lrz.de/credits