You should use the PHP Imagick constants to correctly set the Image Units, as described here:
https://php.qq8518.dpdns.org/manual/en/imagick.constants.php
RESOLUTION constants
imagick::RESOLUTION_UNDEFINED (integer)
imagick::RESOLUTION_PIXELSPERINCH (integer)
imagick::RESOLUTION_PIXELSPERCENTIMETER (integer)