pynbody.snapshot.copy_on_access.UnderlyingClassMixin

pynbody.snapshot.copy_on_access.UnderlyingClassMixin#

class pynbody.snapshot.copy_on_access.UnderlyingClassMixin(underlying_class, *args, **kwargs)[source]#

Bases: object

Mixin for a SimSnap that allows it to derive quantities associated with another class.

Methods

derivable_keys()

Returns a list of arrays which can be lazy-evaluated, including those of the underlying class.

find_deriving_function

__init__(underlying_class, *args, **kwargs)[source]#
derivable_keys()[source]#

Returns a list of arrays which can be lazy-evaluated, including those of the underlying class.

Changed in version 2.6.0: Derived arrays belonging to the underlying class are now reported. Previously only the mixed-in class’s own MRO was searched, so derivable_keys disagreed with find_deriving_function() about what could be derived. See issue #1021.