function bin_ubyte(name, array)

%% clipped from os/load_raw and bb/load_avg

global fid_bin fid_cmd
offset = ftell(fid_bin);
fwrite(fid_bin, array, 'uint8');
fprintf(fid_cmd, 'binary_data: %s UBYTE %d %d\n', ...
                 name, length(array(:)), offset);

