Skip to content

Commit

Permalink
Add howto guide on sample data download
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Jan 15, 2025
1 parent 1ccfc95 commit fd1d6f4
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion docs/howto_guides/sample_data.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
.. dkist:howto-guides:sample-data
.. dkist:howto-guide:sample-data
Downloading the Sample Data with Globus
=======================================

The Python tools provide a few different partial datasets as sample data, these are used in documentation and examples.
This how to guide will show you how to download the complete data for these datasets.


Searching for and downloading the ASDF file
-------------------------------------------

Using the `BKPLX <https://dkist.data.nso.edu/datasetview/BKPLX>`__ dataset from the VISP we download the ASDF file and create a `.Dataset` object.

.. code-block:: python
from sunpy.net import Fido, attrs as a
import dkist
import dkist.net
results = Fido.search(a.dkist.Dataset("BKPLX"))
asdf_file = Fido.fetch(results, ")
ds = dkist.load_dataset(asdf_file)
Downloading the FITS files with Globus
--------------------------------------
Having loaded the ASDF file into a `.Dataset` we can download the Stokes I profile as so:
.. code-block:: python
ds[0].files.download() # doctest: +SKIP
This will download all the FITS files into the same directory as the ASDF file.
To download the whole dataset do:
.. code-block:: python
ds.files.download() # doctest: +SKIP

0 comments on commit fd1d6f4

Please sign in to comment.