Notes on your good friend funNorman

You should just have to make it with the attached Makefile (pointing to a fortran compiler, such as gfortran). 

To run, just execute it:
./funNorman
[or better yet, copy the executable to /usr/bin/ (or equivalent) first]

It will ask you questions to set up the fit (with some instructions/explanations at the start). You'll basically just need one file with your data points (x,y,dy) [space delimited], and another for each of your angular distributions (x,y) that you want to fit simultaneously to the data. The code will then normalize the angular distributions to the data points using a least-squares minimization routine (Gauss-Jordan method). It should report back to you the details pertaining to the best fit [normalization parameter(s), 1-sigma uncertainty in the normalization parameter(s), chi^2, reduced chi^2, degrees of freedom, etc].

You can ask for an input file to be generated, which will avoid you having to answer all the questions every time (and to allow scripted running, so you can automate running it multiple times for different states/files etc).

This file will be called in.yourdatafilename

You can then modify your answers in that file and rerun the code (just like you can for front for twofnr):
./funNorman < in.yourdatafilename


After the fit has completed (which should be almost instantaneous), you can enter interactive mode, which will allow you to review and visualize the fit, or exit.  For the visualization to work, you'll need xmgrace and/or gnuplot installed on your machine (if you don't have these and don't want to install them, you can just manually use the output files with whatever plotting tool you prefer).
Option 1 should generate an almost-publication-ready plot (in xmgrace) with your data points, the axes labelled (assuming your data are normalized cross sections) and with a legend with the fit parameters.
Option 2 allows you to plot the chi^2 functions for each component that you've fit.
Option 3 - if you've fit with multiple curves, this will allow you to plot 2D chi^2 surfaces, to examine the correlation between the components.
Option 4 will list the output files written (which are all dynamically named)
Option 5 redisplays the fit results.

An example data file and some angular distribution files are included so you can test the code, in case you have any problems getting it to work with your own data.

Please let me know if you have any problems, or have any suggestions for improvements.

SDP 2020
