-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |