docs: def input_checks(catalogue, config, completeness):
      """ Performs a basic set of input checks on the data
      """
  
      if isinstance(completeness, np.ndarray):
          # completeness table is a numpy array (i.e. [year, magnitude])
          if np.shape(completeness)[1] != 2:
              raise ValueError('Completeness Table incorrectly configured')
          else:
              cmag = completeness[:, 1]
              ctime = completeness[:, 0]
      elif isinstance(completeness, float):
          # Completeness corresponds to a single magnitude (i.e. applies to
          # the entire catalogue)
          cmag = np.array(completeness)
          ctime = np.array(np.min(catalogue.data['year']))
      else:
          # Everything is valid - i.e. no completeness magnitude
          cmag = np.array(np.min(catalogue.data['magnitude']))
          ctime = np.array(np.min(catalogue.data['year']))
  
      # Set reference magnitude - if not in config then default to M = 0.
      if not config:
          # use default reference magnitude of 0.0 and magnitude interval of 0.1
          ref_mag = 0.0
          dmag = 0.1
          config = {'reference_magnitude': None,
                    'magnitude_interval': 0.1}
      else:
          if (not 'reference_magnitude' in config.keys()) or\
                  (config['reference_magnitude'] is None):
              ref_mag = 0.
              config['reference_magnitude'] = None
          else:
              ref_mag = config['reference_magnitude']
  
          if (not 'magnitude_interval' in config.keys()) or \
                  not config['magnitude_interval']:
              dmag = 0.1
          else:
              dmag = config['magnitude_interval']
  
      return cmag, ctime, ref_mag, dmag, config