Current Version

python_analysis_suite_v1_5.zip

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) 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. For most users, this step is not necessary. 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

  2. Find the Spyder application in the navigator and click on ‘Launch’.

  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.

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 ‘File → Open’. 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.

    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 ‘Run → Run’ or simply 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.

  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.

    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. 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 Syder. 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 *
    PY


    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 *
    PY


    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 *
    PY


    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.

  8. If you have any questions, please visit support.microceres.com or contact the Microceres support team.

Old Versions

Version

Recommended Environment

Download

Python Multi PIP Analysis Suite 1.5

Spyder

python_analysis_suite_v1_5.zip

Python Multi PIP Analysis Suite 1.4

Spyder

python_analysis_suite_v1_4.zip

Python Multi PIP Analysis Suite 1.3

Spyder

python_analysis_suite_v1_3.zip

Python Multi PIP Analysis Suite 1.2

Spyder

python_analysis_suite_v1_2.zip

Python Multi PIP Analysis Suite 1.1

Jupyter

python_analysis_suite_v1_1.zip

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