NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Charlie > > My question now is what is the function in Jython/Visad > to access an image? Is it the same finction for the grid - > i.e. > > fieldimpl.getSample(N) > > or something else. > > I want to write a Jython routine to take the > radar image, convert it to dBz and then calculate > the rainfall rate with a Marshall-Palmer type > distribution. Here is a little progress, using the new IDV which gets dbz values. 1. Create a Jython method using getSample as you suggested def getSingleImage(fieldimpl, N) : """ get a single field from a fieldimpl time series; time index is N """ from visad.FieldImpl import * ff = fieldimpl.getSample(N) return ff Write a formula that uses it, such as 4 * getSingleImage(fieldimpl, 0) to get 4 times the first time step field values select display type Color-shaded Plan View (not Image Display, which doesn't work with a field impl) click on "Create display" select parameter Image Sequence It will plot, with the max value now 4 times the max dbz retrieved from the radar data, arond 220 in the data I used from Illinois now. 2. much simpler, and gives same results first create a simple formula 4*A, four times anything select display type Color-Shaded Plan View click on "Create display" open up the parameter list "Image Sequence" and click on the one time you want such as 2003-04-29 19:19:00 this will make the same display as the first way. In both cases the color table supplied with the display had a good max value near 220 and a poor min value near -3998. I have no idea where that huge min value comes froml the data looks ok. Open the color table editor by clicking on the display's color bar in the legend line. Use the left entry box next to "Range:" and reset that value, from -3998.0 or whatever, to 0 and click the bottom Ok button. Both these use the dbz values from the new IDV. There is no way to get dbz from IDV beta 5, though you could write part of a formula to change the 0 - 255 values into something closer to dbz, say divide by 5, to test your system until the beta 6 is available. Cheers Stu **************************************************************************** Unidata User Support UCAR Unidata Program 303 497 8643 P.O. Box 3000 address@hidden Boulder, CO 80307 ---------------------------------------------------------------------------- Unidata WWW Service http://my.unidata.ucar.edu/content/support ****************************************************************************