Re: building new color tables from ascii text?
Posted: Wed Apr 21, 2021 7:31 pm
Hi Joleen,
There are no updates to report with inquiry 2385. I spent some time experimenting in the Jython Shell and discovered how you can apply min/max values after importing an enhancement. Here's how that works:
From the Jython Shell, you can run:
This will print out the different commands you can run on the "enh" data object. Note that there is a function called "setBreakpoints", but I haven't been able to get it to work successfully yet. I tried running it as:
While this doesn't error and the lister function returns a list of breakpoints:
if I go to the Color Table Editor and open the enhancement I can see the min/max (0 / 14) values set earlier, but no breakpoints are drawn in the enhancement.
Hopefully this is enough information to help you going forwards, but please let me know if you have any other problems/questions.
Thanks,
Bob
There are no updates to report with inquiry 2385. I spent some time experimenting in the Jython Shell and discovered how you can apply min/max values after importing an enhancement. Here's how that works:
Code: Select all
a = importEnhancement('C:/Users/rcarp/joleen_enhancements/clavrx_cloud_type.cmap', 'NAME4', 'CATEGORY')
enh = a.getJavaInstance()
enh.setRange(ucar.unidata.util.Range(0, 14))
Code: Select all
print(see(enh))
Code: Select all
enh.setBreakpoints(java.util.ArrayList([1.0,2.0,3.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0]))
Code: Select all
print(enh.getBreakpoints())
> [1.0, 2.0, 3.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0]
Hopefully this is enough information to help you going forwards, but please let me know if you have any other problems/questions.
Thanks,
Bob