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

[IDV #FCJ-383352]: IDV - complex RGBs - act 2



HP-

> Sorry, should have done first time.

No problem.  I'm unable to reproduce this error.  I'm guessing that
one of the images you tried to get did not get created and was null.
I've changed the code to check for this, but there will still be
problems if the image is null.

By the way, you can now change the formula to be:

def ADJUST_RGB(ch07,ch09,ch10):

 img1 = 255.*max_data(min_data((ch10-ch09+4.)/6.,1.),0.)
 img2 = 255.*(max_data(min_data((ch09-ch07)/15.,1.),0.)**(1./2.5))
 img3 = 255.*max_data(min_data((ch10-261.)/28.,1.),0.)

 return combineRGB(img1,img2,img3)

since combineRGB will now do the name change thanks to your
suggestion.

Don Murray

> java.lang.NullPointerException
> at ucar.unidata.data.grid.GridUtil.fieldMinMax(GridUtil.java:2987)
> at ucar.unidata.data.grid.GridUtil.getMinMax(GridUtil.java:3060)
> at ucar.unidata.data.grid.GridDataInstance.init(GridDataInstance.java:241)
> at
> ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:164)
> at
> ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:144)
> at
> ucar.unidata.idv.control.GridDisplayControl.doMakeDataInstance(GridDisplayControl.java:222)
> at
> ucar.unidata.idv.control.DisplayControlImpl.initializeDataInstance(DisplayControlImpl.java:2599)
> at
> ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:2581)
> at ucar.unidata.idv.control.ImageControl.setData(ImageControl.java:185)
> at ucar.unidata.idv.control.ImageControl.init(ImageControl.java:145)
> at
> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1114)
> at
> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:894)
> at
> ucar.unidata.idv.ControlDescriptor.initControl(ControlDescriptor.java:863)
> at ucar.unidata.idv.ControlDescriptor$1.run(ControlDescriptor.java:793)
> at ucar.unidata.util.Misc$2.run(Misc.java:926)
> 
> 
> Unidata IDV Support wrote:
> > HP-
> >
> >> Institution: EUMETSAT
> >> Package Version: 2.1b1
> >> Operating System: os.name:Windows XP; os.arch:x86; os.version:5.1;
> >> Hardware Information: java.vendor:Sun Microsystems Inc.; 
> >> java.version:1.5.0_06; java.home:C:\\Program Files\\IDV_2.1b1\\jre; 
> >> j3d.version:1.3.2 fcs (build12); j3d.vendor:Sun Microsystems, Inc.; 
> >> j3d.renderer:OpenGL;
> >> Inquiry: Hi
> >>
> >> Now that my favourite RGBs are running well. I would like to go one step 
> >> further and have a second set with more flexible data input by using the 
> >> Data Chooser instead of having date and area selection hard-coded in the 
> >> Jython routines. Simple-minded as I am I have tried to do that as follows:
> >>
> >> def ADUST_RGB(ch07,ch09,ch10):
> >>
> >> from ucar.unidata.data.grid import GridUtil
> >>
> >> img1 = 255.*max_data(min_data((ch10-ch09+4.)/6.,1.),0.)
> >> img2 = 255.*(max_data(min_data((ch09-ch07)/15.,1.),0.)**(1./2.5))
> >> img3 = 255.*max_data(min_data((ch10-261.)/28.,1.),0.)
> >>
> >> img1=GridUtil.setParamType(img1,makeRealType("redimage"), 0)
> >> img2=GridUtil.setParamType(img2,makeRealType("greenimage"), 0)
> >> img3=GridUtil.setParamType(img3,makeRealType("blueimage"), 0)
> >>
> >> return combine((img1,img2,img3))
> >>
> >> This appears to work fine when selecting a single time slot. When 
> >> selecting an image sequence the routine aborts with a  
> >> "java.lang.NullPointerException" before the first image is created. So the 
> >> simple-mindedness breaks down.
> >>
> >> Can you help me here, please!
> >
> > The simple-mindedness is probably in my programming.  Could you send
> > the stack trace with the null pointer exception so I can see where this is
> > happening?
> >
> > Thanks.
> >
> > Don
> >
> > Ticket Details
> > ===================
> > Ticket ID: FCJ-383352
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: FCJ-383352
Department: Support IDV
Priority: Emergency
Status: Open