[cig-commits] [commit] master: remove unused code from seismic (1a8aee7)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Dec 10 21:39:13 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : master
Link       : https://github.com/geodynamics/burnman/compare/ab0efb9b1ff17b6d893db6c4d457836c768cdd59...f76fd51b3334a16aae97d4dd7ab1f0204e1d2eb0

>---------------------------------------------------------------

commit 1a8aee7b0c1706b014941a083b5c64401e0b9cf6
Author: Timo Heister <timo.heister at gmail.com>
Date:   Thu Dec 11 00:33:45 2014 -0500

    remove unused code from seismic


>---------------------------------------------------------------

1a8aee7b0c1706b014941a083b5c64401e0b9cf6
 burnman/seismic.py | 30 ++++--------------------------
 1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/burnman/seismic.py b/burnman/seismic.py
index e64a6b5..74bc9eb 100644
--- a/burnman/seismic.py
+++ b/burnman/seismic.py
@@ -371,31 +371,9 @@ def attenuation_correction(v_p,v_s,v_phi,Qs,Qphi):
     v_phi= v_phi*(1.-1./2.*cot*1./Qphi)
     return v_p, v_s, v_phi
 
-# shared variable of prem, so that other routines do not need to create
-# prem over and over. See geotherm for example.
+"""
+shared variable of prem, so that other routines do not need to create
+prem over and over. See geotherm for example.
+"""
 prem_model = PREM()
 
-if __name__ == "__main__":
-    #create a seismic dataset from prem:
-    s=PREM()
-    depths = s.internal_depth_list()
-    pressures, density, v_p, v_s, v_phi = s.evaluate_all_at(depths)
-
-    # plot vs and vp and v_phi (note that v_phi is computed!)
-    plt.plot(depths/1.e3,v_p/1.e3,'+-r', label='v_p')
-    plt.plot(depths/1.e3,v_s/1.e3,'+-b', label='v_s')
-    plt.plot(depths/1.e3,v_phi/1.e3,'--g', label='v_phi')
-    plt.legend()
-    plt.xlabel('depth in km')
-    plt.ylabel('km/s')
-    plt.show()
-
-    s1=PREM()
-    depths=s1.internal_depth_list()
-    pressures, density, v_p, v_s, v_phi = s1.evaluate_all_at(depths)
-    plt.plot(depths/1.e3,v_p/1.e3,'+-r', label='v_p')
-    plt.plot(depths/1.e3,v_s/1.e3,'+-b', label='v_s')
-    plt.plot(depths/1.e3,v_phi/1.e3,'--g', label='v_phi')
-
-
-



More information about the CIG-COMMITS mailing list