AttocubeScan.slice_metadata

AttocubeScan.slice_metadata(key, output='smart')

Return an array of the metadata values for each item/file in the top level group.

Parameters

key (str, regexp or list of str) – the meta data key(s) to return

Keyword Parameters:
output (str):

Output format - values are - dict: return an array of dictionaries - list: return a list of lists - array: return a numpy array - Data: return a Stoner.Data object - smart: (default) return either a list if only one key or a list of dictionaries

Returns

(array of metadata) – If single key is given and is an exact match then returns an array of the matching values. If the key results in a regular expression match, then returns an array of dictionaries of all matching keys. If key is a list ir other iterable, then return a 2D array where each column corresponds to one of the keys.

Todo

Add options to recurse through all groups? Put back RCT’s values only functionality?