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

Home » Public Forums » archive » Stretching MODIS data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Stretching MODIS data [message #79144] Tue, 31 January 2012 03:36 Go to previous message
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
Hi everybody,
I'm trying to obtain an RGB image using MODIS data channel 01,02,06
(daytime) and channels 20, 21 and 32 (night time).

My code is working fine except for the stretching result in the sense
that for the images obtained using "daytime channels" are darker than
the ones obtained with the "nighttime channels" and this happens only
for images belonging to winter season.

In the following you can find a piece of the code I'm using

ch01_modis_meteo_fname='ch01'
RESTORE, path+ch01_modis_meteo_fname

ch01_v=ch01[where(ch01 gt 0.0)]
print, 'min(ch01_v)', MIN(ch01_v)
print, 'max(ch01_v)', MAX(ch01_v)
ch01_modis_meteo_fname_ENVI_format_outname='modis_meteo_ch01 '

ENVI_WRITE_ENVI_FILE, ch01, DATA_TYPE=4,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_r_fid


ch01_bs=BYTSCL(ch01, min = MIN(ch01_v), max = MAX(ch01_v))
ch01_modis_meteo_fname_ENVI_format_bs_outname='modis_meteo_c h01_bs'
ENVI_WRITE_ENVI_FILE, ch01_bs, DATA_TYPE=1,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_bs_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_bs_r_fid


ch01_bs2 = BYTSCL(ch01_bs, min = 3, max = 157)

ch01_modis_meteo_fname_ENVI_format_bs2_outname='modis_meteo_ ch01_bs2'
ENVI_WRITE_ENVI_FILE, ch01_bs2, DATA_TYPE=1,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_bs2_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_bs2_r_fid


the same code is used for the other channels except for the value in
the bytscl function
ch02_bs = bytscl(ch02_bs, min = 3, max = 169)
ch06_bs = bytscl(ch06_bs, min = 2, max = 121)


Since at this moment I'm only interested in a visual inspection of my
result, Is there a way to harmonize the different results?

If you need other info please let me know

thanks in advance
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: outputting 2D arrays into a txt file
Next Topic: Re: Finding the intersection of 2 short lines

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

Current Time: Wed Oct 08 15:53:53 PDT 2025

Total time taken to generate the page: 0.00404 seconds