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

[IDV #IKY-667858]: IDV - web started version still barks at mcidas



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_08; java.home:C:\\Program Files\\Java\\jre1.5.0_08; 
> >> j3d.version:1.3.2 fcs (build12); j3d.vendor:Sun Microsystems, Inc.; 
> >> j3d.renderer:OpenGL;
> >> Inquiry: Hi
> >>
> >> After not having used web start for while I tried it again. There still is 
> >> the issue with
> >> using my RGB formulas, in that module mcidas is not found:
> >>
> >> Traceback (innermost last):
> >> File "<string>", line 1, in ?
> >> File "<string>", line 34, in NCMP_RGB
> >> ImportError: No module named mcidas
> >>
> >> It would be nice to have this problem cured.
> >
> > Could you send along your default.py file from the ~/.metapps/DefaultIdv
> > so I can see what is defined there?  I seem to have lost the copy
> > you sent previously.
> >
> >> BTW Meteosat-8 decided to go into safe mode last Saturday. Therefore the 
> >> ADDE
> >> server gets currently not updated with new data.
> >
> > Thanks for the update.
> >
> > Don
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: IKY-667858
> > Department: Support IDV
> > Priority: Normal
> > Status: Open

Try adding the following:

sys.add_package('visad.data.mcidas');

after the sys.add_extdir(".")

> from visad.python.JPythonMethods import *
> #This is the default editable user's jython library
> 
> from visad import *
> from visad.python.JPythonMethods import *
> import sys
> sys.add_extdir(".")
> 
> 
> def NCOL_RGB(ch01,ch02,ch03):
> 
> img1 = 255*max_data(min_data((ch03)/1023.,1.),0.)
> img2 = 255*max_data(min_data((ch02)/1023.,1.),0.)
> img3 = 255*max_data(min_data((ch01)/1023.,1.),0.)
> 
> return combineRGB(img1,img2,img3)
> 
> 
> def AIRM_RGB(ch05,ch06,ch08,ch09):
> 
> #R:   05-06           -25K..0K
> #G:   08-09           -40K..5K
> #B    05 inverted     208K..243K
> 
> img1 = 255.*max_data(min_data((ch05-ch06+25.)/25.,1.),0.)
> img2 = 255.*max_data(min_data((ch08-ch09+40.)/45.,1.),0.)
> img3 = 255.*(1.-max_data(min_data((ch05-208.)/35.,1.),0.))
> 
> return combineRGB(img1,img2,img3)
> 
> 
> def NCMP_RGB(ch04,ch09,ch10):
> 
> from visad.data.mcidas import AreaAdapter
> 
> img1 = 255.*max_data(min_data((ch10-ch09+4.)/6.,1.),0.)
> img2 = 255.*max_data(min_data((ch09-ch04)/10.,1.),0.)
> img3 = 255.*max_data(min_data((ch09-243.)/50.,1.),0.)
> 
> return combineRGB(img1,img2,img3)
> 
> 
> def DUST_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)
> 
> 
> def FireHRV_RGB(ch04,ch12):
> 
> imgv = 255.*max_data(min_data((ch12-60.)/60.,1.),0.)
> imgf = 255.*max_data(min_data((ch04-280.)/743.,1.),0.)
> 
> return combineRGB(imgf,imgv,imgv)
> 
> 
> def AAIRM_RGB():
> # with in-line channel selection
> 
> from visad.data.mcidas import AreaAdapter
> 
> s="adde://193.17.10.4/imagedata?compress=gzip&port=112&debug=false&version=1&user=HPR&proj=4455&group=EUM_AD&POS=-1&descr=M8&UNIT=TEMP&SPAC=4&BAND=%i&LATLON=46.0
>  0.0&PLACE=CENTER&SIZE=600 800&MAG=1 1"
> 
> img = [AreaAdapter(s%band).getData() for band in [5,6,8,9]]
> 
> img1 = 255.*max_data(min_data((img[0]-img[1]+25.)/25.,1.),0.)
> img2 = 255.*max_data(min_data((img[2]-img[3]+40.)/45.,1.),0.)
> img3 = 255.*(1.-max_data(min_data((img[0]-208.)/35.,1.),0.))
> 
> return combineRGB(img1,img2,img3)
> 


Ticket Details
===================
Ticket ID: IKY-667858
Department: Support IDV
Priority: Normal
Status: Open