Multi-PIP Analysis Suite

Open source python module designed for Multi-PIP Impedance data analysis

Current Version

Python: Setup

The Python Multi-PIP Analysis Suite uses Anaconda and the Spyder IDE to provide a completely open source platform for plant impedance data analysis.

Install Anaconda

  1. Visit the Anaconda install site and download the the correct Anaconda installer for your operating system.

  2. Follow the installation guide for your operating system to install Anaconda.

(Optional but recommended) Create Anaconda environment

For those seeking not to disrupt previously installed Python libraries and interpreters on their system, Conda environments allow for the isolation of the tools the Analysis Suite needs to operate. While this step is not necessary, it is recommended. For more information, please visit this website on Conda environments.

  1. Visit the Conda managing environments page and follow the instructions for your operating system to set up a Conda environment on your computer.

  2. Remember that the environment needs to be activated for future use.

Open Spyder IDE

Spyder IDE is an open source scientific Python development environment that comes with Anaconda, not unlike MATLAB. The examples included in the Multi-PIP analysis suite were written in Spyder, and so we recommend using Spyder to get started.

  1. Open the Anaconda Navigator application. It should look like the image below

    AnacondaNavigator (1)
  2. Find the Spyder application in the navigator and click on ‘Launch’.

    SpyderInCondaNavigator
  3. Congratulations, you have successfully installed Anaconda and opened Spyder IDE! You are now ready to download the Multi-PIP analysis suite.

Download and Open the Multi-PIP Analysis Suite

  1. Download the latest python Multi-PIP analysis suite (provided at the top of this page). The content will come in a .zip file.

  2. Unzip the content to the desired location on your computer. It is important that you unzip the file somewhere other than your downloads, as unzipping to downloads will cause some problems.
    The “examples” directory contains example python scripts and an example data file.
    The “src” directory contains the custom packages for the Multi-PIP analysis suite.

Read the documentation

Within the top level directory analysis-python_analysis_suite_vX_X, there is a README.md file, which can be opened with any generic text editor. The README describes, in brief, the contents of the Multi-PIP Analysis Suite and need-to-know functionalities for usage and development.

Take the time to read through the README (~3 minutes) before proceeding with this guide.

Open and run an example in the Multi-PIP Analysis Suite

  1. We are going to run ‘ex_plot_impedance_vs_time.py’, which plots impedance versus time. In Spyder, navigate to ‘FileOpen’. From there, find the python analysis suite and navigate inside of the ‘examples’ folder. Double click on ‘ex_plot_impedance_vs_time.py’. You should see something similar to the image below.

    RunFirstExampleSpyder

    The text inside the triple quotation marks “““ contains a description of the example.
    Individual lines of code are explained in comments following the '#' symbol.

  2. All examples work out of the box. Navigate to ‘RunRun’ or hit the green triangle in the toolbar. If this is your first time running Spyder, it will prompt you with a popup when you first click ‘Run’. If this happens, just click ‘Run’.

  3. The example prints status messages to the console window which appears in the lower right window of Spyder by default. for this example, you should see something similar to the image below.

    FirstExampleConsole

     

  4. Spyder also provides in application plot viewing. In the upper right hand window you should see some tabs like : ‘Variable Explorer’, ‘Help, ‘Plots’, and ‘Files’. Click on the ‘Plots’ tab. You should see something like the image below.

    FirstExamplePlots

    You can scroll through all the plots the code generates on the right side of the window. Click on the plot you want to see to have shown bigger to the left.

  5. This example saves all the figures this example generates to a pdf file in the same directory as the example. Navigate to the ‘examples' directory and double click on ‘impedance_vs_time_test_data.pdf’, this should open the pdf file containing all your impedance versus time plots.

  6. Congratulations, you have just run your first Multi-PIP analysis example! Explore the examples in the examples directory to further familiarize yourself with the Multi-PIP library.

  7. If something goes wrong in the process of running the script, the error message will be printed to the Spyder console.

Once you have begun collecting data on your own (see and ) and want to run custom scripts that utilize the Multi-PIP analysis suite, please bear the following things in mind.

  1. The example scripts are set up so that they reference the example data file that is contained within the examples directory. If data is located in a different directory than the script that is trying to load it, the proper path to the file must be passed into the load function.

    Example:
    The script sample_script.py is trying to load the sample_data.csv data file. sample_script.py is located in (C:// or ~/) Example/Scripts/sample_script.py and the data file is in
    (C:// or ~/) Example/Data/sample_data.csv.

    Windows Users:
    One correct approach is to use the relative path

    file='..\\Data\\sample_data.csv'

    Another correct approach is to use the absolute path to the data file.

    file='C:\\Example\\Data\\sample_data.csv' 

    Example for OSX/Linux Users:
    One correct approach is to use the relative path

    file='../Data/sample_data.csv'

    Another correct approach is to use the absolute path to the data file.

    file='~/Example/Data/sample_data.csv' 
  2. As in MATLAB, once you create your own scripts outside of the examples directory, you will need to update your working directory (circled in pink below) in Spyder. Do this by clicking the folder icon at the top right side of your Spyder window (circled in red below) and navigating to the directory of your choice.

    When you change your working directory, you will need to include the following lines of code in your script if you want to access the Multi-PIP analysis suite.

    from pathlib import Path import sys include_path = "(PATH TO ANALYSIS DIRECTORY)/src" sys.path.append(str(Path(include_path))) from MP_analysis_suite import *


    Where (PATH TO ANALYSIS DIRECTORY) is the relative or absolute directory path to the extracted Multi-PIP analysis suite.

    Relative path example:
    (If your analysis script is stored in C://Example/custom/scripts and the analysis suite is in C://python_analysis_suite/python/)

    from pathlib import Path import sys include_path = '../../../python_analysis_suite/python/src' sys.path.append(str(Path(include_path))) from MP_analysis_suite import *


    Absolute path example:
    (If the analysis suite is located in C://python_analysis_suite/python/)

    from pathlib import Path import sys include_path = 'C://python_analysis_suite/python/src' sys.path.append(str(Path(include_path))) from MP_analysis_suite import *


    If you will be working from more than one directory running different scripts, it is convenient to use the absolute path approach. You will not have to change your code if you switch working directories.

  3. If you have any questions, please visit support.growvera.com or contact the Growvera support team.

Old Versions

Version

Recommended Environment

Download

Python Multi PIP Analysis Suite 1.7

Spyder

Python Multi PIP Analysis Suite 1.6

Spyder

Python Multi PIP Analysis Suite 1.5

Spyder

Python Multi PIP Analysis Suite 1.4

Spyder

Python Multi PIP Analysis Suite 1.3

Spyder

Python Multi PIP Analysis Suite 1.2

Spyder

Python Multi PIP Analysis Suite 1.1

Jupyter

For any questions regarding the analysis suite, please contact the Growvera support team.