finish improving integ mag average curve smoothing