summary.py
Go to the documentation of this file.
1 from common import bounding_box
2 
3 def wire_summary(all_wires):
4  for iplane in range(3):
5  wires = [w for w in all_wires if w.plane == iplane]
6  chans = [w.ch for w in wires]
7  wids = [w.wip for w in wires]
8  bb = bounding_box(wires)
9  minpt, maxpt = bb.tail, bb.head
10 
11  fmt = "plane %s: %d wires [%d - %d], %d chans [%04d - %04d], minpt=(%+.1f, %+.1f, %+.4f), maxpt=(%+.1f, %+.1f, %+.1f)"
12  dat = ("UVW"[iplane], len(wires), min(wids), max(wids), len(chans), min(chans), max(chans),
13  minpt[0],minpt[1],minpt[2],maxpt[0],maxpt[1],maxpt[2])
14  print fmt%dat
15 
def wire_summary(all_wires)
Definition: summary.py:3
static int max(int a, int b)
def bounding_box(wires)
Definition: common.py:15
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55