Beispiel #1
0
# fill_param = 'beta'
# fill_param = 'Lambda'
use_periods = sorted(list(data.narrow_periods.keys()))
# use_periods = data.sites[data.site_names[0]].periods
x_scale, y_scale = 1, 120
save_fig = 1
freq_skip = 2
radius = 20
label_offset = -4.5
file_path = local_path + '/phd/ownCloud/Documents/ME_Transects/Dryden_paper/RoughFigures/'
file_name = 'pt_pseudosection_phi2'
file_types = ['.pdf', '.png']  #, '.ps', '.png')
dpi = 600
linear_xaxis = True
# cmap = cm.jet_plus_r(64)
cmap = cm.jet(64)
# cmap = cm.bwr(64)

data.locations = data.get_locs(mode='latlong')
main_transect.locations = main_transect.get_locs(mode='latlong')
for ii, site in enumerate(data.site_names):
    easting, northing = utils.project(
        (data.locations[ii, 1], data.locations[ii, 0]), zone=16,
        letter='U')[2:]
    data.locations[ii, 1], data.locations[ii, 0] = easting, northing
    data.sites[site].locations['X'], data.sites[site].locations[
        'Y'] = northing, easting
for ii, site in enumerate(main_transect.site_names):
    easting, northing = utils.project(
        (main_transect.locations[ii, 1], main_transect.locations[ii, 0]),
        zone=16,
Beispiel #2
0
import numpy as np
import pyMT.data_structures as WSDS
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from e_colours import colourmaps as cm
import pyMT.utils as utils
import pyMT.gplot as gplot
from copy import deepcopy
from scipy.spatial.distance import euclidean

cmap = cm.jet()


def normalize_ellipse(phi):
    phi_min = abs(phi.phi_min)
    phi_max = abs(phi.phi_max)
    phi_min, phi_max = utils.normalize([phi_min, phi_max])
    return phi_min, phi_max


def plot_ellipse(data, fill_param):
    ells = []
    # data.locations = data.get_locs(mode='latlong')
    for site_name in data.site_names:
        site = data.sites[site_name]
        jx = np.cos(np.arange(0, 2 * np.pi, np.pi / 30))
        jy = np.sin(np.arange(0, 2 * np.pi, np.pi / 30))
        phi_x = site.phase_tensors[-6].phi[
            1, 1] * jx + site.phase_tensors[-6].phi[1, 0] * jy
        phi_y = site.phase_tensors[-6].phi[
            0, 1] * jx + site.phase_tensors[-6].phi[0, 0] * jy