On Jul 23, 7:55am, Chris Pelkie wrote:
> Subject: Re: [opendx-users] problems with invalid positions
> >Dear All,
> >I've got a rather strange problem with invalid positions, in that they
> >still get displayed. My network is as follows:
> >I have a field, IH, with invalid positions (this is displayed properly). I
> >then use replace on a second field (T) to add an invalid positions
> >component. I then use drape to display T. The strange thing is that the
> >entire field is displayed, when I select the invalid position component. I
> >get the right mask. I am rather puzzled. I've attached a log file of the
> >two fields.
> >Cheers
> >magi
> >
>
>
> I've seen weirdness in this op before also.
Me too. If you tinker with invalid positions, you may find like I did that they
are one of the great mysteries of DX (at least at first).
>Do an experiment and Remove('invalid positions') from IH before Replace and
see >if that helps. I presume you're using the byte form of invalids (byte
values
> of 00 and 01) rather than the indexed (ref) form.
If you're using Include then you have no control over the data type of the
invalids (it depends on the data and which way dx decides to store them, for
memory optimization). This then makes the tinkering more difficult. And
problems don't always show up right away -- sometimes only for certain cases.
I'm assuming you don't want to just Replace the data comp. of IH with T to
maintain it's positional structure (and some possible unwanted stuff), so
here's a tip that Chris Pelkie gave me a while back that solved my messy
problem with invalid positions. It might be slightly easier than Extracting and
adding Options, and then you're already set up if you want to do more
tinkering, like a "bitwise-and" or "or". Send the sourcefield of Replace
through Compute "byte(invalid(a)). The Replace now will be srcname "data",
dstname "invalid positions".
Just curious, what do you mean that the entire field is displayed (I'm guessing
here you're referring to no data is blocked out as invalid) "when I select the
invalid positions component ?"
> Depending on how you created the invalid positions array, you may
> need to add an Options("dep", "positions") call to provide the
> explicit and required dependency to your array, before Replace. (This
> only works correctly if you have the bare array in hand, otherwise,
> that attribute will be uselessly appended to the field containing the
> array. You get the bare array with Extract of course.)
>
> [You don't sound like you have any expectation that Replace will
> somehow do a 'bitwise-and' operation, which of course it won't, but
> you could do that in Compute if ever needed.]
>
> Chris Pelkie
> Vice President/Scientific Visualization Producer
> Conceptual Reality Presentations, Inc.
> 30 West Meadow Drive
> Ithaca, NY 14850
> [EMAIL PROTECTED]
>-- End of excerpt from Chris Pelkie