schema.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 '''
3 Define a data schema for noise related information.
4 '''
5 
6 from collections import namedtuple
7 
8 class NoiseSpectrum(namedtuple("NoiseSpectrum", "period nsamples gain shaping plane wirelen const freqs amps")):
9  '''
10  Information about average noise.
11 
12  :param float period: the sampling period in units of [time] used to make the spectrum
13  :param int nsamples: the number of time sampled used to make the spectrum
14  :param float gain: the gain in units of [voltage]/[charge] assumed in the spectrum
15  :param float shaping: the shaping time of the amplifier in units of [time] assumed in the spectrum
16  :param int plane: the identifier for the plane holding the wire from which this noise is associated.
17  :param float wirelen: the length of wire in units of [length] for the wire assumed to produce the noise.
18  :param list freqs: list of floating point sampled frequency in units of [frequency] (not MHZ!)
19  :param list amps: list of floating point sampled noise amplitude in units of [voltage]/[frequency].
20  '''
21  __slots__ = ()
22 
23 
24