Constraint_Single_Science
- class jwst.associations.lib.rules_level2_base.Constraint_Single_Science(has_science_fn, exposure_type_fn, **sc_kwargs)[source]
Bases:
ConstraintAllow only single science exposure.
- Parameters:
- has_science_fnfunc
Function to determine whether the association has a science member already. No arguments are provided
- exposure_type_fnfunc
Function to determine the association exposure type of the item. Should take a single argument of item.
- **sc_kwargsdict
Keyword arguments to pass to the parent class
Constraint.
Notes
The
has_science_fnis further wrapped in a lambda function to provide a closure. Otherwise if the function is a bound method, that method may end up pointing to an instance that is not calling this constraint.