Skip to content

Commit

Permalink
fixed model/sensor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddkovacs committed Dec 27, 2024
1 parent 5bc9995 commit 52d4b56
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_Cab_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@

veg_index_GREEN = 'GREEN' ;
model_GREEN = 'MLRAmodel_GREEN_TOA_ref_GPR_EBD_246samples_S2_10B_MNI' ;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
GREEN_model = {
'X_train': X_train_GREEN,
'alpha_coefficients' : alpha_coefficients_GREEN,
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_Cm_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
sx_GREEN = ee.Image([[0.037451429757346,0.0475464020864585,0.060269354086228,0.063701810877537,0.0719728797441739,0.095325988341316,0.092968633455405,0.101912680024003,0.0860167226761088,0.359065332738712]]);

mean_model_GREEN = 0.00454959349593496;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.181272700790667,0.0750821133320625,0.0316399403182101,0.14558592961395,0.0135911639045632,0.00019954646538479,0.012045944373085,0.209012140812731,0.0155544376284558,0.0790820501929137]);

hyp_sign_GREEN = ee.Array([5.06208581362647e-07]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_Cw_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
sx_GREEN = ee.Image([[0.039279459652056,0.0528126703502308,0.0691963908674252,0.067752137751149,0.0755021111316717,0.102954955509544,0.0991872452640435,0.106953356043315,0.0908092333983256,0.371958080366003]]);

mean_model_GREEN = 0.0176126016260163;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.146151069015314,0.00127750150267153,0.123889623606056,0.0520415670530054,0.153240896430211,0.00193630353665983,0.000590763230485228,0.132000626718698,0.168576830268461,0.116123539153294]);

hyp_sign_GREEN = ee.Array([1.60102554126866e-05]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_FVC_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
sx_GREEN = ee.Image([[0.0344363432356411,0.0478317375870278,0.0634878144525908,0.0623275299577955,0.0704572128634885,0.0991883539691097,0.0961286869815061,0.104224239303762,0.0864849210948693,0.32568366821324]]);

mean_model_GREEN = 0.649634297520661;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.0814452607816384,0.181726294134375,0.100678267594561,0.0167750916501141,0.0114891424232618,0.06897870616869,0.000394147188139533,0.229984486921288,0.0294222915961167,0.0846859033588384]);

hyp_sign_GREEN = ee.Array([0.00172044495145402]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_LAI_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
sx_GREEN = ee.Image([[0.0341110118555039,0.0429360159889493,0.0528173164251576,0.0597515068212629,0.0774878820725034,0.102889910240467,0.096653505730815,0.105252250396976,0.0784297545027723,0.334240075951238]]);

mean_model_GREEN = 2.65682808219178;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.00223621367384566,9.22416530491212e-05,0.0734850579397631,4.3992069638502e-05,2.48407993445342e-05,0.0845090442078447,0.000239568084834582,0.00653434673094395,0.031936049631513,0.00401035420514296]);

hyp_sign_GREEN = ee.Array([0.424997213479492]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_laiCab_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
sx_GREEN = ee.Image([[0.0407189370246026,0.0525296906882207,0.0654653539774023,0.0665752468711744,0.0819505010642093,0.105501822859597,0.102663436657193,0.112021827667774,0.088265262921489,0.36800690701741]]);

mean_model_GREEN = 0.730449834024896;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.0132780955104677,0.0619898645996047,0.000697168438095766,0.374646601706418,0.473378964188042,0.149981846233606,0.0418450090947406,1.89540567789818,0.00193451255803094,0.308002735044234]);

hyp_sign_GREEN = ee.Array([0.0124632023493533]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_laiCm_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
sx_GREEN = ee.Image([[0.0328598447832158,0.0435519648455888,0.0550581566868474,0.0612886791691499,0.0720522185093823,0.0937681724849363,0.0924299609212929,0.0999806813773256,0.0763049726459951,0.342237589035023]]);

mean_model_GREEN = 128.847967479675;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.0346785927600247,0.00293563705025835,0.205397834530068,0.0260925431461144,0.135496641728683,0.0677222299728429,0.00174907678133228,0.239547706970634,0.0229607619323226,0.00709626315882356]);

