plenoptic.data.fetch_data#

plenoptic.data.fetch_data(dataset_name)[source]#

Download data, using pooch. These are largely used for testing.

To view list of downloadable files, look at DOWNLOADABLE_FILES.

This checks whether the data already exists and is unchanged and downloads again, if necessary. If dataset_name ends in .tar.gz, this also decompresses and extracts the archive, returning the Path to the resulting directory. Else, it just returns the Path to the downloaded file.

Parameters:

dataset_name (str) – Name of the dataset to download.

Return type:

Path

Returns:

path – Path of the downloaded dataset.

Examples

>>> import plenoptic as po
>>> path = po.data.fetch_data("portilla_simoncelli_images.tar.gz")
>>> len(list(path.glob("*")))
38
>>> img = po.load_images(path / "fig3b.jpg")
>>> po.plot.imshow(img)
<PyrFigure size ...>

(png, hires.png, pdf)

../../_images/plenoptic-data-fetch_data-1.png