flatten_logical_and

lsst.daf.relation.flatten_logical_and(predicate: Predicate) list[lsst.daf.relation._columns._predicate.Predicate] | Literal[False]

Flatten all logical AND operations in predicate into a list.

Parameters:
predicatePredicate

Original expression to flatten.

Returns:
flatlist [ Predicate ] or False

A list of predicates that could be combined with AND to reproduce the original expression, or False if the predicate is trivially false.

Notes

This algorithm is not guaranteed to descend into nested OR or NOT operations, but it does descend into nested AND operations.