Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/environment_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- xarray
- sphinx
- pydata-sphinx-theme
- arm-test-data
- pip:
- sphinx_gallery
- sphinx-copybutton
Expand Down
31 changes: 24 additions & 7 deletions pysp2/testing/sample_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,28 @@
These are the sample files used for testing PySP2.
"""
import os
from pathlib import Path
from arm_test_data import DATASETS

DATA_PATH = os.path.join(os.path.dirname(__file__), 'data')
EXAMPLE_SP2B = os.path.join(
DATA_PATH, 'mosaossp2M1.00.20191216.130601.raw.20191216x193.sp2b')
EXAMPLE_INI = os.path.join(
DATA_PATH, 'mosaossp2M1.00.20191216.000601.raw.20191216000000.ini')
EXAMPLE_HK = os.path.join(
DATA_PATH, 'mosaossp2auxM1.00.20191217.010801.raw.20191216000000.hk')
DATA_PATH = Path(__file__).resolve().parent / "data"


def _sample_file(local_name: str) -> str:
local_path = DATA_PATH / local_name
if local_path.exists():
return str(local_path)
return DATASETS.fetch(local_name)

#DATA_PATH = os.path.join(os.path.dirname(__file__), 'data')
EXAMPLE_SP2B = _sample_file(
'mosaossp2M1.00.20191216.130601.raw.20191216x193.sp2b')
EXAMPLE_INI = _sample_file(
'mosaossp2M1.00.20191216.000601.raw.20191216000000.ini')
EXAMPLE_HK = _sample_file(
'mosaossp2auxM1.00.20191217.010801.raw.20191216000000.hk')

print("Fetching files from ARM test data repository...")
print("DATASETS:", DATASETS.registry_files)
EXAMPLE_SP2B_PSL = _sample_file("20230721x002.sp2b")
EXAMPLE_INI_PSL = _sample_file("20230721121710.ini")
EXAMPLE_HK_PSL = _sample_file("20230721121711.hk")
Loading
Loading