code: def plotnoisecum(noisepkl, fluxscale=1, plot_width=450, plot_height=400):
      
  
      # noise histogram
      noises = read_noise(noisepkl)
      imnoise = np.sort(fluxscale*noises[4])
      frac = [float(count)/len(imnoise) for count in reversed(range(1, len(imnoise)+1))]
      noiseplot = Figure(plot_width=plot_width, plot_height=plot_height, toolbar_location="above",
                         x_axis_label='Image noise (Jy; cal scaling {0:.3})'.format(fluxscale),
                         y_axis_label='Cumulative fraction', tools='pan, wheel_zoom, reset')
      noiseplot.line(imnoise, frac)
  
      if fluxscale != 1:
          return noiseplot, imnoise
      else:
          return noiseplot
docs: Merged noise pkl converted to interactive cumulative histogram 
  
      noisepkl is standard noise pickle file.
      fluxscale is scaling applied by gain calibrator. telcal solutions have fluxscale=1.
      also returns corrected imnoise values if non-unity fluxscale provided