Skip to content

Commit

Permalink
Updated sentinel_init.py to 0.62b
Browse files Browse the repository at this point in the history
  • Loading branch information
OSINT-TECHNOLOGIES committed Mar 15, 2024
1 parent ebeb5dd commit 9d85974
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions gee/modules/sentinel_init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import ee
import mercury as mr
import txtreading as txtr
import sys

sys.path.insert(0, 'common//') # common files

class SentinelInitialization:
def __init__(self, m, date_one, date_two, max_cloud_covering):
Expand All @@ -18,9 +22,9 @@ def sen2msisr_init(self):

vis_sen2sr = {
'bands': self.sen2msibands.value,
'min': 0,
'max': 3000,
'gamma': 1.4,
'min': txtr.get_min_value('SENTINEL 2 MSI SR'),
'max': txtr.get_max_value('SENTINEL 2 MSI SR'),
'gamma': txtr.get_gamma_value('SENTINEL 2 MSI SR'),
}
self.m.addLayer(composite_sr, vis_sen2sr, 'Sentinel 2 MSI SR')

Expand All @@ -34,17 +38,17 @@ def sen2msitoa_init(self):

vis_sen2toa = {
'bands': self.sen2msibands.value,
'min': 0,
'max': 3000,
'gamma': 1.4,
'min': txtr.get_min_value('SENTINEL 2 MSI TOA'),
'max': txtr.get_max_value('SENTINEL 2 MSI TOA'),
'gamma': txtr.get_gamma_value('SENTINEL 2 MSI TOA'),
}
self.m.addLayer(composite_toa, vis_sen2toa, 'Sentinel 2 MSI TOA')

def sen5pc_init(self):
sen5pc = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_CLOUD").select('cloud_fraction').filterDate(str(self.date_one.value),str(self.date_two.value))
vis_sen5pc = {
min: 0,
max: 0.95,
min: txtr.get_min_value('SENTINEL 5P CLOUD'),
max: txtr.get_max_value('SENTINEL 5P CLOUD'),
'palette': ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
}
self.m.addLayer(sen5pc, vis_sen5pc, 'Sentinel 5P Cloud')

0 comments on commit 9d85974

Please sign in to comment.