# April 7th, 2022 EchoPro Update

## Actions taken so far

* [Mapped the GUI elements](https://docs.google.com/document/d/1PXxni1oFca838eKvoyyT1s3Bx4MHkqns_ALf7EdxHys/edit?usp=sharing) 
to specific Matlab functions for both “MainWindow” and “Data Processing”

* [Documented the data flow of Matlab EchoPro](https://docs.google.com/document/d/177O0ThAxSQW6jDvKieldD2n4whNSIOicoDpGo0OFgxU/edit?usp=sharing) 
for the 2019 data only, with the Survey Region selected as both the US and Canada.
    * I have all GUI options set to their default values.
    * For each Matlab file I took the following notes:
        * Path to the file 
        * Description of what the file does 
        * Inputs of the file 
        * Outputs of the file 
        * Key actions completed within the file

* Began reproducing the Matlab code in Python
    * This work has been primarily focused on loading the biological data

## Key areas of EchoPro

* Open the provided files i.e. biological, stratification, acoustic data
    * This appears to account for a good portion of the code
  
* Process un-kriged Acoustic & Biological Data
    * This involves calculating values such as mean, density, etc. 
    * Organization of this data into final tables
  
* The process of bootstrapping 
    * This occurs when you select a percentage of transects that do not evenly divide the number of transects
    * Involves CV, kriging, and processing bio data 

* CV (the coefficient of variation) analysis based on Jolly & Hampton Variance 
    * The main output is area weighted variance of the "transect-length weighted biomass"
  
* Kriging 
    * Kriging occurs in several stages: 
        * Get mesh, determine transect region, Compute the biomass density at the center of each grid cell, read in 
      smoothed contour file, and perform lat and lon coordinates transformation
        * Initialize kriging parameters 
        * Actually perform kriging 
        * Create kriged biomass estimate
        * Create plots associated with kriging 
        * Run CV analysis on kriged data 
      
* Generate Reports
    * Writes data generated to excel files
  
* Visualization
    * Plots certain graphs based on user input
    * Has the option to save the plotted data to excel files


As we can see, all of this work is based on the files that are loaded. So, it’s important to agree on the form of 
these files. I have created a [Google Spreadsheet](https://docs.google.com/spreadsheets/d/1KX0luQs3hZA1V34e_kySFcZqEAN7iQgcUyuOebPtllo/edit?usp=sharing)
that contains general questions and discussion on the form of the biological files, so that we may arrive at an 
initial consensus of their form. 
