checkExpLengthEqual

lsst.cp.pipe.utils.checkExpLengthEqual(exp1, exp2, v1=None, v2=None, raiseWithMessage=False)

Check the exposure lengths of two exposures are equal.

Parameters:
exp1lsst.afw.image.Exposure

First exposure to check

exp2lsst.afw.image.Exposure

Second exposure to check

v1int or str, optional

First visit of the visit pair

v2int or str, optional

Second visit of the visit pair

raiseWithMessagebool

If True, instead of returning a bool, raise a RuntimeError if exposure times are not equal, with a message about which visits mismatch if the information is available.

Returns:
successbool

This is true if the exposures have equal exposure times.

Raises:
RuntimeError

Raised if the exposure lengths of the two exposures are not equal