Python Integration (Stat-Ease 360® only)

This page documents the different functions available in the statease Python module. The module is available on pypi.org, and can be installed with the Python package manager command, pip install statease. If you have not yet done this, you will need to follow the instructions in the Python Introduction tutorial. This will guide you through the process of installing the module, as well as configuring Stat-Ease to use the correct Python environment.

Running a Python Script

There are several ways to run a Python script in SE360.

The recommended method is to simply open the script dialog via the Python button in the main toolbar. From there you can open your script, or create a new one. The dialog includes an editor with syntax highlighting and an output window.

You can also use the included dx_console.exe executable to process a script from the command line. Simply pass the Python script you want to run as a parameter and it will run immediately.

"C:\Program Files\Stat-Ease 360\dx_console.exe" example.py

Finally, you can use dx_console.exe to run in “listen” mode by passing –listen as an argument. This will wait for a Python script running from an external interpreter (e.g. from another terminal, or from the JetBrains IDE) to connect and execute.

"C:\Program Files\Stat-Ease 360\dx_console.exe" --listen

Connecting to Stat-Ease 360

In order to interact with Stat-Ease, you first need to connect to it using the statease.connect() function. This will create a statease.SEClient instance that you will want to store. It is used for high-level interaction with Stat-Ease.

Design Properties

These functions allow you to interact with factors and responses in Stat-Ease, as well as other properties of the current design.

Factors

Responses

Analyses

Optimizer

Samples

multiple-plots.py

poisson-variation.py (uses organism-count.dxpx)

weibull-regression.py