hyp_sign_GREEN = ee.Array([1172.97863969111]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L1C_laiCw_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
sx_GREEN = ee.Image([[0.0443754713205998,0.0529436672040663,0.072331944141462,0.0734179385295004,0.0855253524426983,0.111382856949353,0.105588049575596,0.115761716195456,0.0985697882175554,0.359589340101908]]);

mean_model_GREEN = 442.635555555556;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
hyp_ell_GREEN = ee.Image([0.0003462013752174,7.526391185093e-05,3.07240876870034e-06,0.0104826868837844,2.59148694487854e-06,0.0470625373477495,0.0404676722741389,0.00135718021292116,0.254354222270907,0.00463788919088599]);

hyp_sign_GREEN = ee.Array([18460.5993981817]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_Cab_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
,0.015723564495707,0.00849001265538844,0.23943619177056,-0.100337854061092,0.382885750949836,0.0122038339942949,-0.0735535403438755,0.00767954371893399,0.0519415826427982,-0.069348025127465,-0.118912757806046,-0.0979584883565941,-0.00116321821023279,0.0883161779153103,-0.247786282317832,-0.0715937679301651,-0.020115462417537,-0.0506751739523744,0.220490780276702,-0.165053894548552,-0.0963898628253958,0.0836398628602011,0.278779929868963,-0.0945913266226475,0.0604336201793828,0.130111550645468,-0.0280808808832087,0.108125539877593,0.105744298686409,0.197232392934813,0.0872770341264492,-0.119098379845344,-0.246309591312888,-0.0623054354885371,0.0117991979052449,-0.342127803076821,-0.00677065433114082,0.140656939868026,-0.166928807442364,0.135911298990647,0.0898187263371911]]);

mx_GREEN = ee.Array([[0.0529961324193548,0.0975576975806452,0.072947370967742,0.144166822580645,0.317990713709677,0.392076330645161,0.406348991935484,0.412163508064516,0.23757847983871,0.157683967741936]]);

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();

mean_model_GREEN = 30.4166911290323;

Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_Cm_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

XDX_pre_calc_GREEN = ee.Array([[0.323920974272108],[2.279388513147],[0.0240574108368915],[1.26026962597604],[3.66898488324446],[0.355982181829238],[0.177048774978994],[0.146581944329453],[0.176507611227321],[0.134278562464295],[0.240879087068311],[1.6195928638835],[0.448849022872085],[0.285322940561344],[3.40465085844861],[0.205508956347022],[1.84664623475846],[1.64539506758075],[0.910222211299374],[0.315593914505585],[1.77438054354979],[2.16924437977822],[0.238086673034826],[1.08635837612774],[0.256928491702754],[0.66475251349337],[0.233840837491143],[0.206108108101405],[0.310813562398364],[0.0933153497019175],[2.61672243384715],[3.01050090401663],[2.18838811021079],[0.191954080395925],[0.324554288510307],[0.141805416722216],[0.633698557916749],[0.355486497294325],[0.342545338020194],[0.315541832167441],[0.201510202700795],[0.331379890592416],[0.132432706736994],[0.194183779908042],[0.128638582079626],[2.00631678788259],[1.50433775080634],[0.893714664096899],[17.0179998668439],[12.1296519442766],[9.71211693702173],[8.07777275958751],[6.24768185521685],[10.4034274628974],[7.43792691476124],[2.1634817720687],[1.34385588580957],[10.3104848804682],[4.88074323147282],[4.31656392325527],[2.54676252421453],[0.458502522555612],[6.13751575262431],[2.17214298551552],[0.484772395632436],[0.490844273453685],[3.3625716290627],[3.37637010272037],[4.18194309678072],[2.63821701111772],[0.155593353781272],[1.15755874077627],[1.61232712426972],[3.43651225347892],[2.36778756360889],[5.18023777994786],[2.00908212426796],[1.84079071529152],[1.69401626058831],[3.78183908023574],[4.9046980194532],[1.13799881804492],[1.67297329018875],[0.813556394812985],[0.498788789017188],[2.18556815285507],[2.88666082842804],[0.0951596305246872],[0.231128612818337],[1.27973045261686],[0.40294625347181],[1.19600271115965],[2.84560121548333],[0.137471119150842],[0.374442175235203],[0.386247481355274],[0.0576418724494243],[3.05491486702664],[0.335577757958208],[0.150298104734713],[0.276420440311734],[2.34665433898918]
,[3.20831045530119],[1.65777309665487],[0.109080937547132],[0.195689552653635],[1.47903293367792],[1.12211464883607],[0.151197490901388],[0.213380973017095],[1.39567694705335],[2.5500677867995],[0.173292940097003],[0.84578521540979],[1.30795754818623],[0.263419780517861],[3.2638622935823],[0.951017049785911],[0.167072192564622],[1.03744597093754],[1.32404363957099],[0.388633897356252],[2.30637399223289],[2.71500443067698],[0.572590612662145],[2.82677451884308],[0.571404526600043],[0.196610167580251],[0.0504163344366821],[0.0901767852935301],[0.298869063587537],[0.687114484301498],[3.44990566762537],[0.450142077031551],[0.144355596938137],[0.508268572254465],[0.202897675346564],[0.138480064206372],[4.89295729620615],[2.53728796202031],[0.312444879242442],[0.0996973415073782],[0.569381554446797],[0.148332836871742],[0.927781519555714],[15.9730909532569],[1.91758592997766],[0.104563563049684],[0.369500671371374],[0.419417920837329],[0.336577077297866],[0.761535102027735],[1.4871307114898],[0.236066477005481],[0.0791454404423531],[0.47749027811667],[0.232318758327873],[0.317072617232614],[0.352637801040956],[0.0370071846112324],[1.96935037932993],[0.0816019924716523],[0.0351366875847598],[0.648203941457253],[0.26323583698728],[1.45489671796717],[0.239002453090161],[0.210315232107521],[0.256928491702754],[0.206108108101405],[0.324554288510307]]);

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();

