Skip to content

Installation

Philip Maechling edited this page May 4, 2022 · 5 revisions

UCVM Plotting Installation

UCVM plotting requires to pre-conditions. First, it requires an installation of UCVM. Second, it requires a python2 installation. These are available on USC Discovery cluster.

The ucvm_plotting scripts are written in python2 and the conversion of these scripts to Python3 has not been done yet. They make use of libraries such as basemap which may not be supported, so significant modification to the scripts are needed.

UCVM_plotting Python2 scripts will use the ucvm c-language executables, using the UCVM C API.

The ucvm_plotting scripts have an additional complication in that they use X-windows to display the resulting plots. Ways to display x-windows on systems varies significantly by the system in use. The use of X-windows can be avoided by writing the UCVM plots to *.png files, then displaying the png files with appropriate (non x-windows) utilities.

Overview of Installation

  1. Install Anaconda Python3 on yoru system
  2. Install UCVM on system.
  3. Install Python2 on the system
  4. Move to the UCVM binary directory and clone the ucvm_plotting repo
  5. Build ucvm_plotting
  6. activate python2 environment with command # conda activate python2
  7. run plotting scripts
  8. conda deactivate python3 to return to the more standard python3 environment

Adding Python2 to Python3 anaconda installation

  1. create conda environment
  • conda create -n python2 python=2.7 scipy pip numpy matplotlib basemap basemap-data-hires

Building ucvm_plotting

The run-tests script provides good examples of how to create plots using command line parameters and output the results to png files.

To Change back to python3 environment

  • conda deactivate