A fairly common complaint about the Databroker loader is that it's difficult to load multiple scans and compare across them. For example, two polarizations on the same sample, or two samples with the same scan type.
There are valid memory-related reasons to not do this. But it is definitely needed.
I'm adding a new method to SST1RSoXSDB,
def loadSeries(self,run_list,meta_dim,loadrun_kwargs={},):
'''
Loads a series of runs into a single xarray object, stacking along meta_dim.
Useful for a set of samples, or a set of polarizations, etc., taken in different scans.
Args:
run_list (list): list of scan ids to load
meta_dim (str): dimension to stack along. must be a valid attribute/metadata value, such as polarization or sample_name
Returns:
raw: xarray.Dataset with all scans stacked
'''
example usage:
test = load.loadSeries([42598,42595,42654,42652],'sample_name')
test_integ = integ.integrateImageStack(test)
test_integ.unstack('system').mean('chi').sel(energy=284.25).plot(hue='sample_name')
A fairly common complaint about the Databroker loader is that it's difficult to load multiple scans and compare across them. For example, two polarizations on the same sample, or two samples with the same scan type.
There are valid memory-related reasons to not do this. But it is definitely needed.
I'm adding a new method to
SST1RSoXSDB
,example usage: