This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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