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

  1. can compute required parameters on the fly ( b <-> G, b <-> q , ...?)
  2. checks the consistency of size and units
  3. include metadata, e.g. name
  4. 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