Temporary S2 code

Code while I'm playing with the S2 test
dataset and trying to understand it.
Refactor S2 code

Refactor the inital S2 reader code, creating
a class and methods. Also rename references
to "granules" to "tiles", for consistency
with the S2 documentation (but not that they
are still called granules in the file structure)
Add geodjango support to Measurement model

Use the geodjango objects manager in the
Measurement model. This is needed to be
able to do geographic queries through to
the point foreign key.
First commit for matchups code

First go at finding matchups between
in-situ data and images.

At the moment, it just does a search for
each image then returns the JSON results
in a list.
Constrict matchup to single measurment type

Allow user to specify a particular measurement
type to search for in the in-situ data. (Passed
though in the "parameters" field in the json
file) as with other options.
Add ordering to measurement api

Allow measurements to be ordered by point
field with all relations, so we can order
results by time
Update docs

Update the matchup code's docstrings,
and add to the documentation
Merge branch 'matchups'
Changes to logging settings

Create a new logger which will only have
warnings and above, so that the most
important messages are in one place.

Change the minimum level of the console
logger from DEBUG to INFO, to reduce the
amount of stuff being written to the screen

Put all the log files into a new separate
directory, "logs".
More robust path definitions

The bash interface scripts set some other
directory locations that are relative to
the location of the bash scripts
(TOUCAN/bash_interface), but this doesn't
work if we call the scripts from some other
path (eg when using the GUI).

Amend the scripts to explicitly retrieve
their location, so that it is independent
of where the script has been called from.
Skip already ingested images

Add a check in the image ingestion loop to see
if this file has already been ingested
(determined by checking if the filename and
region match an already ingested file).

We did already have a check in the method that
adds images to the database, but this is only
called  after the file has been opened and
processed, so uses unnecessary memory/time.

Note: The check on the region name is done by
looking in the archive location (to see if the
image is in the REGION subdirectory). It would
be more robust to check the region__region
field of the database entries, but that is
*significantly* slower.
Merge in updates from master
Add some clarifications to docs

Amend the image ingestion instructions to include
the order that the region coordinates must be given.

Also, clarify that the json file includes the path.
Merge in changes from add_images

Merge in the add_images branch, to add the check
on whether image has already been ingested, and
skip it if so.

(Other changes are some unfinished S2 reader stuff)
Updates to radiometric drift tool

Allow user to pass in a "doplot" parameter,
with value True or False, to tell the tool
whether to produce the plots or not.

Also, return the bands that were processed,
and the calculated drifts in a dictionary so
that we can call from other scripts and use
the values.
Ingest auxiliary data from MERIS files

MERIS files include wind, ozone, rel humidity,
and pressure fields which are useful for things
like Rayleigh scattering tool.

Read these fields from the file, and add to
database. We treat them in a similar way to the
angles, with a mean value stored in the database
and the pixel data stored in geo tiffs. Make a
separate geotiff for each parameter, since there's
no logical order to put them in, and we might not
have every one in the future (and there's no way
to name bands in the geotiff).

nb For other sensors where these fields are missing,
the database entries will be null.
Merge branch 'add_images'

Get the changes to read in wind etc
from MERIS files.
Fix initial errors

Start by fixing errors so we can run as
it currently is:
- Main function wasn't actually called
- Calc_band_ratio takes a single image
  array, not a list
Loop through all the images

Loop over all of the returned images in the
list, and create a list of masks rather than
just a single one for one image.
Refactor to use the standard interface

Refactor the run method to use the same
interface as the other tools - pass only
the name of a text file, which is then
read in the run method.