This is my personal python library and contains functions that I've developed, borrowed, or wrapped for my personal use.
Follow these steps to install this library. Additional details are below.
- Make sure the MDSplus library is installed and in the python path.
- Clone this (johnspythonlibarary2) library. Make sure its directory is in the PYTHONPATH environment variable.
- (Optional) To use the Hbtep sublibrary, you must copy Readwrite/_settingsTemplate.py, save it as ReadWrite/_settings.py, and fill in the variables.
- (Optional) To store (mostly Hbtep) data locally on your machine, copy Hbtep/Get/_settingsTemplate.py, save it as Hbtep/Get/_settings.py, and fill in the variables.
Note that these are the steps that I used. Check the website to make sure you use the latest and most relevant commands.
1. Download and install MDSplus as discussed here
apt-get -y install curl gnupg && curl -fsSL http://www.mdsplus.org/dist/mdsplus.gpg.key | apt-key add -
sudo sh -c "echo 'deb http://www.mdsplus.org/dist/Ubuntu18/repo MDSplus stable' > /etc/apt/sources.list.d/mdsplus.list"
sudo apt-get update
sudo apt-get install mdsplus-python
sudo apt-get upgrade "mdsplus*"
Follow the steps here: Ref. 1
If using virtualenv, these steps need to be modified as shown here: Ref. 2
Within your virtualenv, do the following:
- mkdir $VIRTUAL_ENV/src
- mkdir $VIRTUAL_ENV/src/python-mdsplus
- cp -rp /usr/local/mdsplus/python/MDSplus $VIRTUAL_ENV/src/python-mdsplus
- python $VIRTUAL_ENV/src/python-mdsplus/./setup.py install