On Mar 25, 3:47 pm, David Fanning <n...@dfanning.com> wrote:
> As it happened, however, my data didn't need to be
> gridded. It was gridded data already, so I don't know
> why the Gridding Wizard appeared.
My guess then is that the wizard appeared because the data was not in
a 2D array. For instance, both of these imap calls do not cause the
wizard to appear:
p=300L
im=dist(np)
lon=dindgen(np)*36d1/(np-1d0)-18d1
lat=dindgen(np)*18d1/(np-1d0)-9d1
imap,im,lon,lat,grid_units=2,map_projection='orthographic'
lon2=rebin(lon,np,np)
lat2=rebin(reform(lat,1,np),np,np)
imap,im,lon2,lat2,grid_units=2,map_projection='orthographic'
The second case actually surprised me. I did not expect it to be smart
enough to test if the 2D lon and lat happened to be a regular grid.
But, for the same data, this will cause the wizard to pop up:
imap,reform(im,np*np),reform(lon2,np*np),reform(lat2,np*np), grid_units=2,map_projection='orthographic'
Which apparently means that the itools do not try to guess the
connectivity of the the points and test for regularity, they treat any
1D array as irregularly sampled.
And, consistent with the second case above, if I put some noise into
the coordinates, they notice that the data is no longer regular, and
then bring the wizard:
lon2_i=lon2+randomu(seed,np*np)
imap,im,lon2_i,lat2,grid_units=2,map_projection='orthographi c'
But I do not know if they test for exact regularity, or if there is
some threshold.
|