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
incorrect data offset in HSD files #681
Comments
You mentioned HSD 1.4, but the document you linked to says 1.3. This also says 2017. Do all current available HSD files have this 4 byte element? If not, is there a way to tell which version of the HSD format we are reading? |
so to clarify HSD comes with v1.2 and 1.3...so no 1.4. My mistake |
To my knowledge there is only one specification of the HSD format, the v1.1, 1.2, 1.3 refers to the document version - there have been some documentation updates but none to the file structure itself. I will check this bug against our own HSD reader - but I think @jferencik is right, there's a one pixel offset. |
Yep, can confirm that the SatPy Himawari data is shifted by one pixel relative to our own HSD reader. This is true both for current data and for historical data (i.e: Data across all document versions). |
@jferencik Good catch! Thanks for reporting! @simonrp84 Thanks for double-checking! |
@simonrp84, |
I think it's JMA |
@mraspaud , thanks. I was thinking the same but I just wanted to be sure. |
@jferencik Unfortunately I've never used the HRIT data from Himawari, so am unsure how it's processed. |
@mraspaud https://navigator.eumetsat.int/product/EO:EUM:DAT:HIMAWARI:H8-L1C/print is accurate:)))??? according to this link the HRIT files are produced by EUMETSAT not JMA I simply can not replicate the conversion of HSD to HRIT for VIS channels. Everything works for IR channels though, where there is no downsampling involved. |
I'm not sure, the best way is to ask the EUM Helpdesk for a definitive answer |
Describe the bug
The satpy's HSD reader is reading data incorrectly because it fails to calculate the
byte offset where data is located correctly. This is because one element (header length) from the ERROR_INFO_BLOCK or Block 10 has a incorrect type (u2, 2 bytes ).
https://github.com/pytroll/satpy/blob/master/satpy/readers/ahi_hsd.py#L211
As per HSD ver. 1.4
https://www.data.jma.go.jp/mscweb/en/himawari89/space_segment/hsd_sample/HS_D_users_guide_en_v13.pdf
it is a 4 byte word (Page 15)
The reader works but the data is shifted 1 pixel in x(horizontal ) dimension because the data offset is 2 bytes smaller so the first pixel in the image is read from the last spare 2 bytes.
To Reproduce
given the same image in HSD and HRIT from JMA (easier with IR >7 bands because they they feature 2 km resolution ) the difference between the brightness temperature shows the spatial offset.
# Your code here
Expected behavior
Calibrated data for IR images from HSD and HRIT images should be almost identical
Actual results
Text output of actual results or error messages including full tracebacks if applicable.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Info:
from satpy.config import check_satpy; check_satpy()
]Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: