FIDUCEO / FCDR_HIRS

Other
1 stars 2 forks source link

Fix bug in satellite angle calculation #308

Closed gerritholl closed 5 years ago

gerritholl commented 5 years ago

The satellite angle calculation was performed assuming a satellite position above position 28 rather than between 28 and 29. Also, my calculation of crossing the meridian did not make sense, this needs to be per scanline.

This should fix #304 as reported by @cbulgin

gerritholl commented 5 years ago

This is what the corrected image looks like:

image

gerritholl commented 5 years ago

Or rather (improved colormap):

image

cbulgin commented 5 years ago

Yes, I think this looks better. Are you going to report azimuth angles in the range -180 to 180 rather than 0-360?

On 26 Oct 2018, at 19:12, Gerrit Holl notifications@github.com wrote:

Or rather (improved colormap):

https://user-images.githubusercontent.com/500246/47584671-1a351700-d953-11e8-8d6d-66185d8c47af.png — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FIDUCEO/FCDR_HIRS/pull/308#issuecomment-433497193, or mute the thread https://github.com/notifications/unsubscribe-auth/AFnbwIqJprRZkqtYzxeC_5k9Xl1fJ0XBks5uo1CagaJpZM4X8rM0.

gerritholl commented 5 years ago

I'm not sure. I don't think we have defined in the project whether we have azimuth angles in [-180, 180] or in [0, 360], but we probably should. I'll send a mail around.

gerritholl commented 5 years ago

There seems to be still an issue with the writing out, I'm overwriting the format that TB is defining:

Out[19]:
{'dtype': numpy.uint16,
 '_FillValue': 65535,
 'scale_factor': 0.01,
 'add_offset': -180.0,
 'chunksizes': (100, 56)}

Yet:


short satellite_azimuth_angle(y, x) ;
                satellite_azimuth_angle:_FillValue = -32767s ;
                satellite_azimuth_angle:long_name = "Azimuth angle (from the north) of satellite as seen from the ground" ;
                satellite_azimuth_angle:units = "degrees" ;
                satellite_azimuth_angle:scale_factor = 0.01 ;