README
# M. Sambridge and A. Jackson, 2018.

This file enables users to use the python script absorbance.py
that accompanies the Am. Min publication

The inverse problem of unpolarised infrared spectroscopy of geological materials: Estimation from noisy random sampling of a quadratic form
Andrew Jackson, Robert L. Parker, Malcolm Sambridge, Catherine Constable & Aaron S. Wolf


American Mineralogist: August 2018 Deposit AM-18-86152

Installation
———————————
You first need to install python.
As of March 2018 we have been using python3
You can find and install python here:
https://www.python.org/downloads/

We use the script from the command line.
You may wish to use other GUIs such as canopy.

Instructions for python3
————————————————————————
Packages required:
numpy
mpmath
matplotlib
pandas
scipy
xlrd

If packages are missing they can be added using pip3
e.g. pip3 install numpy mpmath matplotlib pandas scipy xlrd


Running
———————
There are a number of parameters to be set at the end of the script.
As distributed the script reads from the Excel file
Absorbance_testdata.xlsx
on the sheet with name =Abs_data_uniform_errors_1000'


The default method used to find the maximum likelihood is Nelder-Mead Simplex (an option not described in the paper). One can also revert to simple grid search (as described in the paper).
In order to estimate errors on the parameters a_1, a_2 and a_3, one should turn on the plotting of the 
conditionals (equivalent to Figure 9 of the paper).
