Skip to content

Commit f16c2b9

Browse files
authored
clarify fetch in tutorials (#468)
1 parent 015fe7a commit f16c2b9

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

docs/index.qmd

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ print(out_str)
3939

4040
```{python}
4141
import dascore as dc
42-
from dascore.utils.downloader import fetch
42+
# Import fetch to read DASCore example files
43+
from dascore.utils.downloader import fetch
4344
44-
# get a path to an example file, replace with your path
45+
# Fetch a sample file path from DASCore
4546
file_path = fetch('terra15_das_1_trimmed.hdf5')
47+
# To read DAS data stored locally on your machine, simply replace the above line with:
48+
# file_path = "/path/to/data/directory/data.EXT"
4649
4750
spool = dc.spool(file_path)
4851
patch = spool[0]
@@ -53,10 +56,14 @@ patch = spool[0]
5356
```{python}
5457
#| output: false
5558
import dascore as dc
59+
# Import fetch to read DASCore example files
5660
from dascore.utils.downloader import fetch
5761
58-
# get a path to a directory of das files, replace with your path
62+
# Fetch a sample file path from DASCore (just to get a usable path for the rest of the cell)
5963
directory_path = fetch('terra15_das_1_trimmed.hdf5').parent
64+
# To read a directory of DAS data stored locally on your machine,
65+
# simply replace the above line with:
66+
# directory_path = "/path/to/data/directory/"
6067
6168
spool = (
6269
# Create a spool to interact with directory data

docs/tutorial/patch.qmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ A single file can be loaded like this:
3737
#| code-fold: true
3838
# This codeblock is just to get a usable path for the next cell.
3939
import dascore as dc
40+
# Import fetch to read DASCore example files
4041
from dascore.utils.downloader import fetch
4142
43+
4244
path = fetch("terra15_das_1_trimmed.hdf5")
45+
# To read DAS data stored locally on your machine, simply replace the above line with:
46+
# path = "/path/to/data/directory/data.EXT"
4347
```
4448

4549

docs/tutorial/spool.qmd

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ spool1 = dc.spool(patch_list)
2424

2525
```{python}
2626
import dascore as dc
27+
# Import fetch to read DASCore example files
2728
from dascore.utils.downloader import fetch
2829
2930
path_to_das_file = fetch("terra15_das_1_trimmed.hdf5")
31+
# To read DAS data stored locally on your machine, simply replace the above line with:
32+
# path_to_das_file = "/path/to/data/directory/data.EXT"
3033
3134
spool2 = dc.spool(path_to_das_file)
3235
```
@@ -35,12 +38,14 @@ spool2 = dc.spool(path_to_das_file)
3538

3639
```{python}
3740
import dascore as dc
41+
# Import fetch to read DASCore example files
3842
from dascore.utils.downloader import fetch
3943
40-
# We use fetch to make sure the file is downloaded. You would
41-
# just need to replace directory_path with your data directory path.
42-
path_to_das_file = fetch("terra15_das_1_trimmed.hdf5")
43-
directory_path = path_to_das_file.parent
44+
# Fetch a sample file path from DASCore (just to get a usable path for the rest of the cell)
45+
directory_path = fetch('terra15_das_1_trimmed.hdf5').parent
46+
# To read a directory of DAS data stored locally on your machine,
47+
# simply replace the above line with:
48+
# directory_path = "/path/to/data/directory/"
4449
4550
# Update will create an index of the contents for fast querying/access
4651
spool3 = dc.spool(directory_path).update()

0 commit comments

Comments
 (0)