change contour interval

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
CNETO
Posts: 7
Joined: Wed Jun 04, 2014 4:48 pm

change contour interval

Post by CNETO »

When i display BTD( WV-IR ) data as 'Color-Filled Contour Plan View', the default contour interval is 2, i tryed to change the interval = 1, like this:

Code: Select all

dataLayer = panel.createLayer('Color-Filled Contour Plan View', BTD_positive)
dataLayer.setContourInfoParams('interval=1;min=0;max=20;base=0')


I didn't get any error message, but nothing happened. So, I tried to apply the configuration change like this:

Code: Select all

dataLayer.applyPreferences()


or

Code: Select all

dataLayer.applyContourInfo()


I have to be missing something. how can i effectively change the contour interval of a Color-Filled Contour Plan View display?
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: change contour interval

Post by bobc »

Hello -

I tried various iterations of setContourInfoParams and applyContourInfo as well without success, so it doesn't seem like setting a contour interval through scripting is possible at the moment. I wrote up an inquiry to cover adding the ability to set contour properties via scripting.

http://mcidas.ssec.wisc.edu/inquiry-v/i ... quiry=1752

Sorry that I don't have any better news at the moment. We are, however, actively working on adding more functionality to scripting to match what you can do through the User Interface.

Thanks -
Bob Carp
McIDAS Help Desk
User avatar
CNETO
Posts: 7
Joined: Wed Jun 04, 2014 4:48 pm

Re: change contour interval

Post by CNETO »

Thank you for your effort Bob. I appreciate.
I would like to ask you another question:
I'm working with a netcdf file, opening it and displaying it using script. They are 15 files, named TXS_PPI_N4_1.nc, TXS_PPI_N4_2.nc, TXS_PPI_N4_3.nc....... TXS_PPI_N4_15.nc. This files contain differente times for the same variable (log_reflectivity_filtered_h).

Is there a way that i can use

Code: Select all

makeTimeSequence()
to join the files and display them as a time sequence image?
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: change contour interval

Post by tomw »

Two possibilities come to mind:You can explore "aggregation" of the netcdf files:
http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/Aggregation.html

Check out "Exercise 4"... you can create an NCML file (a kind of XML file) that tells the netcdf library to logically join the files in a directory.

Otherwise, you can also just try to select all the files in the Files Chooser, you can try selecting the desired netcdf files in the directory (using CTRL+click for individual files, or SHIFT+click for a range). See the User Guide section on "Displaying Local Files" for details.

Also, if more discussion of this is needed, please create a new topic so it doesn't get lost...
Post Reply