Experiment#
- class uvex_transients.phase_space.experiment.Experiment(sampler: Sampler, phase_map: PhaseSpaceMap, rule: StoppingRule, campaign: CampaignSettings)[source]#
A sampler, the map of its success fraction, the stopping rule for its points, and a campaign.
- Parameters:
sampler (
Sampler) – What measures a point.phase_map (
PhaseSpaceMap) – The map, over the space of the sampler (with the ranges to be mapped).rule (
StoppingRule) – How many tries a point gets.campaign (
CampaignSettings) – How long to run.
- Raises:
ValueError – If the map is not over the axes of the sampler.
Methods
create(sampler, *[, bounds, rule, campaign, ...])Create an experiment of a sampler, with an empty map.
grid_table([size, bounds, products, rate, ...])Evaluate the map on a regular grid, with the quantities of the sampler, as one table.
load(path, *[, sampler])Rebuild an experiment from a points file of either format.
resume_from(path)Take the points of a file as the points of this experiment's map, to continue from them.
run(*, map_fn, callback, None] | None = None)Run the campaign, adding points to the map until its budget is spent or it is converged.
save(path)Write the points, with the header that rebuilds the experiment, as an ECSV file, replacing any existing one.
table()Return the points as a table whose header records the experiment.
Attributes
What a points file records to rebuild this experiment, as plain types an ECSV header can hold.