From 8881c6fdf18ea92fc47a9bf9c84ba5cd58218da4 Mon Sep 17 00:00:00 2001 From: Jochem Smit Date: Fri, 22 Nov 2024 13:51:49 +0100 Subject: [PATCH] add result to bursts --- templates/07_c_kde.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/07_c_kde.py b/templates/07_c_kde.py index 53b29b0..77bfc38 100644 --- a/templates/07_c_kde.py +++ b/templates/07_c_kde.py @@ -45,17 +45,15 @@ kde_data = photons.data.select( [pl.col("timestamps"), pl.col("stream"), pl.lit(DA).alias("DA"), pl.lit(DD).alias("DD")] ) -kde_rates = kde_data # 500 ms fret_2cde = compute_fret_2cde(bursts.photon_data, kde_data) +# modify bursts inplace +bursts.burst_data = bursts.burst_data.with_columns(pl.lit(fret_2cde).alias("fret_2cde")) # %% -burst_photons = bursts.photon_data -joined_df = burst_photons.join(kde_rates, on=["timestamps"], how="left").filter( - pl.col("stream") == pl.col("stream_right") -) + # %%