mcvine / acc

Accelerated mcvine engine
0 stars 1 forks source link

Script to generate timings for instruments #66

Closed ckendrick closed 2 years ago

ckendrick commented 2 years ago

This adds a helper script to generate timings of one or more instrument scripts over a series of different neutron counts. The script takes a json or yaml file as input, which contains different options (neutron counts, iterations, output file, and scripts to run). The results are output to a table similar to the other timing results.

This script should help future performance comparisons between MCViNE and accelerated-MCViNE instruments.

Example yaml input file:

ncounts: [1e5, 1e6]
iterations: 3
output_file: "./check_speed_output.txt"
scripts:
  - file: "components/optics/tapered_guide_instrument.py"
    kwds:
      { guide_mod: "mcvine.acc.components.optics.guide_tapering" }