Skip to content

Commit

Permalink
add sample data using HIV dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
brisvag committed Jul 12, 2024
1 parent 591bd2b commit 9cc1e95
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/blik/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ contributions:
- id: blik.read_files
python_name: blik.reader:get_reader
title: "Open files with blik"
# samples
- id: blik.sample_hiv_dataset
python_name: blik.remote_data:load_hiv_dataset
title: "Open sample HIV VLPs dataset"
# writers
- id: blik.write_image
python_name: blik.writer:write_image
Expand Down Expand Up @@ -135,3 +139,8 @@ contributions:
display_name: "Gaussian filter"
- command: blik.power_spectrum
display_name: "Power spectrum"

sample_data:
- command: blik.sample_hiv_dataset
key: blik_hiv_dataset
display_name: "Tomogram and particles of HIV VLPs"
14 changes: 14 additions & 0 deletions src/blik/remote_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pooch

from .reader import read_layers


def load_hiv_dataset():
reg = pooch.create(
path=pooch.os_cache("blik"),
base_url='doi:10.5281/zenodo.6504891/',
)
reg.load_registry_from_doi()

paths = [reg.fetch(f) for f in reg.registry_files]
return read_layers(*paths)

0 comments on commit 9cc1e95

Please sign in to comment.