-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from scipp/use-pooch
Use pooch to get tutorial data
- Loading branch information
Showing
9 changed files
with
41 additions
and
13 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) 2021 Scipp contributors (https://github.com/scipp) | ||
# @author Simon Heybrock | ||
import scipp as sc | ||
|
||
_version = '1' | ||
|
||
__all__ = ['tutorial_dense_data', 'tutorial_event_data'] | ||
|
||
|
||
def _make_pooch(): | ||
import pooch | ||
return pooch.create( | ||
path=pooch.os_cache('scippneutron'), | ||
base_url='https://public.esss.dk/groups/scipp/scippneutron/{version}/', | ||
version=_version, | ||
registry={ | ||
'powder-event.h5': 'md5:b8ad26eb3efc2159687134a5396a2671', | ||
'loki-at-larmor.hdf5': 'md5:6691ef98406bd4d526e2131ece3c8d69', | ||
}) | ||
|
||
|
||
_pooch = _make_pooch() | ||
|
||
|
||
def tutorial_dense_data(): | ||
return sc.io.open_hdf5(_pooch.fetch('loki-at-larmor.hdf5')) | ||
|
||
|
||
def tutorial_event_data(): | ||
return sc.io.open_hdf5(_pooch.fetch('powder-event.h5')) |
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
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
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