- retrieve surface reflectance products (Maja S2, Maja Venus zip, HDF) as numpy array, accounting for cloud and edge masks;
- compute statistics from products, collection of products, or from comparison between two collections.
version "1.0.3"
----------- coverage: platform linux, python 3.7.7-final-0 -----------
Name Stmts Miss Cover Missing
---------------------------------------------------------
common/Collection.py 65 5 92% 19, 60, 91-92, 106
common/Comparison.py 38 8 79% 15-19, 50-52
common/Product.py 172 21 88% 20-23, 54-60, 70-71, 92, 136-139, 242, 245, 258, 265
common/Roi.py 78 12 85% 51-52, 57-58, 72, 74, 94-98, 112, 114, 122
common/test_Collection.py 21 0 100%
common/test_Comparison.py 17 0 100%
common/test_Product.py 170 0 100%
common/test_Roi.py 103 0 100%
common/test_utilities.py 84 0 100%
common/utilities.py 74 11 85% 65-66, 75, 89-91, 158, 172-175
---------------------------------------------------------
TOTAL 822 57 93%
- requirement.txt (pip)
- mtools.yml (conda)
Generic class with the following methods:
- get_content_list(): retreive the content of a product
- find_band(string): get the filename from a pattern
- get_band(band, [scalef]): get a band as numpy array, optionally apply scale factor
- get_band_subset(band, roi=None, ulx=None, uly=None, lrx=None, lry=None, scalef=None): get a subset of band by passing either an Roi object of coordinates, optionally with scale factor
Extends Product for zipped files.
Extends Product.Product_zip with venus specific methods and attributes.
Extends Product with Maja S2 specific methods and attributes.
Extends Product for HDF files.
Extends Product.Product_hdf with ACIX reference S2 specific methods and attributes.
A class to create a collection of ROI from pairs of coordinates described in a csv file and an extent.
An Roi class that can be passed to Product.get_band_subset()
Automatically finds any products in a given path and create collection instances for Comparison.
Cornerstone class to compare two time series of products in collections. Provides facilities to find matching by date between two collections of products, and compute statistics for each band of each product of both collections. Create subclasses of Comparison for various scenarii.
Extends Comparison.Comparison with specific methods for ACIX.
- one_by_one(): output RMSE for valid pixels between each band of each products of two collections passed to Comparison. A valid pixel is within image boundaries (from edge mask) and cloud-free (from cloud mask);
- flatten(): output one RMSE of the entire comparison.
Lightweight utility to compute band statistics from zipped Venus products over user defined Regions of Interest.
Coordinates are expressed in UTM, ROI extent in meters.
python roistats.py <full_path_produit.zip> <roi_definition.csv> [-v|e]
A ROI definition file must be in csv, with one line per ROI containing:
<int_roi_id>, <float_utmx>, <float_utmy>
With:
-
int_roi_id: any user-defined int
-
float_utmx: x (UTM) centre coordinate of the ROI
-
float_utmy: y (UTM) centre coordinate of the ROI
Optional arguments:
-v, --verbose : set log file verbosity to DEBUG (defaults to INFO)
-e, --extent : set ROI extent (in meters, defaults to 100m). An ROI is a square of size extent*extent centered on (utmx, utmy)
roistats.py --help
'
Dependency list provided as yaml conda environment file in:
mtools.yml