Skip to main content

PyIgor

PyIgor facilitates communication between Python and WaveMetrics Igor Pro, enabling seamless data and command exchange.

Requirements

  • Igor Pro 7.0 or later: Ensure you have Igor Pro 7.0 or a newer version installed.
  • HDF5 XOP: Install the HDF5 XOP module. Detailed installation instructions are available in the "HDF5 installation" section under Igor Pro's help topics.
  • PyIgor Procedure File: Download the pyigor.ipf file from GitHub and place it in the Igor Procedures folder for convenience.

Installation

To install PyIgor, use the following pip command:

pip install pyigor

Usage

Note: Ensure Igor Pro is running before executing these commands. If Igor Pro is not already running, the commands will start Igor Pro and pause until the process completes.

Accessing Igor Pro from Python

Here’s how you can interact with Igor Pro using PyIgor:

from pyigor import Connection
import numpy as np

# Establish a connection with Igor Pro
igor = Connection()

# Send a numpy array to Igor Pro
array = np.sin(np.linspace(0, 10, 100))
igor.put(array, "sinwave")

# Execute a command in Igor Pro
igor("sinwave += 1")

# Retrieve a wave from Igor Pro
wv = igor.get("sinwave")
print(wv.array)

Accessing Python from Igor Pro

Preparing Python

from pyigor import Connection

# Establish a connection
igor = Connection()

# Register a function callable from Igor Pro
@igor.function 
def myfunc(a):
    return a * a

# Keep the connection open; not required in interactive mode
igor.wait_done()

Use the Connection(security_hole=True) option to call any Python code from Igor Pro. This setting allows executing Python code through HTTP requests to http://localhost/code using eval(code). Important: Use this option only if you understand the security implications.

Calling Python Functions from Igor Pro

Execute Python functions registered via PyIgor from Igor Pro:

print PyIgorCall("myfunc(10)")

Security Note

When enabling security_hole=True, ensure your environment is secure and understand the risks associated with executing arbitrary code.

Contributors

A special thanks to the people who have contributed to this project:

Metadata

Release files for pyigor 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyigor 0.2.3
File Size Uploaded Provenance Actions
pyigor-0.2.3.tar.gz 6.5 kB Without provenance Details for pyigor-0.2.3.tar.gz

Release files / pyigor-0.2.3.tar.gz

Download URL pyigor-0.2.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4b4439780e81329bd0c24e3c6b8649fbf93feb13810689ac84bf79df4cb5d27
BLAKE2b-256 checksum
How to use checksums
efe0b96b36f28d7bf271639603e709316aa7d4ea5c0adebae6a05b73b1ad649e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.19

Security for pyigor 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page