How to use muonic

start muonic

If you have setup muonic via the provided setup.py script or if you hav put the package somewhere in your PYTHONPATH, simple call from the terminal

muonic [OPTIONS] xy

where xy are two characters which you can choose freely. You will find this two letters occuring in automatically generated files, so that you can identify them.

For help you can call

muonic --help

which gives you also an overview abot the options.

[OPTIONS]

-s, --sim
use the simulation mode of muonic (no real data, so no physics behind!). This should only used for testing and developing the software
-d, --debug
debug mode. Use it to generate more log messages on the console.
-t sec
change the timewindow for the calculation of the rates. If you expect very low rates, you might consider to change it to larger values.
default is 5 seconds.
-p, --writepulses
automatically write a file with pulsetimes in a non hexadecimal representation
-n, --nostatus
supress any status messages in the output raw data file, might be useful if you want use muonic only for data taking and use another script afterwards for analysis.
-v, --version
just print the current version of muonic
-P DATA_PATH
define an output directory for the files written by muonic. Default is $HOME/muonic_data

Saving files with muonic

All files which are saved by muonic are ASCII files. The filenames are as follows:

Warning

currently all files are saved under $HOME/muonic_data. This directory must exist. If you use the provided setup script, it is created automatically

YYYY-MM-DD_HH-MM-SS_TYPE_MEASUREMENTTME_xy

  • YYYY-MM-DD is the date of the measurement start

  • HH-MM-SS is the GMT time of the measurement start

  • MEASUREMENTTIME if muonic is closed, each file gets is corresponding measurement time (in hours) assigned.

  • xy the two letters which were specified at the start of muonic

  • TYPE can be one of the following:
    • DAQ the raw ASCII output of the DAQ card, this is only saved if the ‘Save to file’ button in clicked in the ‘Daq output’ window of muonic. See the documentation of the [DAQ card (pdf)](http://crd.yerphi.am/files/QNetdescription.pdf) for more information on the output.
    • R is an automatically saved ASCII file which contains the rate measurement data, this can then be used to plot with e.g. gnuplot later on. Rates as well as total counts for all channels and the trigger are given in pre-defined time intervals (default: 5 seconds).
    • D specifies a file with times of registered muon decays. This file is automatically saved if a muon decay measurement is started.
    • V stands for the output of a muon velocity measurement. Each line contains the measurement time and the measured flight time of a muon event.
    • P stands for a file which contains a non-hex representation of the registered pulses. This file is only save if the -p option is given at the start of muonic

(69.15291364, [(0.0, 12.5)], [(2.5, 20.0)], [], [])

This is a python-tuple which contains the triggertime of the event and four lists with more tuples. The lists represent the channels (0-3 from left to right) and each tuple stands for a leading and a falling edge of a registered pulse. To get the exact time of the pulse start, one has to add the pulse LE and FE times to the triggertime

Note

For calculation of the LE and FE pulse times a TMC is used. It seems that for some DAQs cards a TMC bin is 1.25 ns wide, allthough the documentation says something else. The triggertime is calculated using a CPLD which runs in some cards at 25MHz, which gives a binwidth of the CPLD time of 40 ns. Please keep this limited precision in mind when adding CPLD and TMC times.

Performing measurements with muonic

Setting up the DAQ

For DAQ setup it is recommended to use the ‘settings’ menu, allthough everything can also be setup via the command line in the DAQ output window (see below.) Muonic translates the chosen settings to the corresponding DAQ commands and sends them to the DAQ. So if you want to change things like the coincidence time window, you have to issue the corresponding DAQ command in the DAQ output window.

Two menu items are of interest here: * Channel Configuration: Enable the channels here and set coincidence settings. A veto channel can also be specified.

Note

You have to ensure that the checkboxes for the channels you want to use are checked before you leave this dialogue, otherwise the channel gets deactivated.

Note

The concidence is realized by the DAQ in a way that no specific channels can be given. Instead this is meant as an ‘any’ condition. So ‘twofold’ means that ‘any two of the enabled channels’ must claim signal instead of two specific ones (like 1 and 2).

Warning

Measurements at DESY indicated that the veto feature of the DAQ card might not work properly in all cases.

  • Thresholds: For each channel a threshold (in milliVolts) can be specified. Pulse which are below this threshold are rejected. Use this for electronic noise supression. One can use for the calibration the rates in the muon rates tab.

Note

A proper calibration of the individual channels is the key to a succesfull measurement!

Muon Rates

In the first tab a plot of the measured muonrates is displayed. A triggerrate is only shown if a coincidence condition is set. In the block on the right side of the tab, the average rates are displayed since the measurement start. Below you can find the number of counts for the individual channels. On the bottom right side is also the maximum rate of the measurment. The plot and the shown values can be reset by clicking on ‘Restart’. The ‘Stop’ button can be used to temporarily hold the plot to have a better look at it.

Note

You can use the displayed ‘max rate’ at the right bottom to check if anything with the measurement went wrong.

Note

Currently the plot shows only the last 200 seconds. If you want to have a longer timerange, you can use the information which is automatically stored in the ‘R’ file (see above).

Muon Lifetime

A lifetime measurement of muons can be performed here. A histogram of time differences between succeding pulses in the same channel is shown. It can be fit with an exponential by clicking on ‘Fit!’. The fit lifetime is then shown in the above right of the plot, for an estimate on the errors you have to look at the console.

The measurment can be activated with the checkbox. In the following popup window the measurment has to be configured. It depends mainly on the detector you use and influences the quality of the measurment. The signal is accepted if more than one pulse appears in the single pulse channel or if one pulse appears in the single pulse channel and >= 2 pulses appear in the double pulse channel. The coincidence time is set to ?microseconds for this measurement. The signal are vetoed with the veto channel: only events are accepted if no pulse occurs there. If the selfveto is activated it accepts only events if:
  • more than one pulse appears in the single pulse channel and none pulse is measured in the double pulse channel
  • one pulse in the single pulse channel appears and exactly two pulses in the double pulse channel.

Warning

The error of the fit might be wrong!

Muon Velocity

In this tab the muon velocity can be measured. The measurement can be started with activating the check box. In the following popup window it has to be configured. The muon velocity widget will measure the signal times between two given channels which can be interpreted as the flight time of the muon from one detector plate to the other. The resulting histogram shows the distribution of flight times. The mean flight time can be calculated by using the fit button to fit a gaussian distribution.

Warning

The error of the fit might be wrong!

Pulse Analyzer

You can have a look at the pulsewidhts in this plot. The height of the pulses is lost during the digitization prozess, so all pulses have the same height here. On the left side is an oscilloscope of the pulsewidths shown and on the right side are the pulsewidths collected in an histogram.

GPS Output

In this tab you can read out the GPS information of the DAQ card. It requires a connected GPS antenna. The information are summarized on the bottom in a text box, from where they can be copied.

Raw DAQ data

The last tab of muonic displays the raw ASCII DAQ data. This can be saved to a file. If the DAQ status messages should be supressed in that file, the option -n should be given at the start of muonic. The edit field can be used to send messages to the DAQ. For an overview over the messages, look here (link not available yet!). To issue such an command periodically, you can use the button ‘Periodic Call’

Note

The two most importand DAQ commands are ‘CD’ (‘counter disable’) and ‘CE’ (‘counter enable’). Pulse information is only given out by the DAQ if the counter is set to enabled. All pulse related features may not work properly if the counter is set to disabled.