AcquisitionParams¶
Import in python using from mcutils.utils.sidecar import AcquisitionParams
Documentation
-
class
mcutils.utils.sidecar.AcquisitionParams(*args, **kwargs)[source]¶ -
Methods
auto_update([check])Applies all conversions and optionally check consistency in parameters
check()clear()copy()from_json(filename)Reads an XPS MDE structure from a JSON file
from_mat(filename)Reads an XPS MDE structure from the matlab file
from_pandas(df)Converts from a pandas dataframe to a dictionary
Create a new dictionary with keys from iterable and values set to value.
Return the value for key if key is in the dictionary, else default.
get_index([sort_by])Indexes the volumes based on the parameters
groupby(indices[, drop])Groups the parameters by the indices, taking the mean for all parameters
items()keys()pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised
Remove and return a (key, value) pair as a 2-tuple.
read(filename)Reads the acquisition parameters from a JSON or matlab file
read_bvals_bvecs(bvals_fn[, bvecs_fn, modality])Converts bvals/bvecs file into an MDE XPS structure
Insert key with a value of default if key is not in the dictionary.
to_json(filename)Writes an XPS MDE structure to a JSON file
to_mat(filename)Writes an XPS MDE to a matlab file
Converts to a pandas dataframe (dropping any multi-dimensional parameters)
update([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values()write(filename)Writes the acquisition parameters to a JSON or matlab file
Attributes
nNumber of observations