[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20051018: IDV extract image time



>From: "Valentijn Venus" <address@hidden>
>Organization: ITC
>Keywords: 200510181803.j9II3J7s011813 jython scripts

Hi Tyn-

>Again, the "ImportError: No module named meteorology" could be easily
>solved by renaming  from visad.meteorology * into from visad.meteorology
>import ImageSequence 

Okay.  Sometimes these imports work for one person, but not for another.

>Per your instructions I have created a formula
>getImageTime(imagesequence, user_Step), which prompts the user to enter
>the time step for the image they want. What is the time step, in hours?

It's just the index. (x of n).

>-----Original Message-----
>From: Valentijn Venus 
>Sent: Tuesday, October 18, 2005 7:45 PM
>To: 'address@hidden'
>Cc: 'address@hidden'
>Subject: RE: IDV extract image time
>
>Hi Don,
>
>When I run the following Jython procedure:
>
>def getImageTime(imagesequence, i):
>   from visad.meteorology import *
>   dateTime = None
>   if isinstance(imagesequence, ImageSequence):
>       sbi = imagesequence.getImage(int(i))
>       dateTime = sbi.getStartTime()
>   elif isinstance(imagesequence, SingleBandedImage):
>       dateTime = sbi.getStartTime()
>   return dateTime
>
>I get this error:
>
>ImportError: No module named meteorology
>
>Any ideas?

Don Murray
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.