def draw_several_cams(geom, ncams=4):

    cmaps = ['jet', 'afmhot', 'terrain', 'autumn']
    fig, axs = plt.subplots(1, ncams, figsize=(15, 4), sharey=True, sharex=True)

    for ii in range(ncams):
        disp = visualization.CameraDisplay(
            geom,
            ax=axs[ii],
            title="CT{}".format(ii + 1),
        )
        disp.cmap = cmaps[ii]

        model = toymodel.generate_2d_shower_model(
            centroid=(0.2 - ii * 0.1, -ii * 0.05),
            width=0.005 + 0.001 * ii,
            length=0.1 + 0.05 * ii,
            psi=ii * 20 * u.deg,
        )

        image, sig, bg = toymodel.make_toymodel_shower_image(
            geom,
            model.pdf,
            intensity=50,
            nsb_level_pe=1000,
        )

        clean = image.copy()
        clean[image <= 3.0 * image.mean()] = 0.0
        hillas = hillas_parameters(geom.pix_x, geom.pix_y, clean)

        disp.image = image
        disp.add_colorbar(ax=axs[ii])
        disp.set_limits_percent(95)
        disp.overlay_moments(hillas, linewidth=3, color='blue')
"""


if __name__ == '__main__':

  # Prepare the camera geometry
  geom = io.CameraGeometry.from_name('hess', 1)
  disp = visualization.CameraDisplay(geom)
  disp.set_limits_minmax(0, 350)
  disp.add_colorbar()

  # make a toymodel shower model
  model = toymodel.generate_2d_shower_model(centroid=(0.2, 0.2), width=0.01, length=0.1, psi='45d')

  # generate toymodel image in camera for this shower model.
  image, signal, noise = toymodel.make_toymodel_shower_image(geom, model.pdf, intensity=50, nsb_level_pe=100)

  #Image cleaning
  clean_mask = tailcuts_clean(geom, image, 1, 10, 5)      #pedvars = 1 and core and boundary threshold in pe
  image[~clean_mask] = 0


  #Pixel values in the camera
  pix_x = geom.pix_x.value
  pix_y = geom.pix_y.value

  # Hillas parameters
  hillas1, hillas2 = hillas_parameters(pix_x, pix_y, image)
  print(hillas1, hillas2)

  #Overlay moments