MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / _datasets_max_size

Method _datasets_max_size

pyxrf/model/lineplot.py:1423–1438  ·  view source on GitHub ↗

Return maximum size of the longest available dataset. The datasets that contain no data are ignored. Parameters ---------- only_displayed: bool Limit search to the datasets that are going to be displayed

(self, *, only_displayed=True)

Source from the content-addressed store, hash-verified

1421 return n_low, n_high
1422
1423 def _datasets_max_size(self, *, only_displayed=True):
1424 """
1425 Return maximum size of the longest available dataset. The datasets that contain
1426 no data are ignored.
1427
1428 Parameters
1429 ----------
1430 only_displayed: bool
1431 Limit search to the datasets that are going to be displayed
1432 """
1433 max_size = 0
1434 for dset in self.io_model.data_sets.values():
1435 if not only_displayed or dset.selected_for_preview:
1436 # Raw data shape: (n_rows, n_columns, n_energy_bins)
1437 max_size = max(max_size, dset.get_raw_data_shape()[2])
1438 return max_size
1439
1440 def plot_selected_energy_range(self, *, axes, barh_existing, e_low=None, e_high=None, n_points=4096):
1441 """

Callers 1

Calls 2

valuesMethod · 0.80
get_raw_data_shapeMethod · 0.80

Tested by

no test coverage detected