<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 EXERCISE — well log calculations
This notebook looks at reading a well log, performing some petrophysical calculations.
First, the usual preliminaries.
Step1:  Q
Step2:  Q. Write a function that converts slowness (us/m) into velocity (m/s) your code here
Step3:  Q. Create an acoustic impedance log
Step4:  Q. Using a Sand-Shale cutoff for Gamma-Ray of 60 API, what is the Gross sand thickness from 2200 - 3000 m?
Step5:  Q. Use the porosity log, NPHISS to determine the average value of porosity for a) sands, b) shales, c) carbonates.
Step6:  Q. Explore the data distributions based on the actual lithologies based in
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
from welly import Well
% matplotlib inline
ls
data_dir = 'data/'
fname = 'L30.las'
file = data_dir + '/' + fname
Explanation: EXERCISE — well log calculations
This notebook looks at reading a well log, performing some petrophysical calculations.
First, the usual preliminaries.
End of explanation
# your code here
# it should looks like this
well
pslow = well.data['DT']
rhob = well.data['RHOB']
gr = well.data['GRD']
Explanation: Q: from welly's Well module, use the from_las function to create a well object from the las file
End of explanation
# your code here
Explanation: Q. Write a function that converts slowness (us/m) into velocity (m/s) your code here
End of explanation
# your code here
Explanation: Q. Create an acoustic impedance log
End of explanation
# your code here
Explanation: Q. Using a Sand-Shale cutoff for Gamma-Ray of 60 API, what is the Gross sand thickness from 2200 - 3000 m?
End of explanation
# your code here
Explanation: Q. Use the porosity log, NPHISS to determine the average value of porosity for a) sands, b) shales, c) carbonates.
End of explanation
lithfile = 'data/L30_samples.txt'
Explanation: Q. Explore the data distributions based on the actual lithologies based in
End of explanation
<END_TASK>