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

Home » Public Forums » archive » Re: Thanks... David, Jeff, and Kuyper! Now that's more like it!!!
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
Re: Thanks... David, Jeff, and Kuyper! Now that's more like it!!! [message #54445] Sat, 16 June 2007 06:03
devin.white is currently offline  devin.white
Messages: 50
Registered: March 2007
Member
You could try using the new MODIS Conversion Toolkit plugin for ENVI:

http://www.ittvis.com/codebank/search.asp?FID=485

It can handle MOD07 data, along with every other know MODIS product
(143 at last count). There is a GUI version and a fully-accessible
API. I tried to make the programmatic interface as easy to use as
possible. If you do try it out, and run into any issues, please let
me know. I'm always looking for ways to improve it.


On Jun 16, 3:43 am, DirtyHarry <kim20...@gmail.com> wrote:
> As you suggested, I went through MODIS website and I upgraded my
> source code... But still 5% not enough, (T.T)
>
> I made a JPG file of 1 band from original image with 20 bands, but the
> shape was not what I wanted... Please check this and give me another
> suggestions.
>
> Harry
> -------------------------------------------------------
> PRO MOD07_getband_Ta
> s_time = systime(1)
>
> out_name_Ta = 'Ta_simple.img'
>
> envi_open_file, out_name_Ta, r_fid=Ta_fid
> envi_file_query, Ta_fid, ns=ns, nl=nl, nb=nb
> dims = [-1, 0, ns-1, 0, nl-1]
> pos_Ta = lindgen(nb)
>
> data = ENVI_GET_DATA(fid=Ta_fid, dims=dims, pos=pos_Ta[19])
> WRITE_jpeg,'Ta20test.jpg',data
>
> close, /all
>
> e_time = systime(1)
> print, 'Elapsed time for this procedure: ', e_time - s_time , '
> seconds!'
>
> END
> -------------------------------------------
Re: Thanks... David, Jeff, and Kuyper! Now that's more like it!!! [message #54446 is a reply to message #54445] Sat, 16 June 2007 05:14 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
DirtyHarry wrote:
> As you suggested, I went through MODIS website and I upgraded my
> source code... But still 5% not enough, (T.T)
>
> I made a JPG file of 1 band from original image with 20 bands, but the
> shape was not what I wanted... Please check this and give me another
> suggestions.

I think that the most important part of your program probably isn't
the part where you select which band to display. What does the code
look like that you used to create the original JPG file?

> -------------------------------------------------------
> PRO MOD07_getband_Ta
> s_time = systime(1)
>
> out_name_Ta = 'Ta_simple.img'
>
> envi_open_file, out_name_Ta, r_fid=Ta_fid
> envi_file_query, Ta_fid, ns=ns, nl=nl, nb=nb
> dims = [-1, 0, ns-1, 0, nl-1]
> pos_Ta = lindgen(nb)
>
> data = ENVI_GET_DATA(fid=Ta_fid, dims=dims, pos=pos_Ta[19])
> WRITE_jpeg,'Ta20test.jpg',data
>
> close, /all
>
> e_time = systime(1)
> print, 'Elapsed time for this procedure: ', e_time - s_time , '
> seconds!'

I'm moderately familiar with the use of the envi GUI, but have no
experience with it's programming interface. However, reviewing the
Envi Help, I couldn't find anything obviously wrong with the code
above.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Thanks... David, Jeff, and Kuyper! Now that's more like it!!!
Next Topic: FSC_color and loadct clashing

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

Current Time: Wed Oct 08 19:21:35 PDT 2025

Total time taken to generate the page: 0.00596 seconds