1 from wirecell
import units
4 from matplotlib.backends.backend_pdf
import PdfPages
5 import matplotlib.pyplot
as plt
9 Make a multipage pdf with the spectral information 11 with PdfPages(pdffile)
as pdf:
13 fig, ax = plt.subplots(nrows=1,ncols=1)
15 freqs = numpy.asarray(ns.freqs)/units.MHz
16 amps = numpy.asarray(ns.amps)/(units.volt/units.Hz)
18 ax.set_title(
'plane=%d, wirelen=%.1f cm, gain=%.1f mV/fC shape=%.1f $\mu$s' % \
19 (ns.plane, ns.wirelen/units.cm, ns.gain/(units.mV/units.fC), ns.shaping/units.us))
20 ax.set_xlabel(
'sampled frequency [MHz]')
21 ax.set_ylabel(
'sampled amplitude [V/Hz]')
def plot_many(spectra, pdffile)