prepare_nmar_scaling function

Prepare scaled matrices and moments