Optimal Coded Patterns for Improved SNR in Nuclear Medicine Imaging