get the quaternions at given times for plate IDs.




times : a list of times, such as times=10,20,30. a single time can also be used, such as times=100 [required]

pids : a list of plate ids [required]

model : name for reconstruction model [defaults to default model from web service settings]. User can get a list of available model names at https://gws.gplates.org/list/model_names

group_by_pid : group the results by plate IDs

start : start age, such as "start=1"

end : end age, such as "end=100"

step : the size of step from start age to end age, such as "step=1"


🟢 E1: get quaternions at 100Ma for plate id 701


🟢 E2: get quaternions at 100Ma for plate id 701


🟢 E3: get euler pole and rotation angle at 100Ma for all plate ids


🟢 E4: get euler pole and rotation angle from 1Ma to 100Ma with step 2Ma; group the results by plate ids


🟢 E5: a Python example. the file can be found at https://github.com/GPlates/gplates-web-service/blob/master/examples/get_rotation_with_web_service.py

import json
import random
import requests
SERVER_URL = "https://gws.gplates.org"
time = 100.0
# get all the plate IDs in the reconstruction tree at 100Ma
url = f"{SERVER_URL}/rotation/get_plate_ids?time={time}"
r = requests.get(url)
pids = json.loads(r.text)
# print(pids)
# pick up 10 random plate IDs from above plate IDs
random_pids = [pids[random.randint(0, len(pids) - 1)] for _ in range(10)]
times = list(range(0, 101, 10)) # give a list of times
# get quaternions for each time and plate ID
# if the plate id does not exist at the time, return identity rotation [1.0, 0.0, 0.0, 0.0](not moving)
url = f"{SERVER_URL}/rotation/get_quaternions?times={times}&pids={random_pids}"
# print(url)
r = requests.get(url)
ret = json.loads(r.text)
print(json.dumps(ret, indent=4, sort_keys=True))