Functions | Variables
wirecell.sigproc.paper.noise Namespace Reference

Functions

def filter_response_functions (dat, regions=None)
 
def figure_adc (dat, regions=None, outname='paper-noise-figure-adc-%dwires')
 

Variables

string garfield_tarball = "/home/bviren/projects/wire-cell/garfield-data/ub_10.tar.gz"
 
 gt = sys.argv[1]
 
 outname = sys.argv[2]
 
int nwires = 10
 
 dat = garfield.load(gt)
 
 fname = figure_adc(dat, regions = range(nwires), outname=outname)
 

Detailed Description

$ PYTHONPATH=`pwd`/sigproc/python python sigproc/python/wirecell/sigproc/paper/noise.py 

Function Documentation

def wirecell.sigproc.paper.noise.figure_adc (   dat,
  regions = None,
  outname = 'paper-noise-figure-adc-%dwires' 
)

Definition at line 21 of file noise.py.

21 def figure_adc(dat, regions=None, outname='paper-noise-figure-adc-%dwires'):
22  dat = filter_response_functions(dat, regions)
23  nwires = 10
24  if regions is not None:
25  nwires = max(regions)
26 
27  norm = 16000*units.eplus # was 13700
28  uvw = response.line(dat, norm)
29 
30  gain = 1.2 # was 1.1 for a while
31  adc_bin_range = 4096.0
32  adc_volt_range = 2000.0
33  adc_per_mv = gain*adc_bin_range/adc_volt_range
34 
35  fig,data = plots.plot_digitized_line(uvw, 14.0, 2.0*units.us,
36  adc_per_mv = adc_per_mv)
37 
38  if "%d" in outname:
39  outname = outname % nwires
40  fig.savefig(outname + ".pdf")
41 
42  with open(outname + ".txt", 'w') as fp:
43  for t,u,v,w in data:
44  fp.write('%f %e %e %e\n' % (t,u,v,w))
45 
46  return outname
47 
48 
int open(const char *, int)
Opens a file descriptor.
def filter_response_functions(dat, regions=None)
Definition: noise.py:15
static int max(int a, int b)
def figure_adc(dat, regions=None, outname='paper-noise-figure-adc-%dwires')
Definition: noise.py:21
def wirecell.sigproc.paper.noise.filter_response_functions (   dat,
  regions = None 
)

Definition at line 15 of file noise.py.

15 def filter_response_functions(dat, regions=None):
16  if regions is None:
17  return dat
18  return [d for d in dat if abs(d.region) in regions]
19 
20 
def filter_response_functions(dat, regions=None)
Definition: noise.py:15
T abs(T value)

Variable Documentation

wirecell.sigproc.paper.noise.dat = garfield.load(gt)

Definition at line 64 of file noise.py.

wirecell.sigproc.paper.noise.fname = figure_adc(dat, regions = range(nwires), outname=outname)

Definition at line 68 of file noise.py.

string wirecell.sigproc.paper.noise.garfield_tarball = "/home/bviren/projects/wire-cell/garfield-data/ub_10.tar.gz"

Definition at line 12 of file noise.py.

wirecell.sigproc.paper.noise.gt = sys.argv[1]

Definition at line 53 of file noise.py.

int wirecell.sigproc.paper.noise.nwires = 10

Definition at line 62 of file noise.py.

wirecell.sigproc.paper.noise.outname = sys.argv[2]

Definition at line 58 of file noise.py.