-
Notifications
You must be signed in to change notification settings - Fork 2
/
noise_example.py
41 lines (29 loc) · 907 Bytes
/
noise_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import numpy as np
import matplotlib.pyplot as plt
from nudetect import Noise
noise = Noise('/disk/lif2/spike/detectorData/'
'H117/20180803_H117_noise_-10C_-500V/20180803_H117_noise_-10C_-500V.fits',
data_dir='/users/jmsander/outputs/{}/noise/data',
plot_dir='/users/jmsander/outputs/{}/noise/plots',
detector='H117',
voltage=-500,
temp=5)
noise.load_raw_data()
#
# Processing data
#
# Generating both count and FWHM data for each pixel.
noise.gen_quick_noise(plot_subdir='pixels')
noise.gen_full_noise()
#
# Plotting
#
# Plotting a pixel heatmap and histogram of count data wrt pixels.
noise.plot_pixel_map('Count')
noise.plot_pixel_hist('Count')
# Plotting a pixel heatmap and histogram using the FWHM of the
# Gaussian fitted to the noise spectrum.
noise.plot_pixel_map('FWHM')
noise.plot_pixel_hist('FWHM')
noise.plot_pixel_map('Mean')
noise.plot_pixel_hist('Mean')