From 1eaafc62a1a035019a667622c1c553b2da16100a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Quast?= <guenter.quast@online.de> Date: Fri, 21 Jun 2024 18:45:42 +0200 Subject: [PATCH] some improvements --- README.md | 95 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 2b10708..89a646d 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,19 @@ analyzer can be realized on this board by simply changing the FPGA image and the {width=800px} -The MCPHA application for the RedPitaya by Pavel Demin provides a multi-channel pulse-height analyzer as -well as an oscilloscope application capable of transferring large data reates reaching the theoretical -limit of the 1Gb port. The package consists of an FPGA image and a server process running on the -RedPitaya board. A client script controls the server and pulls the data to the client computer. +The MCPHA application by Pavel Demin provides a multi-channel pulse-height analyzer as +well as an oscilloscope capable of transferring large data rates reaching the theoretical +limit of the Gbit ethernet port. The package consists of an FPGA image and a server process +running on the RedPitaya board. A client script controls the server and pulls the data +to the client computer. -This package extends the original one by a possibility to record or export waveform data and -provides helper scripts to analyze recorded spectra or to read exported waveform data. An -interface to the buffer manager *mimoCoRB* for buffering and parallel processing of large -date volumes is also provided. +The package provided here extends the original one by a possibility to record or export +waveform data and provides helper scripts to analyze recorded spectra or to read exported +waveform data. An interface to the buffer manager *mimoCoRB* for buffering and parallel +processing of large date volumes is also provided. -This package is in use for gamma-ray spectrography experiments in physics laboratory courses at -the faculty of physics at Karlsruhe Institute of Technology. +This package is in use for gamma-ray spectrography experiments in physics laboratory +courses at the Faculty of Physics at Karlsruhe Institute of Technology. ### Files: @@ -58,41 +59,53 @@ the faculty of physics at Karlsruhe Institute of Technology. ## Credit: *mcpha.py* is a fork of the sub-directory *projects/mcpha* in a project by -Pavel Demin, [red-pitaya-notes](https://pavel-demin.github.io/red-pitaya-notes), -*redPaq.py* represents an extension of the oscilloscope class enabling fast restart +Pavel Demin, [red-pitaya-notes](https://pavel-demin.github.io/red-pitaya-notes). +*redPdaq.py* is an extension of the oscilloscope class enabling fast restart and data export. +# Users' Guide + ## Multi-Channel Pulse-Height Analyzer for the RedPitaya FPGA board -A multi-channel pulse-height analyzer produces a histogram of the heights of pulses present in a signal supplied to the input. The MCPHA project uses the FPGA on the RedPitaya board to process the digitized input signal at very high rates. A server process on the ARM processor of the RedPitaya communicates with a client process via network. The client communicates with the server, starts and stops data recording and receives and displays the data. The client is also responsible for saving data to files. +A multi-channel pulse-height analyzer produces a histogram of the heights of pulses present +in a signal supplied to the input. The MCPHA project uses the FPGA on the RedPitaya board +to process the digitized input signal at very high rates. A server process on the ARM +processor of the RedPitaya communicates with a client process via network. The client +communicates with the server, starts and stops data recording and receives and displays +the data. The client is also responsible for saving data to files. -The original version by Pavel Demin has been modified to better meet the usual standards for graphics -displays in physics. A command line interface has also been added to allow easy control of important -parameters at program start. +The original version by Pavel Demin has been modified to better meet the usual standards +for graphics displays in physics. A command line interface has also been added to allow +easy control of important parameters at program start. -A special version of the original oscilloscope display, *redPdaq.py*, with fast transfer of data to the client for data acquisition applications is also contained in this extended package. +A special version of the original oscilloscope display, *redPdaq.py*, with fast transfer +of data to the client for data acquisition applications is also contained in this extended +package. ### Basic functionality -The *mcpha* application uses a rather simple, but straight-forward algorithm to determine the -height of pulses. When the signal voltage of a supplied input signal starts rising, the corresponding -ADC count is stored. A second ADC value is stored when the signal level starts falling again, and the difference of these two ADC values is histogrammed. The histogram is transferred to the client upon request. - -The *mcpha* application also contains a signal generator that runs independently and parallel to the -pulse-height analyzer. It provides configurable signal shapes and signal rates at the *out1* connector -of the RedPitaya board. Connecting *out1* with a (short) cable to one of the inputs *in1* or *in2* -provides input signals that can be be used to familiarize with the functionality and to benchmark -the performance. - -An oscilloscope with very basic functionality to set the trigger level and direction is also provided. -The timing is controlled by the so-called decimation factor that can be adjusted using the control -in the upper right corner of the graphical window. The RedPitaya samples data at a constant rate -of 125 MHz, and the decimation factor determines how many samples are averaged over and stored -in the internal ring buffer. This reduces the effective sampling rate accordingly. Only decimation -factors corresponding to powers of two are allowed. An example of randomly occurring exponential -signal pulses at an average rate of 10 kHz with a fall time of 10 µs is shown below; there is significant +The *mcpha* application uses a rather simple, but straight-forward algorithm to determine +the height of pulses. When the signal voltage of a supplied input signal starts rising, +the corresponding ADC count is stored. A second ADC value is stored when the signal level +starts falling again, and the difference of these two ADC values is histogrammed. The +histogram is transferred to the client upon request. + +The *mcpha* application also contains a signal generator that runs independently and parallel +to the pulse-height analyzer. It provides configurable signal shapes and signal rates at the +*out1* connector of the RedPitaya board. Connecting *out1* with a (short) cable to one or both +of the inputs *in1* or *in2* provides input signals that can be be used to familiarize with +the functionality and to benchmark the performance. + +An oscilloscope with very basic functionality to set the trigger level and direction is also +provided. The rate of samples transferred to the client is controlled by the so-called decimation +factor that can be adjusted using the control in the upper right corner of the graphical window. +The RedPitaya board samples data at a constant rate of 125 MHz, and the decimation factor determines +how many samples are averaged over and stored in the internal ring buffer. This reduces the e +ffective sampling rate accordingly. Only decimation factors corresponding to powers of two are +allowed. An example of randomly occurring exponential signal pulses at an average rate of 10 kHz  +with a fall time of 10 µs is shown below; there is significant signal overlap in this case, making pulse-height detection more complex. {width=800px} @@ -125,13 +138,13 @@ An examples of call-back functions callable from within redPdaq is provided with calculates and displays statistics on trigger rate and data volume -*redP_mimocorb.py* is script containing code to be started from the command line and -a function, *redP_to_rb* called as sub-process within the *mimiCoRB* frame-work -for more advanced data analysis tasks requiring multiple processes running in parallel. -A *mimoCoRB* setup-file is also provided and can be started by running -typing `redP_mimoCoRB.py setup.yaml` on the command line. Modules and configuration -files for a pulse-height analysis of recorded signals are contained as exampless -in the sub-directories *modules/* and *config/*, respectively. +*redP_mimocorb.py* is a script containing code to be started from the command line and +a function defined in the script, *redP_to_rb*, is called as sub-process within the +*mimiCoRB* buffer manager frame-work for more advanced data analysis tasks requiring +multiple processes running in parallel. A *mimoCoRB* setup-file is also provided and can +be started by running typing `redP_mimoCoRB.py setup.yaml` on the command line. Modules +and configuration files for a pulse-height analysis of recorded signals are contained +as exampless in the sub-directories *modules/* and *config/*, respectively. ## Installation -- GitLab