Skip to content

[Feature Req.] Ability to choose which 21cmFAST errors to abort with. #52

Description

@steven-murray

Is your feature request related to a problem? Please describe.

At the moment, if a ParameterError occurs during running 21cmFAST, it will be ignored and the chain will continue, setting that set of parameters to have likelihood of -inf. As @BradGreig has pointed out, this can be dangerous because these parameters might affect the final chains.

Describe the solution you'd like
We should make it option whether to exit on these errors. The default should be to exit.

Two extra features that go along with this that we might consider:

  1. We could count the number of times one of these errors occurs, and exit after a certain threshold number. Thus we could ignore a few bad parameter choices on the edge of the distribution, but if it keeps happening, assume something is really going wrong.
  2. We could be a little more granular in the way we catch the errors, and let the user decide exactly which exception classes are ignored. At the moment, anything that is a subclass of ParameterError is let through. However, we could let the user specify subclasses of ParameterError (see More informative errors 21cmFAST#219) that would trigger exits/ignoring.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Effort

None yet

API Breaking

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions