Euler Pole And Angle
Euler Pole And Angle
Description:
HTTP GET request to get the finite rotation as a tuple of pole longitude, pole latitude and angle (all in degrees) at given times for some plate IDs.
Endpoint:
https://gws.gplates.org/rotation/get_euler_pole_and_angle
Parameters:
times : a list of times, such as
times=10,20,30
. a single time can also be used, such astimes=100
[required]pids : a list of plate IDs [required]
model : name for the reconstruction model (if not specified, will use the default model)
group_by_pid : group the results by plate IDs
start : start time, such as "start=1"
end : end time, such as "end=100"
step : the size of step from start time to end time, such as "step=1"
Return:
[pole_lon, pole_lat, angle]
Examples:
🟢 E1: get Euler pole and rotation angle at 100Ma for plate ID 701
Click this link to try this example in a web browser.
Alternatively, use curl command.
curl "https://gws.gplates.org/rotation/get_euler_pole_and_angle?times=100&pids=701"
🟢 E2: get Euler pole and rotation angle at 10Ma, 50Ma, 100Ma for plate IDs 701, 801, 901
Click this link to try this example in a web browser.
Alternatively, use curl command.
curl "https://gws.gplates.org/rotation/get_euler_pole_and_angle?times=10,50,100&pids=701,801,901"
🟢 E3: get Euler pole and rotation angle at 10Ma, 50Ma, 100Ma for all plate IDs
Click this link to try this example in a web browser.
Alternatively, use curl command.
curl "https://gws.gplates.org/rotation/get_euler_pole_and_angle?times=10,50,100"
🟢 E4: get Euler pole and rotation angle from 1Ma to 100Ma with step 2Ma for plate ID 701, 801, 901. group the results by plate IDs
Click this link to try this example in a web browser.
Alternatively, use curl command.
curl "https://gws.gplates.org/rotation/get_euler_pole_and_angle?start=1&end=100&step=2&pids=701,801,901&group_by_pid"
🟢 E5: a Python example. The Python file can be found at https://github.com/GPlates/gplates-web-service/blob/master/examples/get_rotation_with_web_service.py
import jsonimport randomimport requestsSERVER_URL = "https://gws.gplates.org"time = 100.0# get all the plate IDs in the reconstruction tree at 100Maurl = 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 IDsrandom_pids = [pids[random.randint(0, len(pids) - 1)] for _ in range(10)]print(random_pids)times = list(range(0, 101, 10)) # give a list of times# get euler pole and angle for each time and plate ID# if the plate id does not exist at the time, return identity rotation [0.0, 90.0, 0.0](not moving)# data format [lon, lat, angle]url = f"{SERVER_URL}/rotation/get_euler_pole_and_angle?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))