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

Added landsat8 collection2 support #173

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

s-kowa
Copy link
Contributor

@s-kowa s-kowa commented Jun 1, 2023

Current version of raster.py uses metadata group names based on Landsat Collection 1 data (obsolete). This revised version checks the collection number from the MTL metadata file and uses proper group names depending on the collection number.
MTL changes are documented in "Landsat Collection 2 Level-1 Product Metadata Fields", which can be accessed at USGS: https://www.usgs.gov/media/files/landsat-collection-2-level-1-metadata-additions-and-changes

ukis_pysat/raster.py Outdated Show resolved Hide resolved
@s-kowa
Copy link
Contributor Author

s-kowa commented Jun 3, 2023

Fixed a bug in my previous commit, i.e. different group names between Landsat 8 vs 5-7 -> "TIRS_THERMAL_CONSTANTS" vs "THERMAL_CONSTANTS" were not considered for collection 1 data, hence causing a unit test error.

This issue has been resolved in my latest commit.

In additon, I included an iterative search for the collection number inside the MTL metadata file. This allows for an easy expansion towards additional collection numbers in the future. Group names are defined based on the found collection number and exceptions are treated as AttributeErrors.

I missed to set the black formatting line length to 120 in my earlier commit. This has been fixed in my latest commit.

@fwfichtner fwfichtner self-requested a review June 4, 2023 06:57
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch coverage: 83.87% and project coverage change: -0.76 ⚠️

Comparison is base (d2bbf2e) 96.16% compared to head (9d0c8db) 95.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #173      +/-   ##
==========================================
- Coverage   96.16%   95.41%   -0.76%     
==========================================
  Files           6        6              
  Lines         548      567      +19     
==========================================
+ Hits          527      541      +14     
- Misses         21       26       +5     
Flag Coverage Δ
unittests 95.41% <83.87%> (-0.76%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ukis_pysat/raster.py 93.23% <83.87%> (-1.98%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@fwfichtner fwfichtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good, I guess we can do it like that. Thank you very much!

ukis_pysat/raster.py Outdated Show resolved Hide resolved
… added argument to iteratre_mtl(), whis is missing in the comment (otherwise there would be nothing to call
@fwfichtner fwfichtner merged commit fce7036 into dlr-eoc:main Jun 6, 2023
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants