Skip to content

Commit

Permalink
ref: minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 25, 2022
1 parent e22503a commit c6eb733
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shapeout2/meta_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def get_rtdc_features_minmax(path, *features):
for feat in features:
assert dclab.dfn.scalar_feature_exists(feat)
if feat in ds:
mmdict[feat] = ds[feat].min(), ds[feat].max()
mmdict[feat] = np.min(ds[feat]), np.max(ds[feat])
return mmdict


def get_rtdc_features_minmax_bulk(paths, features=[]):
def get_rtdc_features_minmax_bulk(paths, features=None):
"""Perform `get_rtdc_features_minmax` on a list of paths
Parameters
Expand All @@ -79,6 +79,8 @@ def get_rtdc_features_minmax_bulk(paths, features=[]):
Names of the features to compute the min/max values for.
If empty, all loaded features will be used.
"""
if features is None:
features = []
mmdict = {}
for pp in paths:
mmdi = get_rtdc_features_minmax(pp, *features)
Expand Down
7 changes: 7 additions & 0 deletions shapeout2/pipeline/filter_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ def get_dataset(self, filters=None, apply_filter=True):
filters: list of Filter or None
Filters used for computing the dataset hierarchy. If set
to None, the current filters in `self.filters` are used.
apply_filter: bool
Whether to apply all filters and update the metadata of
the requested dataset. This should be True if you are
intending to work with the resulting data. You can set
it to false if you would just like to fetch the dataset,
apply some more filters and then call `rejuvenate`
yourself.
"""
if filters is not None:
# put the filters in place
Expand Down

0 comments on commit c6eb733

Please sign in to comment.