diff --git a/README.md b/README.md index 4aeebb25176d5d6baaff5e436e797ad7bed6d9fb..e9a73780d10af690bc9581f910541bff5d043ed3 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 e2a9e7db0ad738efd447ae032429c461e64d9918..2fb28c166a88755dc9f06fb45804d0b59f16f43b 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():