You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have never used Satpy with the Sentinel 2 products, so I'm not sure which changes are all relevant. But I think at least these two:
The conversion from DN to toa reflectance changes due to the introduction of an offset. It could very well be that this wont break any code, but lead to incorrect reflectances if it's not properly taken into account, Making it a very tricky change.
Changing the equation itself shouldn't be too hard, since for old versions an offset of zero can be used, and it will still work.
Note that they mention a band dependent value. If it will actually be a different value per band, but constant over time, it could perhaps be added to the yaml. If it's not constant over time, it would need to be read from the xml each time, but that seems less likely to me.
The change to the detector footprint masks might also be relevant regarding the sensor viewing angles. Although I couldn't figure out how this is done in Satpy by quickly skimming through the code. Each detector has it's own set of angles (in the xml), and in the old versions the footprints of these detectors are provided as GML files (vector). Combining those allows to create a single array with the angles of each relevant detector,
In the new version these GML files will be replaced by a raster mask, So it should actually make things a lot easier, and it resolves a long standing issue where it wasn't clear what happened in the area where the detectors overlap (see this for example),
This change definitely sounds like it would break existing code relying on the GML files, but as said, I can't really piece it together from looking at the reader itself. Most relevant code related to the angles seems in the SAFEMSIMDXML class at: https://github.com/pytroll/satpy/blob/main/satpy/readers/msi_safe.py#L94
If old versions also need to be supported, some sort of switch has to be made based on the product version. There's a PROCESSING_BASELINE tag in ones of the xml's which should contain the version.
The announcement mentions the release of some sample products becoming available, but I haven't seen those yet.
The text was updated successfully, but these errors were encountered:
@RutgerK thanks a lot for the heads up! I totally missed this. I will try to have a look at it this week, let's hope they will release some sample files soon.
The format of the Sentinel 2 products will change on October 26th, potentially causing some issues with the current reader (msi_safe).
https://sentinels.copernicus.eu/web/sentinel/-/copernicus-sentinel-2-major-products-upgrade-upcoming/1.9?redirect=%2Fweb%2Fsentinel%2Fmissions%2Fsentinel-2
I have never used Satpy with the Sentinel 2 products, so I'm not sure which changes are all relevant. But I think at least these two:
The conversion from DN to toa reflectance changes due to the introduction of an offset. It could very well be that this wont break any code, but lead to incorrect reflectances if it's not properly taken into account, Making it a very tricky change.
Currently the quantification value seems to be hard coded at:
https://github.com/pytroll/satpy/blob/main/satpy/readers/msi_safe.py#L74
Changing the equation itself shouldn't be too hard, since for old versions an offset of zero can be used, and it will still work.
Note that they mention a band dependent value. If it will actually be a different value per band, but constant over time, it could perhaps be added to the yaml. If it's not constant over time, it would need to be read from the xml each time, but that seems less likely to me.
The change to the detector footprint masks might also be relevant regarding the sensor viewing angles. Although I couldn't figure out how this is done in Satpy by quickly skimming through the code. Each detector has it's own set of angles (in the xml), and in the old versions the footprints of these detectors are provided as GML files (vector). Combining those allows to create a single array with the angles of each relevant detector,
In the new version these GML files will be replaced by a raster mask, So it should actually make things a lot easier, and it resolves a long standing issue where it wasn't clear what happened in the area where the detectors overlap (see this for example),
This change definitely sounds like it would break existing code relying on the GML files, but as said, I can't really piece it together from looking at the reader itself. Most relevant code related to the angles seems in the SAFEMSIMDXML class at:
https://github.com/pytroll/satpy/blob/main/satpy/readers/msi_safe.py#L94
If old versions also need to be supported, some sort of switch has to be made based on the product version. There's a
PROCESSING_BASELINE
tag in ones of the xml's which should contain the version.The announcement mentions the release of some sample products becoming available, but I haven't seen those yet.
The text was updated successfully, but these errors were encountered: