Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Tools to load hydrographic data as pandas DataFrame with some handy methods for
data pre-processing and analysis

This module can load [SeaBird CTD (CNV)](https://www.seabird.com/software/SBEDataProcforWindows.htm),
This module can load [SeaBird CTD (CNV)](https://www.seabird.com/),
[Sippican XBT (EDF)](https://www.lockheedmartin.com/en-us/products/oceanographic-instrumentation.html),
and [Falmouth CTD (ASCII)](https://www.falmouth.com/) formats.

Expand Down
2 changes: 1 addition & 1 deletion ctd/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def plot_cast(df, secondary_y=False, label=None, ax=None, *args, **kwargs):

if isinstance(df, pd.DataFrame):
labels = label if label else df.columns
for k, (col, series) in enumerate(df.iteritems()):
for k, (col, series) in enumerate(df.items()):
ax.plot(series, series.index, label=labels[k])
elif isinstance(df, pd.Series):
label = label if label else str(df.name)
Expand Down
2 changes: 1 addition & 1 deletion ctd/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def from_btl(fname):
df["Bottle"] = df["Bottle"].fillna(method="ffill")
df["Date"] = df["Date"].fillna(method="ffill")

df["Statistic"] = df["Statistic"].str.replace(r"\(|\)", "") # (avg) to avg
df["Statistic"] = df["Statistic"].str.lstrip("(").str.rstrip(")") # (avg) to avg

if "name" not in metadata:
name = _basename(fname)[1]
Expand Down
10 changes: 5 additions & 5 deletions notebooks/quick_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"from matplotlib import style\n",
"\n",
"style.use(\"seaborn-whitegrid\")\n",
"\n",
"style.use(\"seaborn-v0_8-whitegrid\")\n",
"\n",
"down[\"t090C\"].plot_cast()\n",
"down[\"c0S/m\"].plot_cast()"
"down[\"c0S/m\"].plot_cast();"
]
},
{
Expand Down Expand Up @@ -171,6 +169,7 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"\n",
"fig, ax = plt.subplots()\n",
"ax.plot(down.index, label=\"unfiltered\")\n",
"ax.plot(down.lp_filter().index, label=\"filtered\")\n",
Expand Down Expand Up @@ -234,6 +233,7 @@
"source": [
"import gsw\n",
"\n",
"\n",
"p = proc.index\n",
"\n",
"SP = gsw.SP_from_C(proc[\"c0S/m\"].to_numpy() * 10.0, proc[\"t090C\"].to_numpy(), p)\n",
Expand Down Expand Up @@ -360,7 +360,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down