Navigation

Previous topic

Part 2: CODAS Compilation

Next topic

Windows paths and environment variables

This Page

Setting up paths for unix (any flavor; “not Windows”)

In your .cshrc (or .bashrc, or wherever you keep your shell setup instructions) add to your path the location of the executables for your machine: this includes the binary executables, and the locations of executable and python scripts. If you were to install everything under /home/adcp_programs, you would add the following to your path (path to binaries first, then add path to python code):

Python

  1. python programs:

    • /home/adcp_programs/pycurrents/adcp (for quick_adcp.py)
    • /home/adcp_programs/pycurrents/data/nmea (for parsing NMEA data)
  2. PYTHONPATH

    To use quick_adcp.py, you will need to add this and only this location to your PYTHONPATH environment variable:

    • /home/adcp_programs
  3. To run a Python script, type :

python program.py

Matlab

  1. MATLABPATH

    You should also add the location of the matlab directory which was extracted from matlab.zip to your MATLABPATH. Specifically, add the following to the MATLABPATH environment variable:

    • /home/adcp_programs/matlab
  2. Running programs

    Any time you run matlab programs you should type the following to add the appropriate programs to your path. Alternatively, you can put these commands in your ~/matlab/startup.m file:

  • adcppath; radcppath; mexpath

DO NOT add any subdirectories of /home/adcp_programs/matlab (if using the path tool in matlab, do not add the /home/adcp_programs/matlab diretory recursively); only add the directory itself.

IMPORTANT: Add a link from /usr/local/bin/matlab to your matlab executable or quick_adcp.py will not be able to start matlab.

IMPORTANT: See this link for more information about the mex file “table1” we use for linear interpolation. This is important to get right and becomes more difficult with each new matlab release.