usnistgov / PyHyperScattering

Tools for hyperspectral x-ray and neutron scattering data loading, reduction, slicing, and visualization.
Other
6 stars 8 forks source link

Support for 11.0.1.2 batch scans #90

Open pdudenas opened 1 year ago

pdudenas commented 1 year ago

A common measurement mode at 11.0.1.2 is to queue up scans in a batch, which leads to hundreds of images across 10s of samples in a file series. Rather than loading all the files into a single DataArray, it would be useful to down select the file series based on metadata (sample number, SDD, etc.) before loading them into memory.

pbeaucage commented 1 year ago

So there is already support for this, albeit poorly documented - look at the md_filter kwarg to loadFileSeries. as long as you set the sample ID motor in your run you can filter on a specific sample ID. Let me know if that isn’t working or if I’ve misunderstood the scope of this.

pdudenas commented 1 year ago

Ah yup you're right. The combo of md_filter and file_filter works great. Maybe I'll amend this to add a function similar to summarize_run from the DB loader

pbeaucage commented 1 year ago

That would be great! If you can document this that would be really good as well.