User Tools

Site Tools


casa:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
casa:install [2020/10/30 12:49] bemmelcasa:install [2020/11/05 08:20] (current) janssen
Line 1: Line 1:
-===== CASA VLBI workshop software installation =====+====== CASA VLBI optional software installation ======
  
-On this page you find instructions for optional software+Note that support during the workshop will be limited.
  
  
 ===== Jupyter CASA ===== ===== Jupyter CASA =====
  
-=== Install instructions for Jupyter CASA === +==== Install instructions for Jupyter CASA ====
- +
-__Installing the infrastructure to run the Jupyter Notebooks is optional.__+
  
 For parts of the tutorials we have developed Jupyter Notebooks based on the Jupyter CASA environment. This requires singularity or a docker container to run. For MacOS there is only a beta-version of singularity available, so the instructions below are based on docker. This installation is optional, all tutorials can also be done using the stand-alone version of CASA. For parts of the tutorials we have developed Jupyter Notebooks based on the Jupyter CASA environment. This requires singularity or a docker container to run. For MacOS there is only a beta-version of singularity available, so the instructions below are based on docker. This installation is optional, all tutorials can also be done using the stand-alone version of CASA.
Line 24: Line 22:
   - If you downloaded the tutorial notebook you should see it in the list on your browser and can launch it by clicking on the link once.   - If you downloaded the tutorial notebook you should see it in the list on your browser and can launch it by clicking on the link once.
  
-=== Notes ===+==== Notes ====
  
 There is a known issue with X11-forwarding on MacOS. The workaround for this is to slightly modify step 6 above. You first launch the docker, inside the docker you launch the notebook. You can than proceed with step 7 above. There is a known issue with X11-forwarding on MacOS. The workaround for this is to slightly modify step 6 above. You first launch the docker, inside the docker you launch the notebook. You can than proceed with step 7 above.
  
-  - Start the docker with ''docker run -p 8888:8888 -i -t -e DISPLAY=$DISPLAY -v <absolute path to your data processing directory>:/home/jupyter/data penngwyn/jupytercasa'' +  - Start the docker with ''docker run -p 8888:8888 -i -t -e DISPLAY=$DISPLAY -v <absolute path to your data processing directory>:/home/jupyter/data penngwyn/jupytercasa bash'' 
   - Inside the same terminal window launch the notebook ''xvfb-run jupyter notebook''   - Inside the same terminal window launch the notebook ''xvfb-run jupyter notebook''
  
Line 40: Line 38:
 The notebook runs CASA5.6, but this should not impact the basic functionality used in the tutorials.\\ The notebook runs CASA5.6, but this should not impact the basic functionality used in the tutorials.\\
  
