MCA Data Server Reference

COUNTER

Introduction

USB driver

Counter Device

Data structures

Overview

Module Constants

ARM Data structures

Version

Status

Controls

Calibration

Two-channel Logger

Time histogram

API

Overview

Counter Data Structure: arm_time_histogram

Summary

The counter can prepare a histogram of the time difference between successive events. This feature is useful to ascertain that events truly arrive in a random fashion. More importantly, it can be used to measure count rates precisely, without making assumptions about the dead time of the event processing.

Time differences are measured with a resolution of 4/3µs=1.333µs. The histogram memory is 1024 bins long. The practical range of measuring count rates this way extends from 1kcps to much beyond 100kcps.

Theory of operation

If the incoming pulse that are to be counted are truly random in time and are not correllated with each other, then the time differences between subsequent pulses is eponentially distributed with a probability density function (pdf) as follows: pdf=exp(-t/cr) where cr=count_rate.

Histogram of pulse arrival time differences. The green line is an exponential fit.

One can extract the count rate from a linear fit in a semi-logarithmic plot of time difference histogram. The slope equals -1/cr.

Associated commands

Set arm_ctrl["user"]["acq_type"]=1 to activate acquistion of a time histogram.

To read the time histogram use the regular read_histogram command:

cmd={"name": "arm_histogram", "dir": "read"}

To clear the histogram set arm_ctrl["user"]["clear_histogram"]=1 and arm_ctrl["user"]["clear_statistics"]=1

For arm_time_histogram, there are 1040 data in use. All register data are 32-bit integers.

MCA registers and fields
Register number and field nameDescription
HR0[0]: runHistogram acquisition happens while this bit is set.
HR1: run_timeRun time measured by wall clock; 1LSB=1.365ms.
HR2: dead_timeDead time measured by wall clock; 1LSB=1.365ms.
HR3: eventsNumber of acquired events
HR4: live_timeComputed live time, in milliseconds
HR5: count_rateComputed count rate, dead-time corrected, in milli-cps
HR6: live_time_ratioSample / background measuring time; × 1e6. Only used by arm_diff.
HR14: wall_clock_startWall clock reading at start time in 1.365333ms units
HR15: live_time_maxRequested live time for the data acquisition, in milliseconds
HR16 to HR1039: histogramThe 1K×32-bit time histogram.
All arm_time_histogram registers. HRn means histogram register number n, with n=0...1039 . Bitfields are indicated as [b_low:b_high] indicating bit numbers b_low to b_high, inclusive.