adjusted scaling parameters
create sensible masks for joint flag and index codings