Dataset5dstem torch native initial implementation (MAPED, time-series)#231
Dataset5dstem torch native initial implementation (MAPED, time-series)#231bobleesj wants to merge 8 commits into
Dataset5dstem torch native initial implementation (MAPED, time-series)#231Conversation
|
Rather than as you had it:
Wouldn't it make more sense to stick with our general dset5d = Dataset5dstem.from_tensor(
torch.from_dlpack(data_cp), # tensor.ndim == 5
sampling=(10, 0.5, 0.5, 0.46, 0.46),
units=['sec', 'A', 'A', 'mrad', 'mrad'],
name='gold_3frame_stack',
metadata={"series_type": "time"},
)Inconsistent sampling values could be metadata as well, though this would quickly spiral if we have inconsistent sampling in multiple dimensions. At that point though, we should probably be using another data class? dset5d = Dataset5dstem.from_tensor(
torch.from_dlpack(data_cp), # tensor.ndim == 5
sampling=(None, 0.5, 0.5, 0.46, 0.46), # not sure if we do checks for sampling values>0, but would want some form of Null value for sampling along an axis that is inconsistent
units=['sec', 'A', 'A', 'mrad', 'mrad'],
name='gold_3frame_stack',
metadata={
"series_type": "time",
"series_dim": 0, # not necessary if we only allow a single non-fixed axis and if we force it to be the first
"series_values": [0, 10, 30], # time in sec of each frame, len(`series_values`) must equal tensor.shape[`series_dim`]
},
) |
|
Yeah, your implementation is better and more natural to have the tilt/time on the 0th axis with the following use-case you've shown: dset5d = Dataset5dstem.from_tensor(
torch.from_dlpack(data_cp), # tensor.ndim == 5
sampling=(10, 0.5, 0.5, 0.46, 0.46),
units=['sec', 'A', 'A', 'mrad', 'mrad'],
name='gold_3frame_stack',
metadata={"series_type": "time"},
)regarding Here, metadata isn't the environment that surrounds the ground truth itself, like operator, condition, location but this |
|
This PR doesn't need to be reviewed anytime soon since I will be creating my own custom 5DSTEM class for my usage what works for my workflow and mental flow - primairly time and tilt at the moment with real data with Arina. Leaving a few examples below, designing API top down based on use-cases, rather than bottom-up to prevent over abstraction: Time (in-situ): Tilt (tomography): MAPED: |
|
I would support to "stick with our general DatasetNd convention and extend all the metadata to match" |
What problem this PR addreseses
DRAFT - will pull commits from #228 after merged.
~200 LOC changed - 90e7331
What should the reviewer(s) do
DRAFT
from_tensor:from_4dstem:This PR is limited to single GPU for now on purpose. Next PR can focus on multi GPU implementation.