comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Satellite remapping with map_patch
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Satellite remapping with map_patch [message #49107] Sat, 24 June 2006 22:03
Leon.Majewski is currently offline  Leon.Majewski
Messages: 2
Registered: June 2006
Junior Member
Hi
I've got a lot of satellite data (3000 MODIS passes) that I want to
remap to a standard lat/lon grid. It's easy enough to do this with
map_patch after setting the appropriate map projection with map_set:

map_set, 0, mean(area[[1,3]]), 0, /noerase,/noborder,/cylindrical,
limit=area
mapped = map_patch(product,lons, lats, xsize=xsz, ysize=ysz,
xstart=xst, ystart=yst, missing=-999)

The disadvantages are a) generation of interpolated values b) I need to
remap multiple (~15) products for each overpass (ie same transformation
is calulated muliple times).

I'd like to generate an array of indices that are remapped and then use
these to subscript the original data (basically generate the transform
once, apply many times):

index = lonarr(xdim, ydim) ; same size as the input array
transindex = map_patch(index,lons, lats, xsize=xsz, ysize=ysz,
xstart=xst, ystart=yst, missing=-999)
mapped0 = product0[transindex]
mapped1 = product1[transindex]

This doesn't work.
Often there are points in the transindex that missing (-999) - ie the
idl subsrcipt is invalid, but this doesn't matter. A simplified example
that does work (the way I think the above should, including ~missing
points) is:

data = congrid(dist(256), dims[0], dims[1])
index=lindgen(dims[0], dims[1])
index2 = long(rot(congrid(index, xsize, ysize),20)) ;shink and spin to
fake a transform
bp = where(index2 gt 300000L AND index2 lt 400000L)
index2[bp] = -999 ;add some ~missing values
tv, data[index2] ;rescaled, spun array

So, what's the difference between transindex (map_patch) and
rot/congrid of the index arrays? Have I missed something?

Cheers,
Leon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL use to analyse MRI data
Next Topic: what IDL version should be installed on a 64-bit redhat linux, SGI (MIPS) machine ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 17:26:25 PDT 2025

Total time taken to generate the page: 0.89236 seconds