-
Notifications
You must be signed in to change notification settings - Fork 1
Description
@michaelleerilee and @NiklasPhabian :
I have some questions about code in: GeoData/geodata/modis_coarse_to_fine_geolocation/modis_1km_to_250m_geolocation.py
1 - In this function:
def itk_1km_to_250m ( i_tk_1km ) :
"""
return the 250m grid index along track of a 1km pixel
"""
return 1.5 + 4. * i_tk_1km
Is the argument i_tk_1km intended to be an integer? It seems like it must be, as an index, but the calculation can yield a floating point. Is the floating point just truncated to an integer?
2 - I see this code:
# the width of one scan, in number of pixels, at 250m resolution
w_scan_250m = 40
I'm not sure what this means. The scan is 8120 x 5416 for the 250 meter resolution, which is the size across and along the scan. What then is a pixel in this context? Isn't a pixel 1 x 1 in size? Where does the 40 come from? I have read the MOD09 docs here: https://salsa.umd.edu/files/MOD09_UserGuide_v1.4.pdf and it seems to say that pixels are only relevant for the gridded product, not the MOD09L2 product. What am I missing?
3 - In the code here:
# linear interpolation on the position
alpha_lon = ( lon_right_250m - lon_left_250m ) / ( isc_right_250m - isc_left_250m )
alpha_lat = ( lat_right_250m - lat_left_250m ) / ( isc_right_250m - isc_left_250m )
lat = lat_left_250m + alpha_lat * ( isc_250m - isc_left_250m )
lon = lon_left_250m + alpha_lon * ( isc_250m - isc_left_250m )
It seems that we end up doing linear interpolation of the lon and then the lat values. Is this correct?