code: def scalemodel(model, scalefac):
     
     for ii, mm in enumerate(model):
        scaledmodel[ii] = mm * scalefac[ii]
     return scaledmodel
docs: Given a scale factor, multiply by model to get scaled model
  
     Parameters
     ----------
     model : array
        original model
     scalefac : array of model.shape[0]
        array of scalefactors
  
     Returns
     -------
     scaledmodel : array
        model scaled by scale factor