docs: def _compile_params(params, im1):
      """ Compile the params dictionary:
      * Combine parameters from different sources
      * Perform checks to prevent non-compatible parameters
      * Extend parameters that need a list with one element per dimension
      """
      
      # Compile parameters
      p = _get_fixed_params(im1) + get_advanced_params()
      p = p + params
      params = p.as_dict()
      
      # Check parameter dimensions
      if isinstance(im1, np.ndarray):
          lt = (list, tuple)
          for key in [    'FinalGridSpacingInPhysicalUnits',
                          'FinalGridSpacingInVoxels' ]:
              if key in params.keys() and not isinstance(params[key], lt):
                  params[key] = [params[key]] * im1.ndim
      
      # Check parameter removal
      if 'FinalGridSpacingInVoxels' in params:
          if 'FinalGridSpacingInPhysicalUnits' in params:
              params.pop('FinalGridSpacingInPhysicalUnits')
      
      # Done
      return params