Made argument a vararg instead of an array
DAWNSCI-5704 move sample thickness calculation

 * also ensure background process gets same flags