Exemple #1
0
 def distance_plot(self, geodyn_model='', point=positions.SeismoPoint(1., 0., 0.)):
     """ Plot proxy as function of the angular distance with point G """
     # user should use pyplot.plot functions in the main code
     fig, ax = plt.subplots()
     _, theta, phi = self.extract_rtp("bottom_turning_point")
     theta1, phi1 = point.theta, point.phi
     distance = positions.angular_distance_to_point(
         theta, phi, theta1, phi1)
     ax.plot(distance, self.proxy, '.')
     title = "Dataset: {},\n geodynamic model: {}".format(
         self.name, geodyn_model)
     plt.title(title)
     plt.xlabel(
         "Angular distance between turning point and ({} {})".format(theta1, phi1))
     plt.ylabel("proxy")
data_set.method = "bt_point"
proxy = geodyn.evaluate_proxy(data_set, geodynModel, verbose = False)
data_set.plot_c_vec(geodynModel, proxy=proxy)


# ### Random data set, with "realistic" repartition

# In[6]:

# random data set
data_set_random = data.RandomData(3000)
data_set_random.method = "bt_point"

proxy_random = geodyn.evaluate_proxy(data_set_random, geodynModel, verbose=False)
r, t, p = data_set_random.extract_rtp("bottom_turning_point")
dist = positions.angular_distance_to_point(t, p, *velocity_center)


#data_set_random.map_plot(geodynModel.name)
#data_set_random.phi_plot(geodynModel.name)
#data_set_random.distance_plot(geodynModel.name, positions.SeismoPoint(1., 0., -80.)) 


# In[7]:

## map
m, fig = plot_data.setting_map() 
cm = plt.cm.get_cmap('RdYlBu')
x, y = m(p, t)
sc = m.scatter(x, y, c=proxy_random, zorder=10, cmap=cm)
plt.title("Dataset: {},\n geodynamic model: {}".format(data_set_random.name, geodynModel.name))