diff --git a/src/blik/napari.yaml b/src/blik/napari.yaml index 9fc5717..b8c2912 100644 --- a/src/blik/napari.yaml +++ b/src/blik/napari.yaml @@ -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 @@ -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" diff --git a/src/blik/remote_data.py b/src/blik/remote_data.py new file mode 100644 index 0000000..0759ab4 --- /dev/null +++ b/src/blik/remote_data.py @@ -0,0 +1,25 @@ +import pooch + +from .reader import read_layers + + +def load_hiv_dataset(): + reg_tomo = pooch.create( + path=pooch.os_cache("blik"), + base_url="doi:10.5281/zenodo.6504891/", + ) + reg_tomo.load_registry_from_doi() + + # made separate zenodo entry for star file with pixel size + reg_picks = pooch.create( + path=pooch.os_cache("blik"), + base_url="doi:10.5281/zenodo.12743309/", + ) + reg_picks.load_registry_from_doi() + + paths = [ + reg_tomo.fetch("01_10.00Apx.mrc"), + reg_picks.fetch("01_10.00Apx.star"), + ] + + return read_layers(*paths)