I’m seeing behavior that might be a bug in the regrid operator. I’m trying to regrid a 2D array in order to display the array as a down-sampled image. For some grid sizes this works perfectly. But when the grid size goes below 9x9, the results come out scrambled.
For example, using the python bindings, a 10x10 regrid window looks great:
query = f.regrid('gimms_jan', 10, 10, 'avg(ndvi) as ndvi') plt.imshow(query.toarray())
But a 5x5 window gives the wrong result:
query = f.regrid('gimms_jan', 5, 5, 'avg(ndvi) as ndvi') plt.imshow(query.toarray())
You can see the results of these queries and others in a capture of my IPython notebook: http://pabercrombie.com/scidb/regrid/Regrid.html. The data set that I used for this experiment is available in SciDB text format at: http://pabercrombie.com/scidb/regrid/gimms_jan_2010.txt.gz. The array schema that I used is:
gimms_jan<ndvi:int16 NULL DEFAULT null,flag:uint8> [y=0:2159,500,0, x=0:4319,500,0]
Anyone know what’s going on here?