[gradsusr] maskout problems with positive and negative numbers.

Mikovitz, Colleen (LARC-E302)[SCIENCE SYSTEMS AND APPLICATIONS, INC] j.c.mikovitz at nasa.gov
Thu Oct 29 07:43:29 EDT 2015


You can make a negative version of your variable and do a similar process.  With a field I have on, limiting values between 200 and 300:

'negto200=const(maskout(toaup,toaup-200),200,-u)'
'revnegto200=-negto200'
'keep=revnegto200+300'
'backtogood=-1*(maskout(keep,keep)-300)'
'final=const(backtogood,300,-u)'
'd final’


On Oct 28, 2015, at 10:27 PM, Christopher Gilroy <chris.gilroy at gmail.com> wrote:

> Alright, so I'm unsure if maskout is really the option I need for both of these, but is there anyway to take any value less than 1 (even negatives) and replace them with 10? I seem to be able to do that with: 
> 
> 'define negto10= skip(const(maskout(zcomp,zcomp-0), 10, -u), 8, 8)'
> 
> That gives me all positive numbers, great so far. Now, I'd like to also change the results of negto10 and turn all numbers larger than 41 to 40. I can't seem to figure that part out. I've tried all sorts of variants of:
> 
> 'define mor4140 = skip(const(maskout(negto10,negto10+41), 40, -u), 8, 8)'
> 
> all with no luck. Any thoughts?
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr




More information about the gradsusr mailing list