Skip to main content

This is a package that connects ImSwitch's REST API to the rest of the world (e.g. jupyter lab)

Project description

ImSwitchClient

PyPI Version Build Status Documentation Status Updates

This is a package that connects ImSwitch's REST API to the rest of the world (e.g. jupyter lab)

Install

pip install imswitchclient

Features

Example

#%%
#%%
import imswitchclient.ImSwitchClient as imc 
import numpy as np
import matplotlib.pyplot as plt
import cv2


stageName=None
scanMax=100
scanMin=-100
scanStep = 50
rescalingFac=10.0
gridScan=True


# Instantiate the ImSwitchClient
client = imc.ImSwitchClient()
#%%
# Test the get_positioner_names method
positioner_names = client.positionersManager.getAllDeviceNames()
print("Positioner Names:", positioner_names)
#%%
#
# Test the move_positioner method
positioner_name = positioner_names[0]
axis = "X"
dist = 1000
is_absolute = True
is_blocking = False

response = client.positionersManager.movePositioner(positioner_name, axis, dist, is_absolute, is_blocking)
print("Move Positioner Response:", response)

#%%
# Test the snap_numpy_to_fastapi method
image_array = client.recordingManager.snapNumpyToFastAPI()
print("Image Array Shape:", image_array.shape)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imswitchclient-0.1.1.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

imswitchclient-0.1.1-py2.py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page