ptypy.utils.scripts.load_from_ptyr#
- ptypy.utils.scripts.load_from_ptyr(filename, what='probe', ID=None, layer=None)#
Convenience script to extract data from
*.ptyr-file.- Parameters:
filename (str) – Full Path to a
*.ptyrdata file. No check on the file suffix is done. Any compatible hdf5 formatted file is allowed.what (str) – Type of container to retrieve. Only ‘probe’ and ‘obj’ makes sense. Default is ‘probe’
ID (str) – ID of storage in chosen container. If
Nonethe first stored storage is chosen.layer (int, optional) – If an integer, the data buffer of chosen storage gets sliced with layer for its first index.
- Returns:
data – If layer is provided, that layer
storage,data[layer]will be sliced from the 3d data buffer, else the whole bufferstorage.datawill be returned.- Return type:
ndarray