pygplates.ReconstructModel
- class pygplates.ReconstructModel
- Bases: - instance- A history of reconstructed geometries over geological time. - A ReconstructModel can also be pickled. - Added in version 0.48. - __init__(reconstructable_features, rotation_model[, anchor_plate_id][, reconstruct_snapshot_cache_size])
- Create from reconstructable features and a rotation model. - Parameters:
- reconstructable_features ( - FeatureCollection, or string/- os.PathLike, or- Feature, or sequence of- Feature, or sequence of any combination of those four types) – The features to reconstruct as a feature collection, or filename, or feature, or sequence of features, or a sequence (eg,- listor- tuple) of any combination of those four types.
- rotation_model ( - RotationModel. Or- FeatureCollection, or string/- os.PathLike, or- Feature, or sequence of- Feature, or sequence of any combination of those four types) – A rotation model. Or a rotation feature collection, or a rotation filename, or a rotation feature, or a sequence of rotation features, or a sequence of any combination of those four types.
- anchor_plate_id (int) – The anchored plate id used for reconstructions. Defaults to the default anchor plate of rotation_model (or zero if rotation_model is not a - RotationModel).
- reconstruct_snapshot_cache_size (int) – Number of reconstruct snapshots to cache internally. Defaults to unlimited. 
 
 - Load a reconstruct model (and its associated rotation model): - rotation_model = pygplates.RotationModel('rotations.rot') reconstruct_model = pygplates.ReconstructModel('reconstructable_features.gpml', rotation_model) - …or alternatively just: - reconstruct_model = pygplates.ReconstructModel('reconstructable_features.gpml', 'rotations.rot') - Note - All reconstructions use anchor_plate_id. So if you need to use a different anchor plate ID then you’ll need to create a new - ReconstructModel. However this should only be done if necessary since each- ReconstructModelcreated can consume a reasonable amount of CPU and memory (since it caches reconstructed geometries over geological time).- Note - The reconstruct_snapshot_cache_size parameter controls the size of an internal least-recently-used cache of reconstruct snapshots (evicts least recently requested reconstruct snapshot when a new reconstruction time is requested that does not currently exist in the cache). This enables reconstruct snapshots associated with different reconstruction times to be re-used instead of re-creating them, provided they have not been evicted from the cache. 
 - Methods - __init__(reconstructable_features, ...)- Create from reconstructable features and a rotation model. - Return the anchor plate ID (see - constructor).- Return the rotation model used internally. - reconstruct_snapshot(reconstruction_time)- Returns a snapshot of reconstructed geometries at the requested reconstruction time. - get_anchor_plate_id()
- Return the anchor plate ID (see - constructor).- Return type:
- int 
 - Note - This is the same as the - default anchor plate IDof- get_rotation_model().
 - get_rotation_model()
- Return the rotation model used internally. - Return type:
 - Note - The - default anchor plate IDof the returned rotation model may be different to that of the rotation model passed into the- constructorif an anchor plate ID was specified in the- constructor.- Note - The reconstruction tree cache size of the returned rotation model is equal to the reconstruct_snapshot_cache_size argument specified in the - constructorplus one (or unlimited if not specified).
 - reconstruct_snapshot(reconstruction_time)
- Returns a snapshot of reconstructed geometries at the requested reconstruction time. - Parameters:
- reconstruction_time (float or - GeoTimeInstant) – the geological time of the snapshot
- Return type:
- Raises:
- ValueError if reconstruction_time is distant-past ( - float('inf')) or distant-future (- float('-inf')).