Skip to content
Snippets Groups Projects
Commit e6347756 authored by Günter Quast's avatar Günter Quast
Browse files

got rid of run_daq.py, now contained in redP_mimoCoRB.py

parent 2d9d064c
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ the faculty of physics at Karlsruhe Institute of Technology.
- *examples/peakFitter.py* code to find and fit peaks in spectum data
- *read_npy.py* a simple example to read waveforms saved in *.npy* format
- *redP_mimocorb.py* runs *redPdaq* as a client of the buffer manager *mimoCoRB*
- *run_daq.py* script to strat the *mimoCoRB* application
- *setup.yaml* coniguration script defining the *mimoCoRB* application
- *modules/* and *config/* contain code and configuration files for the *redP_mimoCoRB* application
- *mcpha.ui* qt5 graphical user interface for *mcpha* application
......@@ -125,11 +124,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 called as sub-process within the *mimiCoRB* frame-work
*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 *./run_daq setup.yaml*;
modules and configuration files for a pulse-height analysis of recorded signals are
contained in the subdirectories *modules/* and *config/*, respectively.
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
......
......@@ -5,18 +5,18 @@ Input data is provided as numpy-arry of shape (number_of_channels, number_of_sam
via callback of the __call__() function in class redP_mimoCoRB.
This script depends on redPdaq.py and is started as a sup-process within the mimoCoRB
framework. The detailes set-up of ring buffers and the associated funtions is specified
in a configuration file in *.yaml* format. The process suite is started using the script
start-up script from the *mimiCoRB* package, *run_daq.py*, a copy of which is provided
as part of this package.
framework. The detailed set-up of ring buffers and the associated funtions is specified
in a configuration file, *setup.yaml*. The process suite is started by running this
script from the command line, possibly specifying the name of the configutation file
as an argument.
As a demonstration, a configuration *setup.yaml* is contained in this package to
import waveforms from the RedPitaya, display a sub-set of the waveforms and perform
a pulse-height analysis with updating results shown as histograms.
To run this example, connect the out1 of the RedPitaya to one or both of the inputs,
type "./run_daq.py* and use the graphical interface to connect the RedPitaya to the
network, start the pulse generator, and finally press the *StartDAQ" button in the
oscilloscope tag to start data transfer to the *mimiCoRB* input buffer.
type "./redP_mimoCoRB.py* to run the example and use the graphical interface to connect
the RedPitaya to the network, start the pulse generator, and finally press the *StartDAQ"
button in the oscilloscope tag to start data transfer to the *mimiCoRB* input buffer.
Stop data taking with the button "End run" in the *mimoCoRB* conotrol window to
cleanly shut down all processes.
......@@ -73,3 +73,26 @@ def redP_to_rb(source_list=None, sink_list=None, observe_list=None, config_dict=
#print("starting osci")
rp.run_rpControl(callback=rb_source, conf_dict=config_dict)
if __name__ == "__main__": # --------------------------------------
#run mimoCoRB data acquisition suite
# the code below is idenical to the mimoCoRB script run_daq.py
import argparse
import sys, time
from mimocorb.buffer_control import run_mimoDAQ
# define command line arguments ...
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('filename', nargs='?', default = "setup.yaml",
help = "configuration file")
parser.add_argument('-v','--verbose', type=int, default=2,
help="verbosity level (2)")
parser.add_argument('-d','--debug', action='store_true',
help="switch on debug mode (False)")
# ... and parse command line input
args = parser.parse_args()
print("\n*==* script " + sys.argv[0] + " running \n")
daq = run_mimoDAQ(args.filename, verbose=args.verbose, debug=args.debug)
daq.setup()
daq.run()
print("\n*==* script " + sys.argv[0] + " finished " + time.asctime() + "\n")
#! /usr/bin/env python3
"""
run mimoCoRB data acquisition suite
"""
import argparse
import sys, time
from mimocorb.buffer_control import run_mimoDAQ
# define command line arguments ...
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('filename', nargs='?', default = "setup.yaml",
help = "configuration file")
parser.add_argument('-v','--verbose', type=int, default=2,
help="verbosity level (2)")
parser.add_argument('-d','--debug', action='store_true',
help="switch on debug mode (False)")
# ... and parse command line input
args = parser.parse_args()
print("\n*==* script " + sys.argv[0] + " running \n")
daq = run_mimoDAQ(args.filename, verbose=args.verbose, debug=args.debug)
daq.setup()
daq.run()
# wait for user confirmation (useful if started via GUI)
# input(30*' '+'Finished, good bye ! Type <ret> to exit -> ')
print("\n*==* script " + sys.argv[0] + " finished " + time.asctime() + "\n")
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