Vertical acceleration correction

Vertical acceleration correction#

[1]:
import cmocean
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import verde as vd

import airbornegeo

Load data#

This is a subset of the BAS AGAP survey over Antarctica’s Gamburtsev Subglacial Mountains. The file is downloaded and subset in the notebook AGAP_gravity_survey. It has a pre-computed vertical acceleration correction, which we will compare our computed values to.

[2]:
data_df = pd.read_csv("data/AGAP_gravity_survey.csv")
print(data_df.columns)
data_df.head()
Index(['Lon', 'Lat', 'Height_WGS1984', 'Date', 'Time', 'ST', 'CC', 'RB',
       'XACC', 'LACC', 'Still', 'Base', 'ST_real', 'Beam_vel', 'rec_grav',
       'Abs_grav', 'VaccCor', 'EotvosCor', 'LatCor', 'FaCor', 'HaccCor',
       'Free_air', 'FAA_filt', 'FAA_clip', 'Level_cor', 'FAA_level',
       'Fa_4600m', 'easting', 'northing', 'line_name', 'line', 'unixtime'],
      dtype='str')
[2]:
Lon Lat Height_WGS1984 Date Time ST CC RB XACC LACC ... FAA_filt FAA_clip Level_cor FAA_level Fa_4600m easting northing line_name line unixtime
0 77.252450 -80.583923 4156.1 2008-12-17 0 days 09:42:48 11934.47 2.61 -659.0 -49.0 273.0 ... 49.38 49.38 7.03 42.4 40.8 1.000024e+06 226237.330771 11_DA500 1 1.229507e+09
1 77.252672 -80.583377 4156.0 2008-12-17 0 days 09:42:49 11934.47 2.72 -368.6 -321.0 230.0 ... 49.45 49.45 7.04 42.4 40.8 1.000083e+06 226246.631269 11_DA500 1 1.229507e+09
2 77.252901 -80.582831 4156.1 2008-12-17 0 days 09:42:50 11888.95 -2.08 703.1 433.0 146.0 ... 49.52 49.52 7.04 42.5 40.9 1.000142e+06 226255.809132 11_DA500 1 1.229507e+09
3 77.253131 -80.582285 4156.4 2008-12-17 0 days 09:42:51 11888.95 0.50 625.1 566.0 223.0 ... 49.58 49.58 7.03 42.5 40.9 1.000201e+06 226264.969079 11_DA500 1 1.229507e+09
4 77.253358 -80.581740 4156.6 2008-12-17 0 days 09:42:52 11888.95 -1.73 575.1 108.0 205.0 ... 49.65 49.65 7.04 42.6 41.0 1.000260e+06 226274.156809 11_DA500 1 1.229507e+09

5 rows × 32 columns

[ ]:
survey = airbornegeo.Survey(
    data_df,
    line_column="line",
    time_column="unixtime",
    height_column="Height_WGS1984",
)
[ ]:
survey.along_track_distance()
data_df = survey.data
[ ]:
# get only the raw columns
# we will perform the corrections ourselves and compare to their values
survey.data = survey.data[
    [
        "VaccCor",
        "Lon",
        "Lat",
        "Height_WGS1984",
        "easting",
        "northing",
        "unixtime",
        "line",
        "distance_along_line",
    ]
]
data_df = survey.data
data_df.head()

Vertical acceleration#

[ ]:
survey.vertical_acceleration(
    smoothing_window=3,
    time_threshold=10,
)

# convert from m/s^2 to mGals
survey.data["vertical_acceleration"] *= 10**5
data_df = survey.data
data_df.head()

Compare the results#

[ ]:
df = data_df[data_df.line == 4]
ylim = vd.minmax(df.VaccCor)
ax = df.plot.line(
    "distance_along_line",
    "VaccCor",
    style="bp",
    ms=0.6,
    label="Published values",
    title=f"Line {df.line.unique()[0]}",
    ylim=ylim,
)
ax = df.plot.line(
    "distance_along_line",
    "vertical_acceleration",
    style="rp",
    ms=0.6,
    title=f"Line {df.line.unique()[0]}",
    label="Calculated values",
    ax=ax,
    ylim=ylim,
)
ax.set_ylabel("Vertical acceleration (mGal)")
[ ]:
data_df["difference"] = data_df["VaccCor"] - data_df["vertical_acceleration"]
[ ]:
fig, axs = plt.subplots(3, 1, figsize=(6, 12))

max_abs = vd.maxabs(data_df.VaccCor, percentile=95)

ax = data_df.plot.scatter(
    "easting",
    "northing",
    c="vertical_acceleration",
    s=0.6,
    ax=axs[0],
    cmap=cmocean.cm.balance,
    vmin=-max_abs,
    vmax=max_abs,
    colorbar=False,
    title="Our vertical acceleration",
)
ax.set_aspect("equal")
plt.colorbar(ax.collections[0], ax=ax, shrink=0.8)

ax = data_df.plot.scatter(
    "easting",
    "northing",
    c="difference",
    s=0.6,
    ax=axs[1],
    cmap=cmocean.cm.balance,
    vmin=-max_abs,
    vmax=max_abs,
    colorbar=False,
    title="Difference",
)
ax.set_aspect("equal")
plt.colorbar(ax.collections[0], ax=ax, shrink=0.8)

ax = data_df.plot.scatter(
    "easting",
    "northing",
    c="VaccCor",
    s=0.6,
    ax=axs[2],
    cmap=cmocean.cm.balance,
    vmin=-max_abs,
    vmax=max_abs,
    colorbar=False,
    title="Published vertical acceleration",
)
ax.set_aspect("equal")
plt.colorbar(ax.collections[0], ax=ax, shrink=0.8)

plt.tight_layout()
plt.show()
[ ]:
sns.histplot((data_df.difference), kde=True)
plt.title(
    f"Vertical acceleration difference with published values, RMSE:{round(airbornegeo.rmse(data_df.difference), 2)} mGal"
)
plt.show()