Main
- class jwst.associations.Main(args=None, pool=None)[source]
Bases:
objectGenerate Associations from an Association Pool.
- Parameters:
- args[str, …], or None
The command line arguments. Can be one of -
None:sys.argvis then used. -[str, ...]: A list of strings which create the command line with the similar structure assys.argv- poolNone or AssociationPool
If
None, a pool file must be specified in theargs. Otherwise, anAssociationPool
- Attributes:
- pool
AssociationPool The pool read in, or passed in through the parameter
pool- rules
AssociationRegistry The rules used for association creation.
- associations[
Association, …] The list of generated associations.
- pool
Notes
Refer to the Association Generator documentation for a full description.
Attributes Summary
The pool of exposures that do not belong to any association.
Methods Summary
cli([args, pool])Run the full association generation process.
configure([args, pool])Configure to prepare for generation.
generate()Generate the associations.
parse_args([args, has_pool])Set command line arguments.
save()Save the associations to disk.
Attributes Documentation
- orphaned
The pool of exposures that do not belong to any association.
- Returns:
- pool
jwst.associations.pool.AssociationPool The pool of orphaned exposures.
- pool
Methods Documentation
- classmethod cli(args=None, pool=None)[source]
Run the full association generation process.
- Parameters:
- args[str, …], or None
The command line arguments. Can be one of -
None:sys.argvis then used. -[str, ...]: A list of strings which create the command line with the similar structure assys.argv- poolNone or AssociationPool
If
None, a pool file must be specified in theargs. Otherwise, anAssociationPool
- Returns:
- generatorMain
A fully executed association generator.
- configure(args=None, pool=None)[source]
Configure to prepare for generation.
- Parameters:
- args[str, …], or None
The command line arguments. Can be one of
- poolNone or AssociationPool
If
None, a pool file must be specified in theargs. Otherwise, anAssociationPool
- parse_args(args=None, has_pool=False)[source]
Set command line arguments.
- Parameters:
- argslist, str, or None
List of command-line arguments. If a string, spaces separate the arguments. If None,
sys.argvis used.- has_poolbool-like
Do not require
poolfrom the command line if a pool is already in hand.