Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better gestion of error for recalibration #230

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

vincelhx
Copy link
Collaborator

No description provided.

@agrouaze agrouaze added the bug Something isn't working label Oct 31, 2024
@vincelhx
Copy link
Collaborator Author

changed rasters chunks

@vincelhx
Copy link
Collaborator Author

in the last commit I changed RCM calibration :

we did {varname}_raw = {varname}_raw.where({varname}_raw > 0) .
But it was a problem in the case of denoising was already applied in DN. It was forcing the future "{varname}_raw" (modified in add_denoised) values to be nan ;

Now steps are made in the good order :

-calibration
-denoising + renaming if necessary ({varname}_raw is with noise while {varname} is without noise

  • then force raw vars to be > 0

@agrouaze should i do the same logic for S1 & RS2 ?

@agrouaze
Copy link
Member

agrouaze commented Nov 20, 2024

in the last commit I changed RCM calibration :

we did {varname}_raw = {varname}_raw.where({varname}_raw > 0) . But it was a problem in the case of denoising was already applied in DN. It was forcing the future "{varname}_raw" (modified in add_denoised) values to be nan ;

Now steps are made in the good order :

-calibration -denoising + renaming if necessary ({varname}_raw is with noise while {varname} is without noise

* then force raw vars to be > 0

@agrouaze should i do the same logic for S1 & RS2 ?

@alxmouche said "it would be better to keep negative value in the sigma0 (resp. beta0 and gamma0)", also it would be good to keep the 3 variables at the 3 steps in the measurement dataset:

  1. digital number
  2. sigma0 calibrated
  3. sigma0 calibrated+denoised

Then this protocol about the negative values should be described in the sphinx documentation.
I don't see any reason why it would be different from a mission to another.

It also related to #193 and #242 .

@vincelhx
Copy link
Collaborator Author

In the last code I wrote, all the missions perform 'force raw vars to be > 0' at the end of the calibration and denoising process. However, since RCM — with sometimes an already denoised product — is processed differently, the code had to be modified

@agrouaze
Copy link
Member

agrouaze commented Nov 25, 2024

In the last code I wrote, all the missions perform 'force raw vars to be > 0' at the end of the calibration and denoising process. However, since RCM — with sometimes an already denoised product — is processed differently, the code had to be modified

What is the "last code"? I cannot find any mention of this sentence "force raw vars to be > 0".
The sphinx documentation does not explain the calibration nor the denoising nor this last question "do we let negative values", I think this is important, so if you don't add it, I will do it in another PR.
sphinx documentation is aligned with the code except for the special case of "already denoised".
I will make sure with Canadian agency that the 2 quantities:
a ) sigma0 = denoise(calibrate(DN))
b ) sigma0 = calibrate(denoise(DN))
are equivalent.
Then documentation will be updated.

@vincelhx
Copy link
Collaborator Author

#245 will be in marge of making an homogenous code between the three sensors

@vincelhx vincelhx merged commit 2e87b95 into umr-lops:develop Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants