Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

“Data Science using

....???…. In …???….”

“Data Analysis and


Interpretation in Earth
Science”

Seismic Analysis Using


Python
Note 1

By:
Abd-Alrahmen Mohamed
Mahmoud Badawy

3/29/2024 1
$?

3/29/2024 Dr. Mahmoud Badawy 2


$?

3/29/2024 Dr. Mahmoud Badawy 3


What happened!
Open what?
Using what?

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.
3/29/2024 Dr. Mahmoud Badawy 4
It’s how you make software (Using Software)?????? Data Analyst?
What do you want to [code, build, debug, deploy, collaborate Data Science?
on, analyze, learn] today? Machine Learning?
Artificial Intelligent?

Computer Science
Students!!!!!!

Code faster
Work smarter
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.

3/29/2024 Dr. Mahmoud Badawy 6


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.

3/29/2024 Dr. Mahmoud Badawy 7


Language Time!

3/29/2024 Dr. Mahmoud Badawy 8


3/29/2024 Dr. Mahmoud Badawy 9
3/29/2024 Dr. Mahmoud Badawy 10
3/29/2024 Dr. Mahmoud Badawy 11
3/29/2024 Dr. Mahmoud Badawy 12
3/29/2024 Dr. Mahmoud Badawy 13
3/29/2024 Dr. Mahmoud Badawy 14
3/29/2024 Dr. Mahmoud Badawy 15
3/29/2024 Dr. Mahmoud Badawy 16
3/29/2024 Dr. Mahmoud Badawy 17
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
Pip install pandas
Pip install canavas
3/29/2024 Dr. Mahmoud Badawy 18
Python Language to handle with seismic specific libraries:
import numpy as np
import matplotlib.pyplot as plt
from obspy.io.segy.segy import _read_segy
stream = _read_segy('C:/Users/M.M.Badawy/Desktop/Name of Data Folder/X-Line 1.segy', headonly = True)

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')

3/29/2024 Dr. Mahmoud Badawy 19


3/29/2024 Dr. Mahmoud Badawy 20
3/29/2024 Dr. Mahmoud Badawy 21
>>>print (“Thanks”)

Thanks

3/29/2024 Dr. Mahmoud Badawy 22


import numpy as np
import matplotlib.pyplot as plt
from obspy.io.segy.segy import _read_segy

one_trace = stream.traces[3]

data = np.stack(t.data for t in stream.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')

3/29/2024 Dr. Mahmoud Badawy 23


3/29/2024 Dr. Mahmoud Badawy 24
3/29/2024 Dr. Mahmoud Badawy 25
3/29/2024 Dr. Mahmoud Badawy 26
3/29/2024 Dr. Mahmoud Badawy 27
3/29/2024 Dr. Mahmoud Badawy 28

You might also like