Skip to content
Snippets Groups Projects
Commit 796fcc32 authored by Guenter Quast's avatar Guenter Quast
Browse files

added peakFitter.py to documentation

parent e20db0e4
No related branches found
No related tags found
No related merge requests found
......@@ -40,15 +40,15 @@ the server and pulls the data to the client computer.
- *mcpha_log.ui* qt5 tab for message display
- RP-image directory with all files necessary to boot a RedPitaya and start the server
application based on the "small, simple and secure" linux distribution
[alpine-3.18-armv7-20240204](https://github.com/pavel-demin/red-pitaya-notes/releases/tag/20240204)
[alpine-3.18-armv7-20240204](https://github.com/pavel-demin/red-pitaya-notes/releases/tag/20240204)
- utility scripts in the sub-directory *helpers/*
## Credit:
This project essentially 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).
*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), *redPoscdaq.py* represents an
extension of the oscilloscope class enabling fast restart and data export.
## Multi-Channel Pulse-Height Analyzer for the RedPitaya FPGA board
......@@ -100,7 +100,7 @@ of the *matplotlib*window to mark regions to zoom in for a detailed inspection o
The script *redPosci.py* relies on the same server and FPGA image as the pulse-height analyzer.
The *oscilloscope* and *generator* tabs provide the same functionality as in *mcpha.py*.
In addition, however, there is a button "*Start DAQ*" to run the oscilloscope in data acquisition
mode, i.e. continuously. A subset of the data is shown in the oscilloscope display,together with
mode, i.e. continuously. A subset of the data is shown in the oscilloscope display, together with
information on the trigger rate and the transferred data volume. A configurable user-defined function
may also be called to analyse and store the recorded waveforms.
It is possible to transfer data over a one-Gbit network from the RedPitaya with a rate of 50 MB/s
......@@ -186,15 +186,15 @@ Then, on the client side:
The directory *helpers/* contains helper scripts to read and visualize data from
files written by *mcpha.py*, for both spectrum histograms and exported waveforms.
Note that presently mcpha.py exports data in human-readable format using
*numpy.savetxt()*
*numpy.savetxt()*.
> *generate_spectrum_input.py* is a script to to generate input spectra for the signal
generator of mcpha.py The convention is to use 4096 channels for a range from 0 to 500 mV.
Pulse heights are drawn randomly from this spectrum, and pulses are formed according to the
frequency and the rise and fall times specified in the graphical interface. The signals are
available at the *out1* connector of the RedPitaya board.
Pulses can be generated at a fixed frequency, or with random timing corresponding to a
>
> Pulses can be generated at a fixed frequency, or with random timing corresponding to a
Poisson process with a mean pulse rate given by the chosen frequency. The latter option is
useful to study "pile-up" effects from overlapping pulses.
......@@ -203,6 +203,13 @@ Note that presently mcpha.py exports data in human-readable format using
> *read_osc.py* demonstrates how to read and plot waveform data exported from the
oscilloscope tab of mcpha.py.
## Examples
The directory *examples/* contains some spectra recorded with *mchph.py* and the Python
program *peakFitter.py* to find and precisely fit peaks in recorded spectra. An example is
shown here:
![Spectrum with fitted peaks](images/Spectrum.png){width=800px}
## License
......@@ -211,6 +218,5 @@ Like the original code by Pavel Demin, this open-source code is provided under t
## Project status
This project has been developed for experiments in the physics lab courses at the Faculty of
Physics at Karlsruhe Institute of Technology. Presently, the code is under test. A public
β-release is in preparation.
This project has been developed for experiments in the physics lab courses at the Faculty of Physics
at Karlsruhe Institute of Technology. The code is already public, but presently still under test.
images/Spectrum.png

160 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment