point data (declutter from script)

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

point data (declutter from script)

Post by joleenf »

Hi,

I thought I had another forum post somewhere about using declutter from a script, but I cannot find it. I was using point data text files from a script and have a few observations and wishes for improvement.

1.) setDeclutter does not work consistently from a script. In fact, I don't think setting to False (0) actually works at all. I usually have to click the checkbox in the layer controls to turn declutter off.

2.) However, it seems that
pointDataLayer.setLineWidth(2) works and is reflected in the layer controls
pointDataLayer.setShouldUseAltitude(False) works, but is not reflected in the layer controls
pointDataLayer.setVerticalPosition(-0.92) works, and is reflected in the layer controls.

Code: Select all

#Point Data File Load and Display
homedir=expandpath("~")
otDir=os.path.join(homedir,'data','goesr','20140520Storms','ot','single')
otFile='OT_20140521_2131.txt'
fileName=os.path.join(otDir,otFile)
otDataSource = makeDataSource(fileName, 'FILE.POINTTRACKTEXT')
otDataSet = getData(fileName)

pointChoice = otDataSource.findDataChoice("Text Point Data")
temperature = otDataSource.getData(pointChoice,None,None,None)

if temperature is not None:
       layerOT = panel[0].createLayer('Point Data Plot', temperature)

       theStationModelManager=idv.getStationModelManager()         
       stationModelObject=theStationModelManager.getStationModel('OT2')  # Note:  OT is a user created model
       layerOT.setLayoutModel(stationModelObject)
       layerOT.setEnhancement('Aerosol Optical Depth', range=(0,-20))

       layerOT.setLineWidth(2)
       layerOT.setVerticalPosition(-0.92)
       layerOT.setShouldUseAltitude(False)
       layerOT.setDeclutter(0)
       layerOT.setShowInDisplayList(False)


OT_20140521_2131.txt
(660 Bytes) Downloaded 298 times


3.) If one has not been created already, please create an inquiry so that point data files which contain more than one time are placed in the proper time period. This request is a follow on to an email sent to the help desk email with the Subject: files for checking point data display. It seems that a single OT can appear in a 5 minute window range. I have not found a way to make this match the actual satellite time exactly, even using time matching. I have 1 minute satellite data with point data with exact time matches. The only way I could get the data to plot on the correct satellite image and only that satellite image was to split the point data files into single time period files. The fact that a point can appear in 5 consecutive time frames when the time itself is discrete is unexpected behavior from the user standpoint and either they will believe the point data is poor or mistrust the software.

Thanks,
Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: point data (declutter from script)

Post by bobc »

Hi Joleen -

For 1 and 2 below, I verified that setDeclutter doesn't seem to change the actual display or the Layer Controls. You are also correct that modifying other items in the Layer Controls through scripting can change the display, but won't be reflected in the Layer Controls. I've grouped all of these Point Data Plot problems into Inquiry 2138.

In Inquiry 1740, we added the ability to work with decluttering for a Value Plots Display of gridded data. This required writing up a couple of new functions (getDeclutterFilter and setDeclutterFilter). After speaking with a programmer, it appears that something similar will have to be done to get working with the Point Data Plot decluttering as well.

For 3 below, I wrote up Inquiry 2134. I included Kris B's comments (that were sent to the Help Desk) in the Comments section of the inquiry.

Thanks -
Bob Carp
Post Reply