Fix bugs in AATSR reflectance correction

There were a couple of bugs in the AATSR
drift correction methods, which meant the
reflectances were systematically different
to the DIMITRI data:

- When removing the drift correction already
  applied, we check the image's metadata for
  the processing file name to check what date
  it was processed. We were using the "GC1"
  file when it should have been the "VC1" file.

- There was a bug in the calculation of the
  number of days since launch, which had T0-T
  instead of T-T0, leading to incorrect values
  in the drift calculation

With these bugs fixed, the resulting reflectance is
v similar to that from DIMITRI (can't expect it to
be indentical due to differences in region extraction)
Fix bug in MERIS correction

There was a bug in the MERIS radiance
correction, with a multpilication instead
of division. This meant that instead of
correcting for solar flux we were adding
an extra seaonal cycle.

Corrected outputs now closely match the
DIMITRI values.
Merge buxfixes from branch 'add_images'
Update nose coverage settings

Explicitly add the packages we want to check
for coverage, otherwise it checks *everything*
(eg scipy, numpy etc), filling the screen.
Fix mangled brdf tests

The BRDF unit test file has ended up with
the base class tests in it, presumably
because git got confused about a file name
change somewhere. Remove the duplicated tests.
Fix broken unit tests

Remove some obsolete tests from BRDF test
file (these methods were moved to libtools
and there are tests there for them)

Test for get_reflectance_all was falling
over because the mocked open image didn't
have any values set for RasterCount,
RasterXSize and RasterYSize. So add mock
values in the test.
Refactor get_reflectance_all method

Simplify the get_reflectance_all method to
use the image's .ReadAsArray() method to read
all bands at once, instead of looping through
the bands and reading one at a time.

Amend the unit test, as we need to change the
mock return value accordingly.
Add logging settings

Amend the LOGGING settings in settings.py:
- Add a simple and a verbose formatter
- Add handlers for writing to console, and
  for writing to a few files
- Add loggers for django stuff, and a generic
  one which will work for all our tools
Add setuplogger script

Add the imports etc needed to use logging
to a separate file, so we don't need to
repeat it each time. Just need to import
this file anywhere we want to use logging.
Ingest images bash script

Add a new directory to hold the bash scripts
to interface with the python tools.

Add the first script, which calls the image
ingestion code. It takes in a JSON filename,
and optional input/output directory locations
(if not specified, these will default to the
images directory in ingest_data). Then it calls
ingest_images.py

To make this work, add a new main method in
ingest_images.py which reads command line
arguments passed in by the bash script, and it
calls the ingest_image method to just process
the specified JSON file.
Initial commit for bash interface to tools

First stages of script to run the tools.
So far it reads in command line arguments.

Currently developing it so that we can use
the same script for different tools,to avoid
duplication rather than having one per tool.
But this may get too complicated...
Add db query and call python tool

Use curl to get databse results, and call
the python tool script passing the JSON
string as an argument.
Pass JSON through a file

Once we do a query for more than a few months
of images, the resulting JSON string is too
long to pass to python as command line arg (we
get the shell error "argument list too long")

Instead, write the JSON information to a file
and pass the filename instead, so that the
python script reads from this file.
Add support for multiple sensors

Combine JSON results for multiple sensors
in one file, as some tools require reference
and target sensors.

JSON file now always has a key "reference"
which holds the database output from the first
(or only) sensor given. If there are other
sensors, they are placed in a "target" key
which holds a list of database results. For
consistency, it is still a list even if there
is only one target sensor.

This way, we have a standardised format, and
then anyone that writes a new tool knows what
it will look like, and can parse the data into
whatever format they need.
Check that query returned some images

Check the length of the string returned by
database query to make sure that some images
were found, and exit if not.

It would be more robust to use awk or similar
to extract the "meta":"total_count" object
from the string, but due to the length of the
string returned by successful queries we get
"argument list too long" shell error.
Update script comments

Provide more info at the start of the
script, with some usage examples.
Add support for user defined parameters

Add a new option -p to the bash script, to
allow user to pass their own parameters to
the python scripts. All parameters are given
as key:value pairs, so they can be easily
added to the JSON file as a new dictionary
key.

Syntax is: -p key1,value1[,key2,value2,...]

The python tools can then access these easily
by reading the "parameters" key from the JSON
file. It is then up to the tool to make sure
that any parameters that it needs are present.
Start using the user's parameters

Amend radiometric drift and supersensor tools
to read in any extra parameters passed in from
the bash script. Then pass them as arguments to
get_doublets if they match that method's args
(ie amc_threshold, day_threshold, or roi_threshold)
Check user parameters

Add a check on the user definied parameters,
so that a warning is given if any parameters
were passed in that the script doesn't expect
(as they may be a typo for an expected value)

Use the logger to handle the warning.
Create __init__.py

Needed for the packaging script