resqpy.property.selective_version_of_collection
- resqpy.property.selective_version_of_collection(collection, realization=None, support_uuid=None, uuid=None, continuous=None, points=None, count=None, indexable=None, property_kind=None, facet_type=None, facet=None, citation_title=None, time_series_uuid=None, time_index=None, uom=None, string_lookup_uuid=None, categorical=None, title=None, title_mode=None, related_uuid=None, const_value=None, extra=None)
Returns a new PropertyCollection with those parts which match all arguments that are not None.
- Parameters:
collection (
PropertyCollection) – an existing collection from which a subset will be returned as a new objectrealization (
int, optional) – realization number to filter onsupport_uuid (
uuidorstr, optional) – UUID of supporting representation, to filter onuuid (
uuidorstr, optional) – a property uuid to select a singleton property from the collectioncontinuous (
bool, optional) – if True, continuous properties are selected; if False, discrete and categoricalpoints (
bool, optional) – if True, points properties are selected; if False, they are excludedcount (
int, optional) – a count value to filter onindexable (
str, optional) – indexable elements flavour to filter onproperty_kind (
str, optional) – property kind to filter on (commonly used)facet_type (
str, optional) – a facet_type to filter on (must be present for property to be selected)facet (
str, optional) – a facet value to filter on (if used, facet_type should be specified)citation_title (
str, optional) – citation to title to filter on; see also title_mode argumenttime_series_uuid (
uuidorstr, optional) – UUID of a TimeSeries to filter ontime_index (
int, optional) – a time series time index to filter onuom (
str, optional) – unit of measure to filter onstring_lookup_uuid (
uuidorstr, optional) – UUID of a string lookup table to filter oncategorical (
bool, optional) – if True, only categorical properties are selected; if False they are excludedtitle (
str, optional) – synonymous with citation_title argumenttitle_mode (
str, optional) – if present, one of ‘is’, ‘starts’, ‘ends’, ‘contains’, ‘is not’, ‘does not start’, ‘does not end’, ‘does not contain’; None is the same as ‘is’; will default to ‘is’ if not specified and title or citation_title argument is presentrelated_uuid (
uuidorstr, optional) – only properties with direct relationship to this uuid are selectedconst_value (
floatorint, optional) – only properties flagged as constant, with given value, are selectedextra (
dict, optional) – only properties where the extra metadata includes all the items of this dict are selected
- Returns:
a new PropertyCollection containing those properties which match the filter parameters that are not None
Notes
the existing collection might often be the ‘main’ collection holding all the properties for a supporting representation (eg. grid, blocked well or wellbore frame); for each of the filtering arguments: if None, then all members of collection pass this filter; if not None then only those members with the given value pass this filter; special values: ‘*’ any non-None value passes; ‘none’ only None passes; citation_title (or its synonym title) uses string filtering in association with title_mode argument; finally, the filters for all the attributes must be passed for a given member to be included in the returned collection; title is a synonym for the citation_title argument; related_uuid will pass if any relationship exists (‘hard’ or ‘soft’); the categorical boolean argument can be used to select only categorical (or non-categorical) properties, even though this is not explicitly held as a field in the internal dictionary