>Anybody know of a way to force the invalid positions array which is
>obtained by
>Extract to always be given as bytes rather than (which is sometimes the case)
>integer ?
David and Marcus provided the solution to your problem but not the answer
to the above question (which may be moot now that you have the solution).
The solution below does not want the Extracted array, however, but the
Field you got it from.
Given a Field with an "invalid positions" component which is "ref
positions" (i.e., the short form that lists explicit position indices), you
can make this a "dep positions" component (long form: one byte, 00, or 01,
for each position) by running the Field ref_ip_F into:
mF = Mark(ref_ip_F, "positions");
inv_F = Compute(invalid($0), mF); //reminder that $0 is the data of the first
//input, mF
then EITHER:
dep_ip_F = Replace(inv_F, ref_ip_F, "data", "invalid positions");
OR:
dep_mrk_F = Rename(inv_F, "data", "invalid positions");
dep_ip_F = Options(dep_mrk_F, "marked component", NULL);
First technique bypasses, second clears the Mark in case you need to Mark
something else downstream.
I needed this recently because I was Exporting position dep data to "array"
format from a preprocessing net for reimporting with ImportSpreadsheet in
another net. "ref positions" invalids were not exported since Export only
outputs "dep positions" arrays. My data files were derived through other
operations that resulted occasionally in "ref positions" invalids so not
all exported data had the same number of columns which created havoc later
as you can imagine. Now all time steps are run through the above just
before Export and thus are "normalized" to "dep positions" in all cases.
Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]