veg_index = 'Cm' ;

Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_Cw_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
hyp_sign_GREEN = ee.Array([1.75337805220114e-05]);

hyp_sig_GREEN =0.000192087221969989;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
XDX_pre_calc_GREEN = ee.Array([[0.533365088110682],[8.33538315955225],[0.185533535939252],[1.17481160870365],[2.87884071599663],[0.296558222397132],[0.903172910732981],[0.448549370812076],[1.48673512558531],[0.381396189106451],[1.29025135844619],[1.42527272030807],[0.98560622426073],[0.545095638721094],[2.4629567074196],[0.62783275313586],[1.86902421883797],[2.47686445409055],[0.752737976749371],[1.06448607217338],[3.2929572148322],[0.793044541772211],[2.28977646873206],[1.16835962241648],[0.359855073827813],[3.15036382193376],[1.51104513104647],[1.24529737673456],[1.13919316696123],[0.179486082792651],[7.47321166340212],[0.749033169175315],[3.00093732951252],[0.506228875633947],[1.52715543200845],[0.604094587143433],[0.907955318355465],[0.570906758784209],[0.350684091366355],[1.2178933152183],[0.163354781950659],[1.06081892218465],[0.751225626344805],[0.122050507205057],[0.506225797324506],[2.08241307339996],[0.555443991837925],[0.865663653988025],[14.4931379715606],[20.0754374241909],[18.2812532078985],[10.1035194742971],[3.49303921467739],[20.0503043634813],[8.35655728373527],[4.48329893173038],[3.15076381315174],[20.7972439723434],[14.2182573032259],[6.25736212454846],[4.56666893573868],[2.87552953254972],[3.54388498648259],[12.9233224387473],[3.08634693099968],[8.29147307449446],[1.9243366880789],[0.242785782045226],[0.832450857587318],[0.268078809005742],[2.36554495884027],[2.07301615119033],[0.40465300337662],[0.443439217131394],[1.40299315074306],[0.568277982118781],[1.17094109917434],[0.287642499006676],[3.5907554745366],[1.10456013774211],[0.0807372022718624],[2.4018839709128],[0.580343496708352],[0.353239207468622],[0.594298984132705],[1.24541830829706],[4.91504548161425],[1.28959737090336],[2.43240671413975],[2.50427913761575],[2.85716080679711],[0.1974666561769],[0.980136655216496],[4.48116144265891],[3.18543407294978],[1.41657149522585],[0.251647726919293],[0.0124129119400273],[1.06967436376741],[4.4093341102808],[1.84670659112418],[2.99789986683212]
,[1.689768532439],[0.744893743195533],[0.716702583452379],[0.182807237305393],[0.505372674737455],[1.08594862402111],[1.25599469580347],[0.608113780916954],[0.853037292635294],[1.70446472048194],[0.365608907999198],[4.82950281497765],[1.00260507132128],[1.03905211631262],[0.536084830601014],[4.45521946721671],[2.93356213846051],[0.364430614029528],[0.0277469644601983],[1.27448972968213],[0.314568855799182],[2.31014498374625],[0.371543121854426],[2.59297197235211],[0.630394723924683],[1.74666229211252],[0.956125065702361],[5.67856452272675],[0.792973980853022],[0.665691446301832],[0.796088393509655],[6.2302910569073],[0.561617242194291],[2.72198978943494],[1.25862696117306],[0.41385199488088],[2.09223894502336],[6.76696033836798],[2.43596778191563],[0.244984684555209],[0.516075351691727],[1.77804898390229],[0.390199879587058],[0.6973243328376],[1.59241243790813],[1.14879710560531],[0.305946493258878],[0.156226787180549],[1.16019437300753],[1.04154266036506],[1.00055418064389],[0.995778473931242],[1.0104206845671],[1.09012987901652],[1.46610542995989],[0.391845948654716],[1.4466395146426],[0.212562431417813],[3.16901545164727],[0.0913180357868984],[0.661717194296252],[1.42159857771519],[1.40167261321915],[2.98759437654561],[1.07815633987875],[0.850519314451439],[0.636808567626628],[0.982958253858084],[0.160602345310159],[0.412267326244747],[0.230871448266957],[2.7366055172673],[0.779438676138958],[0.373826265847155],[3.69049224627112],[0.776000313190607],[0.863526814097149],[1.5576024858815],[1.25476088656129],[2.68114104531894],[0.767522847016148],[0.587474983483636],[0.413965865462835],[0.309774955044287],[3.06904905340811],[1.91087524619124],[1.17816033648149],[0.302588372786865],[1.929142279039],[1.38382353628956],[1.61215122894195],[1.52061635175568],[0.250294278824362],[3.17740927666676],[0.497089450874623],[0.0500847897543027],[0.650859752172762],[0.226040882054917],[0.983216914818565],[0.442004929171281],[0.13054842770146],[0.97444189007871],[1.93392636350751]
,[0.144460206746834],[0.793928133795874],[0.922573116435723],[1.00372047335434],[0.958856198843773],[1.44096456659537],[0.698776704123703],[2.88187879696586],[1.06937944543803],[0.807930125619558],[0.236514303964571],[0.100920905448706],[5.28768340487135],[1.47540602050582],[1.83821489889757],[0.456197362645029],[2.65158311794059],[2.28301322626617],[1.16872120814164],[0.244503958609147],[0.276732347873655],[0.0803693843534883],[0.856678117706774],[0.715783674811465],[0.39746498170709],[0.133584617504676],[0.504001875238643],[0.968537770108027],[0.813113029441406],[1.85626453269628],[0.109086870822347],[2.64883338702769],[0.431723326840262],[1.39830138513669],[5.46377205195654],[0.180061706199982],[0.902867622508034],[0.746083523980506],[1.11665241039362],[0.551023474670809],[0.982228245280402],[0.101115944358711],[0.981250384099422]]);
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_FVC_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


