Closed CameronLP closed 9 months ago
Added the line datacube = datacube[:, ::-1, :]
in the .BIP and latitudes = latitudes[:,::-1]
and longitudes = longitudes[:,::-1]
in the georeferencing code. The code now produces correctly oriented composites.
Follow up comment: moved the datacube = datacube[:, ::-1, :]
to the run_corrections
function in correction.py
It might be that this does not work for all captures, but I am note sure. If you notice an issue, then I might know how to fix it. So we can look at this when you encounter an issue.
@DennisNTNU this fixes an issue I found yesterday where all captures and their lat/lon arrays were being mirrored due to how the captures were loaded from .bip files and the georeferencing code. As a result non-resampled composites (as well as the underlying non-resampled datasets) were being mirrored horizontally.
The issue with individual captures being mirrored still remains, though it seems to be limited to captures from 2022. As a temporary work around I've added a "flip=True" argument to be set when a mirrored capture is loaded.
Oh I see, then I misunderstood!
Datacubes are currently mirrored in the cross track direction. The correct this, the datacube and lat/lon arrays need to be mirrored in: