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

Home » Public Forums » archive » stacking the images according to julian date
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: stacking the images according to julian date [message #85595 is a reply to message #85594] Tue, 20 August 2013 13:27 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ansul writes:

> I am a newbie in IDL and thought I might get some information here.
>
> I need to do a time series analysis with landsat images (almost 500 images). I need to stack the image according to the julian dates. So I have 500 images in a folder which are named lndsr.LT50140331989278XXX01. In this naming format the Julian date starts from the 20th position to 22nd position. And I need to use this information to stack the image.
>
> All your help will be much appreciated.

filenames = File_Search("lndsr.*", COUNT=count)
juldates = DblArr(count)

; Parse the filename for the Julian date.
FOR j=0,count-1 DO BEGIN
thisFile = filenames[j]
year = Fix(StrMid(thisFile, 15, 4))
doy = Fix(StrMid(thisFile, 19, 3))
juldates[j] = JulDay(1, doy, year)
ENDFOR

; Sort the Julian dates.
sorted = Sort(juldates)

; Sort the filenames in the right order for stacking.
filenames = filenames[sorted]

I don't think you REALLY want to stack these images, but now you have
them in the right order, in case you want to process them in the right
order.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Maximum number of keywords?
Next Topic: Non-intuitive result with !Null in Where()

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

Current Time: Sat Oct 11 17:20:46 PDT 2025

Total time taken to generate the page: 0.00187 seconds