A proper data structure for acquisition
Currently, the acquisition is given by a dictionary containing loaded/defined acquisition parameters. We might be able to improve it by having a class that
- can compute required parameters on the fly ( b <-> G, b <-> q , ...?)
- checks the consistency of size and units
- include metadata, e.g. name
- separates acquisitions into shells.
class Acquisition:
def __init__(self, params):
self.params = params
# checker on validity
def update(self, plot_params):
combined_dict = dict(self.params)
combined_dict.update(plot_params)
return Acquisition(combined_dict)
def __getindex__(self, name):
if name in self.params:
return self.params[name]
else:
...compute name
Edited by Hossein Rafipoor