docs: def _dev_encode(param_dict,drop_name,param_name):
      """
      _dev_encode takes the parameter dictionary in, as well as the name of parameter
      to drop from design matrix, and the string name of the parameter
  
      it returns the encoded design matrix, list of column name strings, and
      and encoder function to encode new values of param properly
      """
  
      # param_dict[col_name] = np.array(wave_values)
      values = param_dict[param_name]
      # treat as string, map each unique value to an integer
      unique_values = []
      [unique_values.append(i) for i in values if not unique_values.count(i)]
      # warning if number of unique values is large compared to number of waveforms
      if len(unique_values) > 0.5*len(values):
          warning.warn("Many unique values in parameter %s for a Deviation encoding" & param_name)
      # make deviation encoding instruction matrix
      I = np.eye(len(unique_values))
      # remove column of I for drop_name
      drop_idx = unique_values.index(drop_name)
      I = np.delete(I,drop_idx,1)
      # make row of I for drop_name index
      I[drop_idx,:] = -1.
      # make map_dict[unique_value[i]] = I_row
      map_dict = {}
      for i in np.arange(0,len(unique_values)):
          map_dict[unique_values[i]] = np.float64(I[i,:])
  
      # make parameter to designmatrix encoder function
      def deviation_encoder(param_name,new_values):
          # TODO: first check if new_values are outside the range of the originals
          #if set(new_values) != set(unique_values):
          #    raise ValueError("Cannot extrapolate outside original parameter range")
          X = np.empty((len(new_values),len(map_dict[new_values[0]]-1)))
          for i in np.arange(0,len(new_values)):
              X[i,:] = map_dict[new_values[i]]
  
          # make names out of values
          col_names = []
          for i in np.arange(0,len(unique_values)):
              col_names.append(param_name+":["+unique_values[i]+" - "+"mu"+"]")
          # remove column name for drop_name
          col_names.remove(param_name + ":[" + drop_name + " - " + "mu" + "]")
  
          return X, col_names
  
      # use deviation_encoder to encode values
      X, col_names = deviation_encoder(param_name,values)
      return deviation_encoder, X, col_names