From bde955b74175834369b353b20e1a01d4ede12a13 Mon Sep 17 00:00:00 2001 From: Christian Koernig <ckoernig@mail.desy.de> Date: Wed, 30 Jun 2021 11:53:24 +0200 Subject: [PATCH] fixed some typos --- README.md | 4 ++-- examples/simple_connection.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4aeebb2..e9a7378 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ AmptekHardwareInterface ======================= Implementation of [Amptek's](https://www.amptek.com) DP5 Protocol for controlling PX5/DP5 Digital Pulse Processors. The code is tested with both, the PX5/XR-100 combination and the X-123 CdTe and SDD detectors. -The low level communication is implemented in C++ and supports both Ethernet via UDP and USB communication. A autogenerated high-level interface python as well as a Device Server for the [Tango Controls](https://www.tango-controls.org) SCADA system is available, allowing simple integration into many synchrotron beamlines. +The low level communication is implemented in C++ and supports both Ethernet via UDP and USB communication. A autogenerated high-level python interface as well as a Device Server for the [Tango Controls](https://www.tango-controls.org) SCADA system is available, allowing simple integration into many synchrotron beamlines. The low level implementation is based on [previous work](https://github.com/ALBA-Synchrotron/AmptekPX5DS) at the ALBA synchrotron. However, the communication layer has been completely redesigned for more stability and added support for USB connections, circumventing the bottleneck of the low speed base-10 ethernet PHY of the hardware. -This code is meant to be a mostly drop-in replacement of the original Tango server, therefore the same server name and many commands & attributes are used. So far, the SCA channels and the MCS mode is not implemented, if those are needed, the original code should be used. +This code is meant to be a mostly drop-in replacement of the original Tango server, therefore the same server name and many commands & attributes are used. So far, the SCA channels and the MCS mode are not implemented. If those are needed, the original code should be used. Additionally, a basic simulator interface can be used during DAQ logic development if no hardware is available. diff --git a/examples/simple_connection.py b/examples/simple_connection.py index e2a9e7d..2fb28c1 100644 --- a/examples/simple_connection.py +++ b/examples/simple_connection.py @@ -15,9 +15,9 @@ import amptek_hardware_interface as ahi # create the interface amptek = ahi.AmptekHardwareInterface() -# connect the intrerface via USB to the first DP5 device. +# connect the interface via USB to the first DP5 device. # To connect to a specific device, change the -1 to the serial number -# For basic tests, the simulator interface can be used, of no hardware is available. +# For basic tests, the simulator interface can be used if no hardware is available. # Use amptek.connectSimulator() instead amptek.connectUSB(-1) @@ -60,7 +60,7 @@ print("Acquisition started") while True: time.sleep(1) status = amptek.updateStatus(-1) - print("\rAccumulation Time: {:.2f}s, Fast Counts: {:d}, Slow Counts: {:d}".format( status.AccTime(), status.FastCount(), status.SlowCount() ), end="", flush=True) + print(f"\rAccumulation Time: {status.AccTime():.2f}s, Fast Counts: {status.FastCount():d}, Slow Counts: {status.SlowCount():d}", end="", flush=True) # test if finished if not status.IsEnabled(): -- GitLab