You can do that, or you can use .dist and wrap the scan in pm.CustomDist. See here.
.dist
pm.CustomDist