[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[IDV #UYF-238741]: returning an image in Jython Methods
- Subject: [IDV #UYF-238741]: returning an image in Jython Methods
- Date: Thu, 16 Apr 2009 15:30:48 -0600
Hi Caitlin-
> I have AREAS file from the NCDC of imager channels 1, 2, and 4. They are in
> scaled radiance (16-bit) and I need to convert this to brightness
> temperature. It was suggested that I run a formula just to do the conversion
> and spit out new images. What formula would i need to define and what do I
> put in the return line?
>
> From scratch I've came up with:
> def createDisplay(displayType, data, dataName)
> #Convert scaled radiance to radiance: Sounder Channel 8
> b = (a[0]-251.6826)/(314.6032)
> #Convert radiance to brightness temperature
> c=((1.438833)*(910.48937))/(log(1+(((.00001191066)*((910.48937)**3))/(b))))
> #Return a useful image
> return c
>
> I don't think this will work. The equations are all right, but the def
> [formula] and return lines are not.
Change the def to:
def scaleImage(a):
The rest looks okay (but let me know if it isn't).
Then make a formula (or call it from the Miscellaneous->Define formula Formula)
and when prompted for a, select your image.
> I'm sorry this is a very basic question, but I am just learning IDV and
> Python.
No problem.
Don Murray
Ticket Details
===================
Ticket ID: UYF-238741
Department: Support IDV
Priority: Normal
Status: Open