Skip to content

Commit

Permalink
Add small dataset for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed Nov 4, 2024
1 parent c81ac41 commit 137cae1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions test-data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Files here are small mock-files for testing.

Each file should have a code-snippet that was used to create if applicable.

# Nexus Files
## small_coda.hdf

```python
# In a notebook cell.
!cp 443503_00031010.hdf copied_coda.hdf
import h5py

with h5py.File('copied_coda.hdf', 'r+') as f:
instrument_gr = f['entry/instrument']
keeping_names = ['name', '_publication']
for name in instrument_gr:
if name not in keeping_names:
del instrument_gr[name]

# Copy the rest of the file
with h5py.File('small_coda.hdf', 'w') as new_f:
# copy everything
f.copy('entry', new_f)

```

## small_ymir.hdf

```python
# In a notebook cell.
!cp 876380_00011465.hdf copied_ymir.hdf
import h5py

with h5py.File('copied_ymir.hdf', 'r+') as f:
instrument_gr = f['entry/instrument']
keeping_names = ['name', '_publication']
for name in instrument_gr:
if name not in keeping_names:
del instrument_gr[name]

# Copy the rest of the file
with h5py.File('small_ymir.hdf', 'w') as new_f:
# copy everything
f.copy('entry', new_f)

```
Binary file added test-data/small_coda.hdf
Binary file not shown.
Binary file added test-data/small_ymir.hdf
Binary file not shown.

0 comments on commit 137cae1

Please sign in to comment.