Skip to content

Commit

Permalink
update template file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhsmit committed Dec 4, 2024
1 parent cedf917 commit a51ae0b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions templates/01_load_datafile_1.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# %%

# %load_ext autoreload
# %autoreload 2

# %%
from pathlib import Path

# %%
from dont_fret.config import CONFIG_DEFAULT_DIR, cfg, update_config_from_yaml
from dont_fret.fileIO import PhotonFile
from dont_fret.models import PhotonData
from dont_fret.process import process_photon_data

# %%
cwd = Path(__file__).parent
test_data_dir = cwd.parent / "tests" / "test_data" / "input" / "ds1"
output_data_dir = cwd.parent / "tests" / "test_data" / "output"
ptu_file = "datafile_1.ptu"

# %%
photons = PhotonData.from_file(PhotonFile(test_data_dir / ptu_file))

# %%
# select a config
update_config_from_yaml(CONFIG_DEFAULT_DIR / "default_web.yaml")

bursts = photons.burst_search("DCBS")
bursts.burst_data

# %%

bursts = bursts.alex_2cde(photons).fret_2cde(photons)

bursts.burst_data

# %%
# process photon data to get DCBS bursts
photons = PhotonData.from_file(PhotonFile(test_data_dir / ptu_file))
bursts = process_photon_data(photons, cfg.burst_search["DCBS"], cfg.aggregations, cfg.transforms)

0 comments on commit a51ae0b

Please sign in to comment.