def norm(field, vmin=<NUM_LIT:0>, vmax=<NUM_LIT:255>):
field = <NUM_LIT:255>*np.clip(field, <NUM_LIT:0>, <NUM_LIT:1>)<EOL>field = field.astype('<STR_LIT>')<EOL>return field<EOL>
Truncates field to 0,1; then normalizes to a uin8 on [0,255]