4. What happened!
Open what?
Using what?
Dr. Mahmoud Badawy 4
Numerous step-by-step code
examples in the field of Earth Sciences.
Allows proficient use of Python in
visualizing, analyzing, and modelling
geological data.
Specifically minded for teaching
Python to geologists.
5/9/2022
5. It’s how you make software (Using Software)??????
What do you want to [code, build, debug, deploy, collaborate
on, analyze, learn] today?
Code faster
Work smarter
Data Analyst?
Data Science?
Machine Learning?
Artificial Intelligent?
Computer Science
Students!!!!!!
6. Type less, code more
IntelliCode is a powerful set of
automatic code completion tools
that understand your code context:
variable names, functions, and the
type of code you’re writing.
This makes IntelliCode able to
complete up to a whole line at once,
helping you code more accurately
and confidently.
Dr. Mahmoud Badawy 6
5/9/2022
7. Stop problems before they’re problems
Integrated debugging is a core part of every Visual
Studio product.
You can step through your code and look at the values
stored in variables, set watches on variables to see when
values change, examine the execution path of your code,
and just about anything else you need to check out under
the hood.
Dr. Mahmoud Badawy 7
5/9/2022
18. Dr. Mahmoud Badawy 18
Which prompt you will use
Cmd
Anaconda
Powershell
?
Library
Packages
Modules
Anaconda prompt:
pip install numpy
pip install matplotlib
pip install obspy
pip install segyio
Pip install petrel
pip install seismic_canvas
pip install seismic-attributes
5/9/2022
19. Python Language to handle with seismic specific libraries:
Dr. Mahmoud Badawy 19
stream = _read_segy('C:/Users/M.M.Badawy/Desktop/Name of Data Folder/X-Line 1.segy', headonly = True)
import numpy as np
import matplotlib.pyplot as plt
from obspy.io.segy.segy import _read_segy
plt.imshow(data.T, cmap="RdBu", min=-100, max=100, aspect='auto')
import numpy as np
import matplotlib.pyplot as plt
from obspy.io.segy.segy import _read_segy
one_trace = steam.traces[3]
data = np.stack(t.data for t in steam.traces)
data.shape
stream = _read_segy('C:/Users/M.M.Badawy/Desktop/SEGY/X-Line 5.segy', headonly = True)
plt.imshow(data.T, cmap="RdBu", vmin=-100, vmax=100, aspect='auto')
5/9/2022