Skip to content

Commit

Permalink
switch to new mean vector function of mplstereonet
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias47n9e committed Jul 4, 2015
1 parent aebe081 commit ef3603c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions innstereo/main_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,14 +1092,10 @@ def on_toolbutton_mean_vector_clicked(self, toolbutton):
total_dipdir.append(x)
total_dip.append(y)

lon, lat = mplstereonet.line(total_dip, total_dipdir)
mean_vec, r_value = mplstereonet.stereonet_math.mean_vector(lon, lat)
dipdir, dip = self.convert_lonlat_to_dipdir(mean_vec[0], mean_vec[1])

vector, r_value = mplstereonet.find_mean_vector(dip, dipdir)
new_store, new_lyr_obj = self.add_layer_dataset("eigenvector")
new_lyr_obj.set_label("Mean Vector")
self.add_linear_feature(new_store, dipdir, dip, r_value)

self.add_linear_feature(new_store, vector[1], vector[0], r_value)
self.redraw_plot()

def convert_lonlat_to_dipdir(self, lon, lat):
Expand Down

0 comments on commit ef3603c

Please sign in to comment.