This area is to hold optional test code which:
- requires more time than is convenient to run in a “real” unit test
- requires input files
- may be best expressed as a chain or DAG of jobs connected by files
- the effort to add them into wire-cell-validate is not yet available
In general, the tests assume the environment in which they run provide installed:
- Python packages
numpy
andmatplotlib
. - WCT libraries and main command line interface
wire-cell
. - WCT’s
wirecell-*
main commands fromwire-cell-python
. - WCT’s
WIRECELL_PATH
including directories holdingwire-cell-cfg
andwire-cell-data
contents. - Access to previously prepared data files, although tests are encouraged to use simulation to generate fodder.
Note, these tests must explicitly not depend on any WCT application other than wire-cell
.
- general WCT installation and runtime https://wirecell.github.io/manual.html
- for Python related: https://github.com/WireCell/wire-cell-python
If one uses Nix to provide externals, runtime is set up like:
$ nix-shell -p python27Packages.matplotlib -p python27Packages.virtualenv $ virtualenv venv $ source venv/bin/activate $ pushd ~/dev/wct/src/python/ $ python setup.py develop $ popd
After first time, just the nix-shell
and source
commands need repeating.
$ ./waf configure $ ./waf -p --alltests -vv --dump-test-scripts $ tree build
All flags in the second command are optional. The last command just lists the results.
A possibly incomplete list of tests:
This does three simulation runs which place ideal, short tracks at
specific locations to test the U, V and W plane responses,
respectively. noise is turned off so only channels with signal are in
the output frame. Results in files
build/sim/wiregeom/test-wiregeom-signal-[uvw]plane-plots.pdf
For each plane, check
- shape of raw waveform for each little track. For the plane tested, each track should produce a response that is seen mostly in just one channel. Other planes will see some spread over channels. Note, simulation includes field responses for some shorted/grounded wires so one should see some variability in the shapes in some channels.
- separation in channel. For the plane tested, the peak waveform should be 10 channels apart.
This tests the ability for simulate protoDUNE-SP with six APAs.