include_if¶
- class sherpa.astro.xspec.utils.include_if(condition)[source] [edit on github]¶
Bases:
object
Generic decorator for including xspec models conditionally. It takes a boolean condition as an argument. If the boolean condition is not met, then the model is not included, and its function is replaced with a dummy function that throws an exception.
If the model is disabled, then its class’s version_enabled attribute is set to False.
Attributes Summary
Methods Summary
get_message
(model_class)Attributes Documentation
- DISABLED_MODEL_MESSAGE = 'Model {} is disabled because of an unmet condition'¶
Methods Documentation
- get_message(model_class)[source] [edit on github]¶