3. Cross-over errors#
[1]:
%load_ext autoreload
%autoreload 2
import logging
import geopandas as gpd
import pandas as pd
import plotly.io as pio
import airbornegeo
# setup logging to get some additional info from the airbornegeo functions
logging.getLogger("airbornegeo").setLevel("INFO")
logging.basicConfig()
pio.renderers.default = "notebook"
/home/sungw937/airbornegeo/.pixi/envs/default/lib/python3.14/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
3.1. Load data#
This is a subset of the BAS AGAP survey over Antarctica’s Gamburtsev Subglacial Mountains. The file is download and subset in the notebook AGAP_magnetic_survey, and the BAS processing steps are repeated in the notebook processing_AGAP_magnetic_survey.
[2]:
data_df = pd.read_csv("data/AGAP_magnetic_survey_processed_blocked.csv")
data_df = data_df[
[
"easting",
"northing",
"height",
"line",
"unixtime",
"distance_along_line",
"mag",
]
]
# for testing limit number of lines
data_df = data_df[~data_df.line.between(133, 142)]
data_df = data_df[~data_df.line.between(168, 176)]
data_df = data_df[
(data_df.line.isin(data_df.line.unique()[::2])) | (data_df.line >= 143)
]
# define flight lines vs tie lines with column 'tie' which is True or False
data_df["tie"] = False
data_df.loc[data_df.line >= 142, "tie"] = True
data_df.head()
[2]:
| easting | northing | height | line | unixtime | distance_along_line | mag | tie | |
|---|---|---|---|---|---|---|---|---|
| 0 | 621099.093988 | 159056.748193 | 4110.45 | 1 | 1.229500e+09 | 27.181565 | -33.385 | False |
| 1 | 621206.517953 | 159071.301512 | 4114.50 | 1 | 1.229500e+09 | 135.587530 | -35.120 | False |
| 2 | 621313.794221 | 159085.113599 | 4117.90 | 1 | 1.229500e+09 | 243.749367 | -36.875 | False |
| 3 | 621420.722903 | 159099.184618 | 4120.80 | 1 | 1.229500e+09 | 351.600337 | -38.585 | False |
| 4 | 621527.158177 | 159114.303863 | 4123.15 | 1 | 1.229500e+09 | 459.104857 | -40.205 | False |
[3]:
data_df[data_df.tie].line.sort_values().unique()
[3]:
array([143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 177,
178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
204, 205, 206])
[4]:
data_df[~data_df.tie].line.sort_values().unique()
[4]:
array([ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51,
53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103,
105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129,
131])
[5]:
airbornegeo.plotly_points(
data_df,
color_col="line",
hover_cols=["distance_along_line"],
)