Admin message

gitlab.irstea.fr: clap de fin

Après 10 ans de bons et loyaux services, la forge institutionnelle de feu Irstea baissera le rideau le 30 juin 2026 prochain Nous vous invitons donc à migrer tous vos projets sur la forge institutionnelle INRAE. Il n'est malheureusement pas possible de migrer automatiquement tous les projets. Toutefois l'équipe de la forge a testé différents scénarios de migration et a redigé un guide de migration

splm still fails in some cases

Cases were noticed where s2brdf fails on angles splm extrapolation:

Warning: rankMatrix(x, method='qr'): computing t(x) as nrow(x) < ncol(x)
Warning: There are perfect collinearities detected in X (the matrix of explanatory variables). This may make the model fit unreliable or may cause an error while model fitting. Consider removing redundant explanatory variables and refitting the model.
Warning: extrapolation with method 'splm' failed for detector 10. It might be that the number of valid pixels is too small(min. required 2x2). Trying with method 's2tbx'.
Error: Error: [trim] only cells with NA found

One example case is S2B_MSIL1C_20231216T091309_N0510_R050_T33NXH_20231216T110953.SAFE with band "B02".

It seems to be due to corner detectors having only one 5000m pixel angle referenced in the mtd files, unusable for interpolation. Moreover, this detector might not be part of detector footprint raster as the angle grid extent is larger than the band extent.

In that case bandId=1 which shows a detectorId=10 that contains one corner pixel in file MTD_TL.xml. But detectorId=10 is not part of S2B_MSIL2A_20231216T091309_N0510_R050_T33NXH_20231216T120208.SAFE/GRANULE/L2A_T33NXH_A035397_20231216T092608/QI_DATA/MSK_DETFOO_B02.jp2 which contains only detectors 4-9.

Footprint raster for B02:

image

Detector 10 raster:

image

Thus, angle rasters of detectors not part of footprint values should be filtered out of the list before trying extrapolation with splm.

Edited Mar 06, 2026 by DE BOISSIEU FLORIAN
Assignee Loading
Time tracking Loading

Espace TCHAP - Documentation Forge