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

Home » Public Forums » archive » loop for 365 days with 18 days interval
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: loop for 365 days with 18 days interval [message #63843 is a reply to message #63793] Thu, 20 November 2008 10:16 Go to previous message
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
On Nov 20, 11:11 am, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Nov 19, 10:33 pm, Jeremy Bailin <astroco...@gmail.com> wrote:
>
>
>
>
>
>> On Nov 19, 10:50 pm, Elkunn <Wasit.Weat...@gmail.com> wrote:
>
>>> On Nov 19, 9:49 pm, Elkunn <Wasit.Weat...@gmail.com> wrote:
>
>>>> Hello,
>>>> I want to loop for 16 days as a group through the whole year. In other
>>>> words, my first loop should stop when the number of the days reaches
>>>> 16, do processing, then count from 17th day to the day when the number
>>>> of days reaches 16, then do the processing again.
>>>> How can loop for this, each time read 16 images?
>
>>>> Thanks
>
>>>> Elkunn
>
>>> sorry, should be 16 days. not 18.
>
>> I suppose it depends what you mean by "do processing". If it needs to
>> be in a for loop, then something like this should work:
>
>> for i=0l,364 do begin
>>   ... do whatever is required to read in image i ...
>>   if i mod 16 ne 0 then continue
>>   ... do processing on image i ...
>> endfor
>
> For the FOR loop type problems, how about:
>
>   for i = 0, 364, 16 do begin
>     ; read images i to i + 15
>     ; do processing on images i to i + 15
>   endfor
>
>> But it could be that you can be much more clever... hard to say
>> without more details. Do you need to store the intermediate images?
>> Can you read in everything and then do vector processing afterwards?
>
> Yes, vector processing is a generally better solution if you can do
> it, but looping 365 / 16 = 23 times (or 365 times) is not worth
> worrying about. It is more important to try to get the processing you
> do for each image to be vectorized.
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Associate Research Scientist- Hide quoted text -
>
> - Show quoted text -

I nead to read 16 images each time (one image one day), make a
composite, save it into disk, then read next 16 images, do the same
processings, save out to disk until all of the image is done in a year
cycle.

Thanks
[Message index]
 
Read Message
Read Message
Previous Topic: how can i get an [n,1] array without reform?
Next Topic: Can I use array elements of a pointer like a regular array?

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

Current Time: Sat Oct 11 01:33:19 PDT 2025

Total time taken to generate the page: 0.08190 seconds