-=== Available Jupyter notebooks ===+==== Available Jupyter notebooks ====
  
 For the VLA tutorial there is a version of the notebook available in the [[https://github.com/aardk/jupyter-casa/tree/master/examples|examples]]. To get this to your laptop, in a terminal type ''wget https://github.com/aardk/jupyter-casa/raw/master/examples/vla-cont-tutorial.ipynb'' For the VLA tutorial there is a version of the notebook available in the [[https://github.com/aardk/jupyter-casa/tree/master/examples|examples]]. To get this to your laptop, in a terminal type ''wget https://github.com/aardk/jupyter-casa/raw/master/examples/vla-cont-tutorial.ipynb''
  
-There is a beta version of the [[https://code.jive.eu/bemmel/EVN_CASA_pipeline/raw/branch/master/EVN_continuum_pyp.ipynb|EVN pipeline notebook]] and an example notebook based on the DARA and EVN tutorials. These will be linked here later.+There is a beta version of the [[https://code.jive.eu/bemmel/EVN_CASA_pipeline/raw/branch/master/EVN_continuum_pyp.ipynb|EVN pipeline notebook]] and an [[https://www.dropbox.com/s/5tbdj90mzihggpr/n14c3_pipe.ipynb?dl=0|example notebook]] based on the DARA and EVN tutorials. Both contain all calibration steps up to the imaging. 
 + 
 + 
 +===== CASA rPICARD pipeline ===== 
 +The [[https://bitbucket.org/M_Janssen/picard|rPICARD]] software is a generic CASA-based VLBI data reduction pipeline. In this workshop, the unique features of rPICARD are used to guide users through the calibration of mm VLBI data. But the pipeline works just as well for lower frequency (e.g., EVN) VLBI data. Just give it a try ;-) 
 + 
 +The pipeline can be installed with [[https://singularity.lbl.gov|Singularity]], [[https://www.docker.com|Docker]], or from source on Linux. 
 + 
 +=== Using Singularity === 
 + 
 +You will obtain a containerized version of the software, which is great for scientific reproducibility!\\ 
 +1) Go to your working directory.\\ 
 +2) $ singularity build casavlbi.pipe [[docker://mjanssen2308/casavlbi:latest|docker://mjanssen2308/casavlbi:latest]] \\ 
 +3) $ singularity run ./casavlbi.pipe \\ 
 +Your are now inside Singularity, where you have access to rPICARD. To go back to your old shell, type\\ 
 +$ exit 
 + 
 + 
 +=== Using Docker === 
 + 
 +Similar to Singularity and just as great for scientific reproducibility. In fact, you will use the same container here but within Docker your are more 'isolated' from your host system compared to Singularity.\\ 
 +1) $ docker pull mjanssen2308/casavlbi:latest\\ 
 +2) $ docker run --name picard.cont -it --init --env HOME=/data --user $(id -u) -v /etc/passwd:/etc/passwd --network=host -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY -v /full/path/to/your/working/dir:/data mjanssen2308/casavlbi:latest\\ 
 +!! It seems like the wiki page messes up double dashes in the above command. See the README of https://bitbucket.org/M_Janssen/picard for the correct version of that command which works for copy/paste.\\ 
 +(you will have to fill in the correct path for /full/path/to/your/working/dir here)\\ 
 +3) $ cd /data\\ 
 +Your are now inside Docker in a mirror of your working directory, where you have access to rPICARD. To go back to your old shell, type\\ 
 +$ exit 
 + 
 + 
 +=== Installing from source on Linux === 
 + 
 +(Note that rPICARD runs on CASA6. This will not interfere with your CASA5 installation as you can have multiple versions of CASA on your system.)\\ 
 +1)Go to a directory where you install your software and obtain the correct CASA version for the pipeline:  \\ 
 +$ wget https://ftp.science.ru.nl/astro/mjanssen/casa-CAS-13094-2.tar.xz  \\ 
 +$ tar xvJf casa-CAS-13094-2.tar.xz  \\ 
 +2)Git clone the repository (do not download as tarball because the .git folder is needed):  \\ 
 +$ git clone https://bitbucket.org/M_Janssen/picard  \\ 
 +3)Link the pipeline to the CASA installation:  \\ 
 +$ ./picard/setup.py -p casa-CAS-13094-2  \\ 
 +The script will walk you through the automatic installation.  \\ 
 +4)Add picard to your path:  \\ 
 +$ printf '\nexport PATH=$PATH:'"$(pwd)"'/picard/picard\n' >> ~/.bashrc  \\ 
 +5)Add picard to your PYTHONPATH:  \\ 
 +$ printf '\nexport PYTHONPATH=$PYTHONPATH:'"$(pwd)"'/picard/picard\n' >> ~/.bashrc  \\ 
 +$ source ~/.bashrc \\ 
 +6)Install [[https://github.com/haavee/jiveplot|jiveplot]] and/or [[https://singularity.lbl.gov|Singularity]] and add it to your path for much   
 +better and quicker plotting (optional but strongly recommended).
  
 +==== How to use the pipeline ====
 +There is a quick start guide in the [[https://bitbucket.org/M_Janssen/picard/raw/32393f15cd86f83cfc642b4d12fb616aab08f77c/documentation/picard_documentation.pdf|documentation]] and the usage of rPICARD will be explained in the [[https://docs.google.com/presentation/d/16K9azWq2cfnqZWbARiBiXrpTGTdIrqsToC7ZHd3zdFo/edit?usp=sharing| mm-VLBI]] tutorial on Thursday.
 +In a nutshell, you have to\\
 +1) Put all relevant files or links to those files (FITS-IDI visibility data or a MeasurementSet, a priori calibration metadata in the ANTAB format, and flag tables) in a working directory.\\
 +2) Copy a set of input parameters to the working directory ($ cp -r /usr/local/src/picard/input_template/ input) and set the science_target, calibrators_instrphase, calibrators_bandpass, and calibrators_rldly parameters in input/observation.inp. Then, you have to set the array_type and refant parameters in input/array.inp (the meaning of these parameters are described in the files).\\
 +3) Run the pipeline with\\
 +$ picard -p -n 4\\
 +Here, -p specifies to run rPICARD in the current working directory and -n 4 allows rPICARD to use 4 of your CPU cores for parallel data processing.
  
 +==== Additional information ====
 +  * [[https://ui.adsabs.harvard.edu/abs/2019A%26A...626A..75J|Janssen et al., A&A, 626 (2019) A75]]
 +  * [[https://bitbucket.org/M_Janssen/picard/raw/32393f15cd86f83cfc642b4d12fb616aab08f77c/documentation/picard_documentation.pdf|picard/documentation/picard_documentation.pdf]]
casa/install.1604062187.txt.gz · Last modified: 2020/10/30 12:49 by bemmel