py4sci

Previous topic

Smolyak UQ Method

Next topic

TestProgram

This Page

Sweep Reference

class puq.Sweep(psweep, host, prog, caldata=None, calerr=None, description='')

Creates an object that contains all the information about a parameter sweep.

Parameters:
  • psweep – Parameter Sweep object. See PSweep.
  • host – Host object. See Host.
  • prog – TestProgram object: See TestProgram.
  • caldata(array – Experimental data for calibration. Optional.
  • calerr (float) – Measurement error in the experimental data.
  • description (string) – Optional description of this run.
analyze(verbose=False)

Collects the output from all the jobs into an HDF5 file. Parses any tagged data in the output and puts it in the /data group in the HDF5 file.

collect_data(hf=None)

Collects data from captured stdout files and puts it in arrays in ‘output/data’. Returns True on success.

run(fn=None, overwrite=False)

Calls PSweep.run() to run all the jobs in the Sweep. Collect the data from the outputs and call the PSweep analyze method. If the PSweep method has an iterative callback defined, call it, otherwise return.

Parameters:
  • fn (string) – HDF5 filename for output. ‘.hdf5’ will be appended to the filename if necessary. If fn is None, a filename will be generated starting with “sweep_” followed by a timestamp.
  • overwrite (boolean) – If True and fn is not None, will silently overwrite any previous files of the same name.
Returns:

True on success.