liger_iris_pipeline.associations

class liger_iris_pipeline.associations.L0Association(data: dict | None = None)[source]

Bases: LigerIRISAssociation

class liger_iris_pipeline.associations.L1Association(data: dict | None = None)[source]

Bases: LigerIRISAssociation

class liger_iris_pipeline.associations.L2Association(data: dict | None = None)[source]

Bases: LigerIRISAssociation

class liger_iris_pipeline.associations.LigerIRISAssociation(data: dict | None = None)[source]

Bases: Association

IRIS Association base class. NOTE: This is a crude implementation to get the DRS to run smoothly while developing. TODO: Rulesets and a better interface will be added later.

add(item)[source]

Add the item to the association

Parameters

itemdict

The item to add.

check_constraintsbool

If True, see if the item should belong to this association. If False, just add it.

Returns

(match, reprocess_list)
2-tuple consisting of:
  • bool : True if match

  • [ProcessList[, …]]: List of items to process again.

dump(filename: str | Path)[source]

Serialize the association

Parameters

formatstr

The format to use to dump the association into.

kwargsdict

List of arguments to pass to the registered routines for the current association type.

Returns

(name, serialized):

Tuple where the first item is the suggested base name for the file. Second item is the serialization.

Raises

AssociationError

If the operation cannot be done

AssociationNotValidError

If the given association does not validate.

classmethod from_member(member: str | LigerIRISDataModel)[source]
classmethod from_product(product: dict)[source]
classmethod load(filename: str | Path)[source]

Marshall a previously serialized association

Parameters

serializedobject

The serialized form of the association.

formatstr or None

The format to force. If None, try all available.

validatebool

Validate against the class’ defined schema, if any.

kwargsdict

Other arguments to pass to the load method

Returns

associationAssociation

The association.

Raises

AssociationNotValidError

Cannot create or validate the association.

Notes

The serialized object can be in any format supported by the registered I/O routines. For example, for json and yaml formats, the input can be either a string or a file object containing the string.

static load_as_json(cls, filename: str | Path)[source]
property name
property products
liger_iris_pipeline.associations.load_asn(asn_file: str)[source]

Load an association file and return the association object.

Modules

association_base

level0

level1

level2

subarray

utils