Namespaces | |
persist | |
plots | |
schema | |
Classes | |
class | foo |
class | PlaneImpactBlocks |
class | ResponseFunction |
Functions | |
def | electronics_no_gain_scale (time, gain, shaping=2.0 *units.us) |
def | electronics (time, peak_gain=14 *units.mV/units.fC, shaping=2.0 *units.us) |
def | convolve (f1, f2) |
def | _convolve (f1, f2) |
def | group_by (rflist, field) |
def | by_region (rflist, region=0) |
def | total_charge (rf) |
def | normalize (rflist, plane='w', region=0, impact=None) |
def | _average (fine) |
def | average (fine) |
def | field_response_spectra (rflist) |
def | plane_impact_blocks (rflist, eresp=None) |
def | response_spect_nominal (rflist, gain, shaping, tick=0.5 *units.us) |
def | filter_expower (sig, power, nbins, nyquist) |
def | filters (nticks=9600, tick=0.5 *units.us, npitches=3000, pitch=1.0) |
def | deconvolve (Mct, Rpf, Ff, Fp) |
def | schematorf1d (fr) |
def | rf1dtoschema (rflist, origin=10 *units.cm, speed=1.114 *units.mm/units.us) |
def | write (rflist, outputfile="wire-cell-garfield-response.json.bz2") |
def | line (rflist, normalization=13700 *units.eplus) |
Variables | |
electronics = numpy.vectorize(electronics) | |
Functions related to responses.
|
private |
Average fine-grained response functions over multiple impact positions in the same plane and wire region. Return list of new response.ResponseFunction objects ordered by plane, region.
Definition at line 220 of file __init__.py.
|
private |
Return the simple convolution of the two arrays using FFT+mult+invFFT method.
Definition at line 79 of file __init__.py.
def wirecell.sigproc.response.average | ( | fine | ) |
Average fine-grained response functions over multiple impact positions in the same plane and wire region. It assumes an odd number of regions and a half-populated impact positions per region such that the first impact is exactly on a wire and the impact is exactly on a half-way line between neighboring wires. Return list of new response.ResponseFunction objects ordered by plane, region which cover the same regions.
Definition at line 259 of file __init__.py.
def wirecell.sigproc.response.by_region | ( | rflist, | |
region = 0 |
|||
) |
Definition at line 172 of file __init__.py.
def wirecell.sigproc.response.convolve | ( | f1, | |
f2 | |||
) |
Return the simple convolution of the two arrays using FFT+mult+invFFT method.
Definition at line 66 of file __init__.py.
def wirecell.sigproc.response.deconvolve | ( | Mct, | |
Rpf, | |||
Ff, | |||
Fp | |||
) |
Return a matrix like Mct which is deconvolved by Rpf and filtered with the Ff and Fp. Indices are c=channel, t=time, p=periodicity, f=frequency. Mct is the measured ADC in a plane as a matrix of Nchannel rows and Nticks columns. Rpf is the wire periodicity and frequency space 2D Fourier transform of the field response * electronics response. It is assumed to contain only the four corners up the time and wire Nyquist frequencies of Mct. Ff is a frequency space filter. Fp is the channel periodicity space filter.
Definition at line 586 of file __init__.py.
def wirecell.sigproc.response.electronics | ( | time, | |
peak_gain = 14*units.mV/units.fC , |
|||
shaping = 2.0*units.us |
|||
) |
Electronics response function. - gain :: the peak gain value in [voltage]/[charge] - shaping :: the shaping time in Wire Cell system of units - domain :: outside this pair, the response is identically zero
Definition at line 43 of file __init__.py.
def wirecell.sigproc.response.electronics_no_gain_scale | ( | time, | |
gain, | |||
shaping = 2.0*units.us |
|||
) |
This version takes gain parameter already scaled such that the gain actually desired is obtained.
Definition at line 14 of file __init__.py.
def wirecell.sigproc.response.field_response_spectra | ( | rflist | ) |
Return a tuple of response spectra as collection of per-plane matrices in channel periodicity vs frequency. The rflist is both averaged over impacts (if needed) and normalized.
Definition at line 307 of file __init__.py.
def wirecell.sigproc.response.filter_expower | ( | sig, | |
power, | |||
nbins, | |||
nyquist | |||
) |
Return a Fourier space filter function: filter = exp(-(freq/sig)^(power)) The filter function is returned as an array `nbins` long covering the low half of the Fourier domain up to the given `nyquist` "frequency". The `sig` and `nyquist` parameters are in units of the relevant "frequency" for the given Fourier domain. For time-domain Fourier this is likely Hz. For channel-domain this is likely in units of per pitch (unitless). Caller assures this consistency.
Definition at line 533 of file __init__.py.
def wirecell.sigproc.response.filters | ( | nticks = 9600 , |
|
tick = 0.5*units.us , |
|||
npitches = 3000 , |
|||
pitch = 1.0 |
|||
) |
Return (fu,fv,fw,fc) filters. See `filter_expower()` for details.
Definition at line 555 of file __init__.py.
def wirecell.sigproc.response.group_by | ( | rflist, | |
field | |||
) |
Return a list of lists grouping by like values of the field.
Definition at line 162 of file __init__.py.
def wirecell.sigproc.response.line | ( | rflist, | |
normalization = 13700*units.eplus |
|||
) |
Assuming an infinite track of `normalization` ionization electrons per pitch which runs along the starting points of the response function paths, calculate the average response on the central wire of each plane. The returned responses will be normalized such that the collection response integrates to the given normalization value if nonzero.
Definition at line 701 of file __init__.py.
def wirecell.sigproc.response.normalize | ( | rflist, | |
plane = 'w' , |
|||
region = 0 , |
|||
impact = None |
|||
) |
Return new rflist with all responses normalized to be in Ampere and assuming a single electron was drifting. The collection signal on the given plane and region is used to normalize. If impact is an impact distance, or a list of them then the average collection signal is used. If not given, all impacts for the given plane/region are used.
Definition at line 188 of file __init__.py.
def wirecell.sigproc.response.plane_impact_blocks | ( | rflist, | |
eresp = None |
|||
) |
Return a field responses as a number of matrices blocked by impacts. Returns a triple of arrays of shape (Nimpacts, Nregion, Ntbins). If eresp is given, it is convolved with each response function.
Definition at line 332 of file __init__.py.
def wirecell.sigproc.response.response_spect_nominal | ( | rflist, | |
gain, | |||
shaping, | |||
tick = 0.5*units.us |
|||
) |
Return the a response matrix such as passed to `deconvolve()`. Only the frequencies corresponding to a sampling period of `tick` are retained.
Definition at line 508 of file __init__.py.
def wirecell.sigproc.response.rf1dtoschema | ( | rflist, | |
origin = 10*units.cm , |
|||
speed = 1.114*units.mm/units.us |
|||
) |
Convert the list of 1D ResponseFunction objects into response.schema objects. The "1D" refers to the drift paths starting on a line in 2D space. Because it is 1D, all the pitch and wire directions are the same.
Definition at line 640 of file __init__.py.
def wirecell.sigproc.response.schematorf1d | ( | fr | ) |
Convert response.schema objects to 1D ResponseFunction objects. Fixme: this has not yet been validated.
Definition at line 620 of file __init__.py.
def wirecell.sigproc.response.total_charge | ( | rf | ) |
def wirecell.sigproc.response.write | ( | rflist, | |
outputfile = "wire-cell-garfield-response.json.bz2" |
|||
) |
Write a list of response functions to file.
Definition at line 681 of file __init__.py.
wirecell.sigproc.response.electronics = numpy.vectorize(electronics) |
Definition at line 64 of file __init__.py.