Mask Value Function

How do I...?
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Mask Value Function

Post by joleenf »

Hi,

Is there a "!=" option for the comparison operator with the Mask Value Function in the Field Selector?

Thanks,
Joleen
User avatar
jayh
Posts: 424
Joined: Thu Jan 15, 2009 10:34 pm

Re: Mask Value Function

Post by jayh »

Hi Joleen-

Bob and I took a look at this and there isn't a way to do it in the UI. He came up with a way to do it in a script however...

You can currently use "!=" in a script:

addeParms = dict(
server = 'adde.ucar.edu',
dataset = 'RTGOESR',
descriptor = 'CONUS',
band = 13,
size = 'ALL',
unit = 'TEMP',
time = '18:01:17',
)
data = loadADDEImage(**addeParms)
maskData = mask(data, '!=', 296, 1)*data
maskLayer = activeDisplay().createLayer('Image Display', maskData)

This will display the band 13 temperature data wherever the value is not 296K.

Bob will write up an inquiry and make the code change (assuming it's as easy as he thinks it is) and we'll let you know when it's in a nightly.

Thanks, Jay
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: Mask Value Function

Post by bobc »

Hi Joleen,

You can now use "!=" when evaluating the Mask Value formula through the User Interface in today's (05/03/22) 1.9beta1 nightly. In the Select Input window, the bottom option under Comparison is now "!=". I've tested this on macOS and Windows 10 and it seems to be working well. Please let me know if you give this a try and run into any problems.

Thanks for suggesting this enhancement,
Bob
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Mask Value Function

Post by joleenf »

Thanks!
Post Reply