Reducing measurement error in magnetic particle inspection through the optimization of process parameters and artificially intelligent solutions