1. The following cells contain at least one programming bug each. For each cell add a comment to identify and explain the bug, and correct the program.
# Function to calculate wave velocity.
def wave_velocity(k, mu, rho):
vp = sqrt((k+4*mu/3)/rho)
return vp
# Use the function to calculate the velocity of an
# acoustic wave in water.
vp = wave_velocity(k=0, mu=2.29e9, rho=1000)
print "Velocity of acoustic wave in water: %d", vp
data = (3.14, 2.29, 10, 12)
data.append(4)
line = "2015-12-14T06:29:15.740Z,19.4333324,-155.2906647,1.66,2.14,ml,17,248,0.0123,0.36,hv,hv61126056,2015-12-14T06:34:58.500Z,5km W of Volcano, Hawaii,earthquake"
latitude = line.split(',')[1]
longitude = line.split(',')[2]
print "longitude, latitude = (%g, %g)"%(longitude, latitude)
2. The Ricker wavelet is frequently employed to model seismic data. The amplitude of the Ricker wavelet with peak frequency $f$ at time $t$ is computed as:
$$A = (1-2 \pi^2 f^2 t^2) e^{-\pi^2 f^2 t^2}$$
3. The data file vp.dat (all of the data files are stored in the sub-folder data/ of this notebook library) contains a profile of the acoustic velocity with respect to depth. Depth is measured with respect to a reference point; therefore the first few entries contain NaN's indicating that they are actually above ground.
4. The file BrachiopodBiometrics.csv contains the biometrics of Brachiopods found in 3 different locations.