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.
Update docs with bash instructions

Add instructions for using the bash interface
scripts to the web documentation.
Merge branch 'bashinterface'

Merge in the bash interface to the python scripts