Skip to main content

Smart MCA for DT5771 Python Library

Project description

SmartMCA for Caen DT5771

This library allows to interface user code with the Caen DT5771 MCA Firmware.

With the library it is possible to:

  • Connect to the MCA
  • Configure high-level MCA/PSD processing parameters
  • Start, stop reset 1D and 2D spectra
  • Dump waveforms

Code Example

from smartmca import SmartMCA
from smartmca import ConfigMCA, ConfigIO


mca = SmartMCA()

mca.connect("http://192.168.102.120", "user", "password")
# or mca.connect("http://localhost", "user", "password") if used on
# integrated jupiterlab

mca.get_server_status()

config = mca.get_mca_configuration()

config.trigger_mode = ConfigMCA.TriggerMode.INTERNAL
config.le_threshold = 5000
config.trigger_type = ConfigMCA.TriggerType.LEADING_EDGE

mca.set_mca_configuration(config)


y= mca.oscilloscope_get_data(enable_trace_processing=False)
plt.plot(y.channels[0].analog)
plt.show()

mca.histogram_start()

time.sleep(5)

stats = mca.get_mca_statistics()
print(stats)

x, counts = mca.histogram_get(rebin=16)
#plot x
plt.plot(x)
plt.show()

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

smartmca-0.0.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

smartmca-0.0.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file smartmca-0.0.4.tar.gz.

File metadata

  • Download URL: smartmca-0.0.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for smartmca-0.0.4.tar.gz
Algorithm Hash digest
SHA256 613cdc1a69a9c5753ef797813ff5518f5b29e00c12c1621c9bb121c1aace6e35
MD5 f971fe664ff2709a7c3a48e72d3a261c
BLAKE2b-256 cc3b713ef64831c49480c66daaf18c02ff32392a5d92e07dc5dc5135f85420e9

See more details on using hashes here.

File details

Details for the file smartmca-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: smartmca-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.0

File hashes

Hashes for smartmca-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fad5fa88e52cfabc9f84fb0a03bc417cd3c6b8abd792fed5600608ae1a5195ff
MD5 720148531e96373b8bc882a83b9f4682
BLAKE2b-256 abd355c6b4b48195f2d67d0b03567f68d7c11bae38521965141267f49de70005

See more details on using hashes here.

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