[GPlates-discuss] Reverse reconstruction in pyGPlates

Michael Chin michael.chin at sydney.edu.au
Thu May 2 16:52:54 AEST 2019


Hi Ben,

If you want to avoid reconstructing the points back to present-day, you can try get_rotation() method to get the FiniteRotation from 10Ma to 9Ma and then use the "*" operator to calculate the new coordinates https://protect-au.mimecast.com/s/FBI6C6X13RtwrL3NcpWbBw?domain=gplates.org

________________________________
From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> on behalf of Ben Mather <ben.mather at sydney.edu.au>
Sent: Thursday, 2 May 2019 2:40 PM
To: John Cannon; gplates-discuss at mailman.sydney.edu.au
Subject: Re: [GPlates-discuss] Reverse reconstruction in pyGPlates

Hi John,

Thanks for your detailed response, and for your explanation of the inner workings of GPlates. I had thought that one of these reconstruction calculations could be avoided in pyGPlates, since all of the required information to move a point from one time to another is stored in the rotation files, but now it makes more sense in the context of how GPlates operates.

Many thanks,
Ben
--
Dr. Ben Mather | Computational Geophysicist
Room 418, Madsen Building F09
School of Geoscience, Faculty of Science
The University of Sydney, NSW 2006
m +61 422 470 117
w benmather.info<https://protect-au.mimecast.com/s/8ss2C71ZgLt7AGPgIWEAuf?domain=benmather.info>
t https://protect-au.mimecast.com/s/JwUMC81Zj6t46NJGt25eHO?domain=twitter.com<https://protect-au.mimecast.com/s/fde-C91ZkQt7k4Z0IO_Ctv?domain=twitter.com>


On 2019-05-01 23:40:23+10:00 GPlates-discuss wrote:

Hi Ben,



Your approach is currently the way to do this.  That is, first convert the geometry to its present-day position and then reconstruct from there.



This is more complicated than expected because all features in GPlates must contain *present* day geometries (this is essentially a requirement of GPlates/pyGPlates). If we consider GPlates first, then when you create a feature at a past time (such as using a digitization tool) GPlates automatically reverse reconstructs to present day before actually creating the feature. However, in pyGPlates it’s possible to directly create a feature with a *non*-present day geometry, and this is what the pygplates.reverse_reconstruct()<https://protect-au.mimecast.com/s/evTvC0YZWVFPGNExSOwUs6?domain=gplates.org> function is for – to fix this up by making it present-day.



Then, once a feature has a present-day geometry, pygplates.reconstruct()<https://protect-au.mimecast.com/s/VfpXCgZowLHQAEg3h7ysHj?domain=gplates.org> can reconstruct it to any past geological time.





Here’s a slightly easier (but still complicated) way that avoids pygplates.reverse_reconstruct() and instead uses pygplates.Feature.set_geometry()<https://protect-au.mimecast.com/s/xdizCjZrzqHNno6rUjM1vm?domain=gplates.org> to do the reverse reconstruction…





from_time = 10

to_time = 9

point_at_from_time = ...



rotation_model = pygplates.RotationModel('rotations.rot')



# Find plate ID of the point at the 'from' time.

plate_partitioner_at_from_time = pygplates.PlatePartitioner('static_polygons.gpml', rotation_model, from_time)

polygon_containing_point = plate_partitioner_at_from_time.partition_point(point_at_from_time)

point_plate_id = 0

if polygon_containing_point:

    point_plate_id = polygon_containing_point.get_feature().get_reconstruction_plate_id()



# Create the point feature with a present-day geometry that is reverse reconstructed from the 'from' time to present day.

point_feature = pygplates.Feature()

point_feature.set_reconstruction_plate_id(point_plate_id)

point_feature.set_geometry(

    point_at_from_time,

    reverse_reconstruct=(rotation_model, from_time))



# Reconstruct from present day to the ‘to’ time.

reconstructed_points = []

pygplates.reconstruct(point_feature, rotation_model, reconstructed_points, to_time)



point_at_to_time = reconstructed_points[0].get_reconstructed_geometry()





I’ll look into adding a new reconstruct function with a ‘from’ and ‘to’ time that can reconstruct in either direction (backward or forward in time) but does not require creating a pygplates.Feature<https://protect-au.mimecast.com/s/6_7TCk8vAZtGO2LEuNBN2P?domain=gplates.org> …





# Reconstruct from the ‘from’ time to the ‘to’ time.

points_at_to_time = []

pygplates.reconstruct_geometries(point_at_from_time, rotation_model, points_at_to_time, point_plate_id, to_time, from_time)



point_at_to_time = points_at_to_time[0]



Regards,

John



From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> On Behalf Of Ben Mather
Sent: Wednesday, 1 May 2019 2:40 PM
To: gplates-discuss at mailman.sydney.edu.au
Subject: [GPlates-discuss] Reverse reconstruction in pyGPlates



Hi team!

This is quite a basic question... Say that I have some point data from 10 Ma that I want to move to 9Ma. Is there a simple way to do this? Currently I create a point feature, assign plate IDs from reconstructed polygons at 10 Ma, use pygplates.reverse_reconstruct to move the points to the present day location, then use pygplates.reconstruct to move them back to 9Ma.

I was expecting that pygplates.reverse_reconstruct would have an optional 'to' argument to accept times other than the present day, or perhaps the Feature class would have a 'set_reconstruction_time' method that would be compatible with the reconstruct function. Is there a suggested workflow for this that I haven't discovered?

Many thanks,
Ben


--

Dr. Ben Mather | Computational Geophysicist

Room 418, Madsen Building F09

School of Geoscience, Faculty of Science

The University of Sydney, NSW 2006

m +61 422 470 117

w benmather.info<https://protect-au.mimecast.com/s/8ss2C71ZgLt7AGPgIWEAuf?domain=benmather.info>

t https://protect-au.mimecast.com/s/JwUMC81Zj6t46NJGt25eHO?domain=twitter.com<https://protect-au.mimecast.com/s/fde-C91ZkQt7k4Z0IO_Ctv?domain=twitter.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.sydney.edu.au/pipermail/gplates-discuss/attachments/20190502/94f3b267/attachment.html>


More information about the GPlates-discuss mailing list