Test combination/ extension of existing history files with new events


In [1]:
import sys, os
import matplotlib.pyplot as plt
# adjust some settings for matplotlib
from matplotlib import rcParams
# print rcParams
rcParams['font.size'] = 15
# determine path of repository to set paths corretly below
os.chdir(r'/Users/flow/git/pynoddy/docs/notebooks/')
repo_path = os.path.realpath('../..')
import pynoddy

In [2]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [ ]:
# Change to sandbox directory to store results
os.chdir(os.path.join(repo_path, 'sandbox'))
# Path to exmaple directory in this repository
example_directory = os.path.join(repo_path,'examples')

In [8]:
# Compute noddy model for history file
reload(pynoddy.history)
history_file = 'simple_two_faults.his'
history = os.path.join(example_directory, history_file)
output_name = 'noddy_out'
H1 = pynoddy.history.NoddyHistory(history)


 STRATIGRAPHY
 FAULT
 FAULT

In [9]:
pynoddy.compute_model(history, output_name) 
NO1 = pynoddy.output.NoddyOutput(output_name)

In [10]:
NO1.plot_section('y')



In [6]:
H1.all_events_begin


Out[6]:
7

In [7]:
H1.all_events_end


Out[7]:
761

In [11]:
H1.n_events


Out[11]:
3

In [12]:
H1.history_lines[:2]


Out[12]:
['#Filename = simple_two_faults.his\n', '#Date Saved = 24/3/2014 14:21:0\n']

In [23]:
# Compute noddy model for history file
reload(pynoddy.history)
history_file = 'simple_two_faults.his'
history = os.path.join(example_directory, history_file)
output_name = 'noddy_out'
H1 = pynoddy.history.NoddyHistory(history)


 STRATIGRAPHY
 FAULT
 FAULT

In [24]:
H1.info()


This model consists of 3 events:
	(1) - STRATIGRAPHY
	(2) - FAULT
	(3) - FAULT

In [26]:
H1.get_extent()
H1.get_origin()


Out[26]:
(0.0, 0.0, 5000.0)

In [27]:
H1.extent_x


Out[27]:
10000.0

In [22]:


In [ ]: