It sounds like your results may already be in 16-bit signed integer. If they start as 16-bit signed integer, and the expression doesn't explicitly change that, then they should end up 16-bit signed integer.
It is true that the maximum value of a 16-bit signed integer is 32,768. If your calculation results in values larger than that, then the values will wrap around to end up very negative. It sounds like you don't want that. So you probably want to cast your data into 32-bit long signed integers inside your expression. You can do that using the IDL LONG routine.
So, for example, if this is your expression:
b1*b2
You might want to use:
long(b1)* b2
. . . to put your results into long integers.
I hope that helps.
- Peg
|