DiamondLightSource / DiamondLightSource/mmg_toolbox

Save Experiment object as HDF5 File

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
2
Forks
0
Avg merge
5m
Merged PRs (30d)
1

Description

Add a function to the *Experiment* object that will save the object as a HDF5 File.

The file should contain:
- Experiment entry (**default**), including:
+ folder name(s)
+ config
+ scan list
+ start, end time
+ instrument info?
+ **Default Plot** - scan number vs scan time? (This might take a while as it requires reading each file)
- Links to the entry of every scan in the experiment

In addition, there should be an option to copy all the scans into a single file, and the additional option to copy all the linked data (detector data). This should probably use lossless compression if not already used.

## Opening the file
There should also be a file reader, as an optional input to *Experiment*.

I would expect that it will be faster to read the scan list from the file than reading the file-system, but this should be checked.

## Tasks

- [ ] Create *Experiment.save*
- [ ] Define experiment entry in saved file
- [ ] Define default plot in experiment entry
- [x] include links to scan files
- [x] option to copy scan file contents
- [x] option to copy linked file contents
- [ ] Create *Experiment.load*
- [ ] Check that *Experiment.load()* is faster than *Experiment.all_scansnos()*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Experiment object and its existing all_scansnos behavior, then review how scan files and linked detector data are represented. Define the saved experiment entry, scan links, copy options, default plot, and Experiment.save/load behavior before implementing; done includes checking whether load is faster than all_scansnos().

Written by the indexing model from the issue text.

Assessment

Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.