diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d01f699f..eeaf7572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,6 @@ on: branches: - main pull_request: - branches: - - main jobs: lint: diff --git a/notebooks/5.2-mpm-bg_biolume-PiO-paper.ipynb b/notebooks/5.2-mpm-bg_biolume-PiO-paper.ipynb index 0d1d7ef0..f7a289b5 100644 --- a/notebooks/5.2-mpm-bg_biolume-PiO-paper.ipynb +++ b/notebooks/5.2-mpm-bg_biolume-PiO-paper.ipynb @@ -151,9 +151,9 @@ "\n", " # Find the high and low peaks\n", " peaks, _ = signal.find_peaks(df[\"biolume_raw\"], height=max_bg)\n", - " s_peaks = pd.Series(df[\"biolume_raw\"][peaks], index=df.index[peaks])\n", - " nbflash_high = s_peaks[s_peaks > (pd.Series(s_med_bg[peaks], index=df.index[peaks]) + flash_threshold)]\n", - " nbflash_low = s_peaks[s_peaks <= (pd.Series(s_med_bg[peaks], index=df.index[peaks]) + flash_threshold)]\n", + " s_peaks = pd.Series(df[\"biolume_raw\"].iloc[peaks], index=df.index[peaks])\n", + " nbflash_high = s_peaks[s_peaks > (pd.Series(s_med_bg.iloc[peaks], index=df.index[peaks]) + flash_threshold)]\n", + " nbflash_low = s_peaks[s_peaks <= (pd.Series(s_med_bg.iloc[peaks], index=df.index[peaks]) + flash_threshold)]\n", " nbflash_high_plot = nbflash_high.rename(\"nbflash_high\").hvplot(kind=\"scatter\", color=\"red\", marker=\"star\", s=50)\n", " nbflash_low_plot = nbflash_low.rename(\"nbflash_low\").hvplot(kind=\"scatter\", color=\"goldenrod\", marker=\"star\", s=50)\n", "\n", @@ -206,7 +206,7 @@ "outputs": [], "source": [ "# Compute flashes per liter - Units: flashes per liter = (flashes per second / mL/s) * 1000 mL/L\n", - "flow = ds_align[[\"biolume_flow\"]].sel(biolume_time=slice(\"2021-04-13 10:00:00\", \"2021-04-13 10:10:00\"))[\"biolume_flow\"].to_pandas().resample(\"1S\").mean().fillna(method=\"ffill\")\n", + "flow = ds_align[[\"biolume_flow\"]].sel(biolume_time=slice(\"2021-04-13 10:00:00\", \"2021-04-13 10:10:00\"))[\"biolume_flow\"].to_pandas().resample(\"1S\").mean().ffill()\n", "nbflash_high_per_liter = nbflash_high_counts.divide(flow) * 1000\n", "nbflash_low_per_liter = nbflash_low_counts.divide(flow) * 1000\n", "\n", @@ -402,7 +402,7 @@ " if tv > s_peaks.index[k+1]:\n", " # Encountered a new simple_depth point\n", " k += 1\n", - " if abs(s_peaks[k+1] - s_peaks[k]) > depth_threshold:\n", + " if abs(s_peaks.iloc[k+1] - s_peaks.iloc[k]) > depth_threshold:\n", " # Completed downcast or upcast\n", " count += 1\n", " peaks_profiles.append(count)\n", @@ -443,7 +443,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.10.14" }, "vscode": { "interpreter": { @@ -452,5 +452,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/src/data/test_process_i2map.py b/src/data/test_process_i2map.py index 8d22ad9e..fd134014 100644 --- a/src/data/test_process_i2map.py +++ b/src/data/test_process_i2map.py @@ -30,7 +30,7 @@ def test_process_i2map(complete_i2map_processing): # but it will alert us if a code change unexpectedly changes the file size. # If code changes are expected to change the file size then we should # update the expected size here. - EXPECTED_SIZE_GITHUB = 58843 + EXPECTED_SIZE_GITHUB = 58836 EXPECTED_SIZE_ACT = 58816 EXPECTED_SIZE_LOCAL = 58896 if str(proc.args.base_path).startswith("/home/runner"):