% -------------------
% GENERAL INFORMATION
% -------------------

% Algroithm/ Proramme Title: Fully Automated 
% Supraglacial-Water Tracking algorithm for Ice Shelves (FASTISh)
% algorithm.

% Author Information:

% Rebecca Dell
% Scott Polar Research Institute, University of Cambridge
% rld46@cam.ac.uk

% Co-author Information:

% Neil Arnold
% Scott Polar Research Institute, University of Cambridge
% nsa12@cam.ac.uk

% Ian Willis
% Scott Polar Research Institute, University of Cambridge
% iw102@cam.ac.uk

% Alison Banwell
% Cooperative Institute for Research in Environmental Sciences, University of Colorado
% Scott Polar Research Institute, University of Cambridge
% Alison.Banwell@Colorado.EDU

% Andrew Williamson
% Scott Polar Research Institute, University of Cambridge
% agw41@cantab.ac.uk

% Hamish Pritchard
% British Antarctic Survey
% hprit@bas.ac.uk

% Andrew Orr
% British Antarctic Survey
% anmcr@bas.ac.uk

% -------------------
% SHARING INFORMATION. 
% -------------------

% These products are distributed under the International Create Commmons Licence CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
% Please cite: Dell, R., Arnold, N., Willis, I., Banwell, A., Williamson, A., Pritchard, H., and Orr, A.: Lateral meltwater transfer across an Antarctic ice shelf, The Cryosphere, 14, 2313?2330, https://doi.org/10.5194/tc-14-2313-2020, 2020.

% --------------------------
% METHODOLOGICAL INFORMATION
% --------------------------

% The methods related to this code can be found in the companion paper:
% insert paper.

% This work was produced by Rebecca Dell and co-authors as part of her PhD
% research at the University of Camrbidge. % The maojrity of the code
% originates from work by Williamson et al. (2018),
% and has been adapted here for better application to Antarctic Ice Shelves.

% The original code by Williamson et al. largely built upon the methods of Williamson et al. (2017)(doi:10.1016/j.rse.2017.04.032), Pope et al. (2016)(doi:10.5194/tc-10-15-2016), and Miles et al.
% (2017)(doi:10.3389/feart.2017.00058).

% Please note that the variable names within this code are not necessarily consistent with the 
% terminology used within the companion paper, please contact Rebecca Dell if anything is unclear.  

% The scripts are described below, in the order they should be used:

% -----
% DN to per pixel TOA calculations (L8 images only)
% -----

% The following script is used to calculate per pixel solar angles for L8
% images:
TOA_per_pixel.m % calls the relevant images 
    % Sub scripts linked to this script include:
    ls8_dn2refl_perpix.m % Calculates per pixel TOA
    ls8_meta_parser.m % ?????

% Further packages and scripts required for the above products are detailed within
% the relevant scripts, and can be found online. 

% ------
% Preprocessing and depth calculations
% ------

% There are two main scripts for this section. These are:
L8_pre_process_and_depths.m
% These scripts take Landsat and Sentinel images and create an area and
% depth matrix for each image

    % Within the L8_pre_process_and_depths, two additional scripts are also 
    % called:
    S2_NDWI.m % Simple NDWI function - works for both L8 and S2 data
    L8_depth_mask.m % Runs the depth calculations for a L8 Image

    % Within the S2_pre_process_and_depths, two additional scripts are also 
    % called:
    S2_NDWI.m % Simple NDWI function - works for both L8 and S2 data
    S2_depth_mask.m % Runs the depth calculations for a S2 Image

% -----
% Water Body Geometry Calculations
% -----

% Here, water bodies are defined as either circular or linear
Lakes_VS_Streams.m

% -----
% Water Body Tracking 
% -----

% To track water bodies, you must first create a maximum extent matrix
% using this script:
S2_L8_make_max_extent.m

% The following script can then be used to track changes in water body
% area, volume, and geometry over time:
Tracking_Algorithm.m







