KwRule¶
-
class
jwst.model_blender.blendrules.
KwRule
(line)[source]¶ Bases:
object
This class encapsulates the logic needed for interpreting a single keyword rule from a text file.
Notes
The
.rules
attribute contains the interpreted set of rules that corresponds to this line.Example:
Interpreting rule from {'meta.attribute': { 'rule': 'first', 'output': 'meta.attribute'}} --or-- {'meta.attribute': 'meta.attribute'} # Table column specification into rule [('meta.attribute', 'meta.attribute', <function first at 0x7fe505db7668>, 'ignore')] and sname None
Initialize new keyword rule.
Parameters: line (dict) – Line should be dict with attribute name as the key, and a dict as the value specifying ‘rule’ and (optionally)’output’. Methods Summary
interpret
(hdr)Use metadata to interpret rule. Methods Documentation