Module gplately.ptt.rotation_tools

Various rotation utilities

including:
- Calculating stage rotations between consecutive finite rotations in a plate pair.

Functions

def extract_plate_pair_stage_rotations(rotation_feature_collections, plate_pair_filter=None)

Calculate stage rotations between consecutive finite rotations in each specified plate pair.

Parameters

rotation_feature_collections : sequence of (str, or sequence of pygplates.Feature, or pygplates.FeatureCollection, or pygplates.Feature)
A sequence of rotation feature collections. Each collection in the sequence can be a rotation filename, or a sequence (eg, list of tuple) or features, or a feature collection, or even a single feature.
plate_pair_filter : Filter function accepting accepting 3 arguments (moving_plate_id, fixed_plate_id, rotation_sequence), or sequence of 2-tuple (moving_plate_id, fixed_plate_id), optional
Optional filtering of plate pairs to apply operation to. Filter function (callable) accepting 3 arguments (), or a sequence of (moving, fixed) plate pairs to limit operation to.

Returns

list of pygplates.FeatureCollection
The modified feature collections. Returned list is same length as rotation_feature_collections.

Notes

The results are returned as a list of pygplates.FeatureCollection (one per input rotation feature collection).

Note that only the rotation features satisfying plate_pair_filter (if specified) are returned. So if a returned feature collection is empty then it means all of its features were filtered out.