docs: def register_measurements(self, mag, pha=None):
          """Register measurements as magnitude/phase measurements used for the
          inversion
  
          Parameters
          ----------
          mag: int|numpy.ndarray
              magnitude measurement id for the corresponding measurement data in
              self.configs.measurements. If mag is a numpy.ndarray, assume
              mag to be the data itself an register it
          pha: int, optional
              phase measurement id for the corresponding measurement data in
              self.configs.measurements. If not present, a new measurement set
              will be added with zeros only.
          """
          if isinstance(mag, np.ndarray):
              # make sure that this array is 1D at the most
              # the 0 indicates only one measurement
              assert len(mag.squeeze().shape) in (0, 1)
              mid_mag = self.configs.add_measurements(mag)
          else:
              mid_mag = mag
  
          if pha is not None:
              if isinstance(pha, np.ndarray):
                  mid_pha = self.configs.add_measurements(pha)
              else:
                  mid_pha = pha
          else:
              mid_pha = self.configs.add_measurements(
                  np.zeros_like(
                      self.configs.measurements[mid_mag]
                  )
              )
          self.assignments['measurements'] = [mid_mag, mid_pha]