veg_index = 'FVC' ;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
scaleFactor_GREEN= 10000;

bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B11', 'B12']
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_LAI_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
veg_index = 'LAI' ;

scaleFactor_GREEN= 10000;

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B11', 'B12']

bands_dict = {"B2": ee.PixelType.float(),
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_laiCab_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
scaleFactor_GREEN= 10000;

bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B11', 'B12']

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
bands_dict = {"B2": ee.PixelType.float(),
"B3": ee.PixelType.float(),
"B4": ee.PixelType.float(),
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_mangrove_Cab_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

veg_index_GREEN = 'GREEN'
model_GREEN = 'GREEN_ABD_GPR'

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
GREEN_model = {

'X_train': X_train_GREEN,
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_mangrove_Cm_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

veg_index_GREEN = 'GREEN'
model_GREEN = 'GREEN_ABD_GPR'

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
GREEN_model = {

'X_train': X_train_GREEN,
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_mangrove_Cw_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

veg_index_GREEN = 'GREEN'
model_GREEN = 'GREEN_CBD_GPR'

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
GREEN_model = {

'X_train': X_train_GREEN,
Expand Down
2 changes: 1 addition & 1 deletion models/SENTINEL2_L2A_mangrove_LAI_GEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

veg_index_GREEN = 'GREEN'
model_GREEN = 'GREEN_EBD_GPR'

XTrain_dim_GREEN = X_train_GREEN.length().toList().get(0).getInfo();
GREEN_model = {

'X_train': X_train_GREEN,
Expand Down
10 changes: 5 additions & 5 deletions pyeogpr/gee_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def __init__(
ee.Initialize(project=self.projectID)

self.sensor = sensor
if self.sensor == "SENTINEL2_L1C" or "COPERNICUS/S2_HARMONIZED":
if self.sensor == "SENTINEL2_L1C" or self.sensor == "COPERNICUS/S2_HARMONIZED":
self.sensor = "COPERNICUS/S2_HARMONIZED"
search_sensor = "SENTINEL2_L1C"

if self.sensor == "SENTINEL2_L2A" or "COPERNICUS/S2_SR_HARMONIZED":
if self.sensor == "SENTINEL2_L2A" or self.sensor == "COPERNICUS/S2_SR_HARMONIZED":
self.sensor = "COPERNICUS/S2_SR_HARMONIZED"
search_sensor = "SENTINEL2_L2A"

if self.sensor == "SENTINEL3_L1B" or "COPERNICUS/S3/OLCI":
if self.sensor == "SENTINEL3_L1B" or self.sensor == "COPERNICUS/S3/OLCI":
self.sensor = "COPERNICUS/S3/OLCI"
search_sensor = "SENTINEL3_L1B"

Expand Down

0 comments on commit 52d4b56

Please sign in to comment.