flatten_logical_and

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

Flatten all logical AND operations in predicate into a list.

Parameters:
predicate : Predicate

Original expression to flatten.

Returns:
flat : list [ 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.