A Python interface to Scanivalve MPS4264.
pip install -U git+https://github.com/sustain-lab/scanivalve-mps-python
MPS_HOST environment variables must be set
to the IP address of the sensor (see label on the bottom side).
For example:
export MPS_HOST=191.30.90.1
The instrument must be connected and powered to run the tests succesfully.
pytest -v scanivalve_mps/tests.py
from datetime import datetime
import os
from scanivalve_mps.mps import MPS
host = os.environ['MPS_HOST']
mps = MPS(host)
mps.set_time(datetime.utcnow())
print('Zero calibration...')
mps.calibrate_zero()
# set up the scan parameters
mps.set_format('csv')
mps.set_scan_units('PA')
mps.set_frames_per_scan(100)
mps.set_rate(10)
mps.scan_to_csv('test_run.csv')
mps.disconnect()-
MPS.bootloader_version() -
MPS.calibrate_zero() -
MPS.get_scan_start_time() -
MPS.get_time() -
MPS.scan() -
MPS.scan_to_csv(filename) -
MPS.set_format(format_code) -
MPS.set_frames_per_scan(fps) -
MPS.set_rate(rate) -
MPS.set_scan_units(units) -
MPS.set_time(time) -
MPS.status() -
MPS.stop() -
MPS.stream(frames) -
MPS.version()