
    % To make this example self-contained, 
    % we'll generate fake data -- 
    % here we load a few routines to do that.

() = evalfile ("init_contours.sl");

    % Fit the fake data with a Gaussian...

() = fit_counts();

    % .. generate confidence contours..

px = conf_grid ("gauss(1).center", 11.985, 12.018, 50);
py = conf_grid ("gauss(1).sigma", 0.015, 0.045, 50);
      
gc = conf_map_counts (px, py);

    % and plot:

id = plot_open ("ex_contours.ps/cps");

xrange (11.985,12.015);
yrange (0.015, 0.035);

xlabel ("Line Center [\\A]");
ylabel (latex2pg("\\sigma") + " [\\A]");
title ("\"Random\" data vs. \"Ideal\" data");

plot_conf (gc);

  % One can also save the contours as a FITS image:

save_conf (gc, "gc.fits");



