Skip to content

Some unit and integration tests which are too long running to keep in individual packages.

Notifications You must be signed in to change notification settings

WireCell/wire-cell-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wire Cell Toolkit Tests

What’s here

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

What’s needed

In general, the tests assume the environment in which they run provide installed:

  • Python packages numpy and matplotlib.
  • WCT libraries and main command line interface wire-cell.
  • WCT’s wirecell-* main commands from wire-cell-python.
  • WCT’s WIRECELL_PATH including directories holding wire-cell-cfg and wire-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.

How to provide setup

Nix

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.

Exercising

$ ./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.

Tests

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

  1. 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.
  2. 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.

About

Some unit and integration tests which are too long running to keep in individual packages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published