Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
redpitaya-MCPHA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Günter Quast
redpitaya-MCPHA
Commits
4c3080e6
Commit
4c3080e6
authored
1 year ago
by
Guenter Quast
Browse files
Options
Downloads
Patches
Plain Diff
improved Docu
parent
a409ffff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+8
-6
8 additions, 6 deletions
README.md
redPosci.py
+9
-9
9 additions, 9 deletions
redPosci.py
with
17 additions
and
15 deletions
README.md
+
8
−
6
View file @
4c3080e6
...
...
@@ -87,10 +87,13 @@ to a single detected pulse.

Note that spectra and waveforms are plotted with a very large number channels, well exceeding the
resolution of a computer display. It is therefore possible to use the looking-glass button of the
*matplotlib*
window to mark regions to zoom in for a detailed inspection of the data.
## Oscilloscope and data recorder
The script
*redPosci.py*
relies on the same server and FPGA image as the pulseheight analyzer.
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 data acquisition for the the
oscilloscope independently of the Qt timing loop, i. e. in continuous mode. As soon as data is
...
...
@@ -98,13 +101,12 @@ received by the client, the oscilloscope is restarted immediately. A dummy routi
*processData()*
ist provided as an illustration; right now, it shows a graphical display once
per second and calculates and displays the trigger and data rates.
It is possible to transfer data over a 1Gbit network with a rate of 50 MB/s or about
to 500 waveforms/s.
It is possible to transfer data over a 1Gbit network with a rate of 50 MB/s or about 500 waveforms/s.
## Installation
The sub-directory
*RP-image*
contains files to be transferred to a SD card for the RedPitaya board.
To get started, p
roceed as follows:
P
roceed as follows:
-
copy the contents of the directory
*RP-image*
to an empty SD card formatted as VFAT32.
-
connect the RedPitaya to the network via the LAN port
...
...
@@ -133,7 +135,7 @@ where *xxxxxx* is are the last six characters of the ethernet MAC address.
If a usb-to-ethernet adapter is used and a dhcp server on the client computer is enabled for the
interface, a one-to-one connection of the RedPitaya to a host computer can easily be established;
use the name
*rp-xxxxxx.local*
in this case. How to set up a dhcp server for a usb-to-ethernet
use the name
*rp-xxxxxx.local*
in this case. How to set up a
*
dhcp
*
server for a usb-to-ethernet
adapter depends on the operating system used on the client; please check the relevant
documentation for you system.
...
...
@@ -183,7 +185,7 @@ Note that presently mcpha.py exports data in human-readable format using
> *read_hst.py* illustrates how to read and plot spectrum data exported by mcpha.py.
> *read_osc.py* demonstrates how to read and plot waveform dat
e
exported from the
> *read_osc.py* demonstrates how to read and plot waveform dat
a
exported from the
oscilloscope tab of mcpha.py.
...
...
This diff is collapsed.
Click to expand it.
redPosci.py
+
9
−
9
View file @
4c3080e6
...
...
@@ -382,9 +382,9 @@ class OscDisplay(QWidget, Ui_OscDisplay):
# initialize variables
self
.
rpControl
=
rpControl
self
.
log
=
log
self
.
tot
=
self
.
rpControl
.
sample_size
self
.
pre
=
self
.
rpControl
.
pretrigger_fraction
*
self
.
tot
self
.
buffer
=
np
.
zeros
(
self
.
tot
*
2
,
np
.
int16
)
self
.
l_
tot
=
self
.
rpControl
.
sample_size
self
.
pre
=
self
.
rpControl
.
pretrigger_fraction
*
self
.
l_
tot
self
.
buffer
=
np
.
zeros
(
self
.
l_
tot
*
2
,
np
.
int16
)
# create figure
self
.
figure
=
Figure
()
if
sys
.
platform
!=
"
win32
"
:
...
...
@@ -395,7 +395,7 @@ class OscDisplay(QWidget, Ui_OscDisplay):
self
.
plotLayout
.
addWidget
(
self
.
canvas
)
self
.
ax
=
self
.
figure
.
add_subplot
(
111
)
self
.
ax
.
grid
()
self
.
ax
.
set_xlim
(
-
0.02
*
self
.
tot
,
1.02
*
self
.
tot
)
self
.
ax
.
set_xlim
(
-
0.02
*
self
.
l_
tot
,
1.02
*
self
.
l_
tot
)
self
.
ax
.
set_ylim
(
-
4500
,
4500
)
self
.
xunit
=
"
[{:d} ns / sample]
"
.
format
(
4
*
8
)
self
.
ax
.
set_xlabel
(
"
sample number
"
+
self
.
xunit
)
...
...
@@ -413,7 +413,7 @@ class OscDisplay(QWidget, Ui_OscDisplay):
self
.
osctxt
=
self
.
ax
.
text
(
0.1
,
0.96
,
'
'
,
transform
=
self
.
ax
.
transAxes
,
color
=
"
darkblue
"
,
alpha
=
0.7
)
x
=
np
.
arange
(
self
.
tot
)
x
=
np
.
arange
(
self
.
l_
tot
)
(
self
.
curve2
,)
=
self
.
ax
.
plot
(
x
,
self
.
buffer
[
1
::
2
],
color
=
"
#00CCCC
"
,
label
=
"
chan 2
"
)
(
self
.
curve1
,)
=
self
.
ax
.
plot
(
x
,
self
.
buffer
[
0
::
2
],
...
...
@@ -493,7 +493,7 @@ class OscDisplay(QWidget, Ui_OscDisplay):
self
.
rpControl
.
set_trg_slope
(
self
.
trg_slope
)
self
.
rpControl
.
set_trg_level
(
self
.
trg_level
)
self
.
rpControl
.
set_osc_pre
(
self
.
pre
)
self
.
rpControl
.
set_osc_tot
(
self
.
tot
)
self
.
rpControl
.
set_osc_tot
(
self
.
l_
tot
)
def
set_gui4start
(
self
):
self
.
startButton
.
setText
(
"
Start
"
)
...
...
@@ -574,7 +574,7 @@ class OscDisplay(QWidget, Ui_OscDisplay):
self
.
Nprev
=
self
.
NTrig
T_active
=
t
-
self
.
T0
self
.
dT
=
0.
status_txt
=
"
active: {:.1f}s trigger rate: {:.2f} Hz, data rate: {:.4g} MB/s
"
.
format
(
T_active
,
r
,
4
*
r
*
len
(
chan1
)
*
1
e-6
)
status_txt
=
"
active: {:.1f}s trigger rate: {:.2f} Hz, data rate: {:.4g} MB/s
"
.
format
(
T_active
,
r
,
r
*
self
.
l_tot
*
4
e-6
)
print
(
status_txt
,
end
=
'
\r
'
)
self
.
osctxt
.
set_text
(
status_txt
)
# update graph on display
...
...
@@ -602,8 +602,8 @@ class OscDisplay(QWidget, Ui_OscDisplay):
x
=
int
(
event
.
xdata
+
0.5
)
if
x
<
0
:
x
=
0
if
x
>=
self
.
tot
:
x
=
self
.
tot
-
1
if
x
>=
self
.
l_
tot
:
x
=
self
.
l_
tot
-
1
y1
=
self
.
curve1
.
get_ydata
(
True
)[
x
]
y2
=
self
.
curve2
.
get_ydata
(
True
)[
x
]
self
.
timeValue
.
setText
(
"
%d
"
%
x
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment