cta-observatory / dragonboard_testbench

Collection of programs to look at test data from the LST prototype camera.
1 stars 2 forks source link

time-lapse correction #27

Closed dneise closed 8 years ago

dneise commented 8 years ago

As shown by Julian Sitarek in his Analysis techniques and performance of the Domino Ring Sampler version 4 based readout for the MAGIC telescopes in Figure 3 (see below), the DRS4 shows a certain offset dependent on the time between consecutive events.

figure3

We assume the same offset to be present also in data recorded by the dragonboard and plan to correct for this offset later on. As a first step we must show: This time-dependent baseline shift (shorter but still clear name is urgently needed!) is present, i.e. we can measure it. The second step, the correction, is then simple.


In order to show this effect or to measure it, we can use pedestal events which were recorded with different time periods between each other. Recently new data was given to us. This data was triggered with a pseudo random trigger, leading to varying times between consecutive events. The mean rate of the random trigger was set to 1kHz and 10kHz.

First we need to ensure, the time between events is really not fixed, otherwise any further study would be futile. The following picture shows the time between consecutive events for one of the files given to us. time_between_events_for_example_file

The average time difference seems to be at 1kHz, which makes sense looking at the file name. The distribution of the triggers resembles an exponential distribution with a cut off below 1ms. The exponential distribution means, the triggers are not only randomly distributed, but mimic a natural poisson distribution. This is not important for this study but never the less a cool feature.


Due to the different file formats, the event.header has changed. The new header contains several counters:

I found, that counter_10MHz and pps_counter in this example file were always zero. So I used counter_133MHz to calculate the time between consecutive events.


So the plot was made like this:

import os
import dragonboard as db
import numpy as np
import matplotlib.pyplot as plt
plt.ion()

path = '../raw_data_20160229/20160229_185742_ExtTrgRand/Ped_Rand1kHz_No1_IP90.dat'
times = []
for event in db.EventGenerator(path):
    times.append(event.header.counter_133MHz / 133e6)
times = np.array(times)
delta_t_in_ms = np.diff(times)*1e3
print(delta_t_in_ms.mean())

plt.hist(delta_t_in_ms, bins=100, histtype="step")
plt.xlabel("time between consecutive events / ms")
plt.title(os.path.basename(path))

The goal of this study would be to show that we can measure the baseline shift shown in figure 3 of the paper cited above also for the new dragonboard data. Once we have that, we should define new tasks.

MHoerbe commented 8 years ago

Perfect, exactly what I wanted to get to. I'll be at it and keep all up to date in this issue.

MHoerbe commented 8 years ago

Here are the histograms of all the other files. thought it might be useful that we can be sure about a poisson distribution

hist_1khz_1_ip90 hist_1khz_2_ip90 hist_1khz_3_ip90 hist_1khz_4_ip90 hist_1khz_6_ip90 hist_1khz_7_ip90 hist_1khz_8_ip90 hist_10khz_1_ip90 hist_10khz_2_ip90 hist_10khz_3_ip90 hist_10khz_4_ip90 hist_10khz_5_ip90 hist_10khz_6_ip90 hist_10khz_7_ip90 hist_10khz_8_ip90

maxnoe commented 8 years ago

I will close this for now as this is basically implemented and under evaluation.