Position-sensitive avalanche photodiodes (PSAPDs) are gaining widespread acceptance in modern PET scanner designs, and owing to their relative insensitivity to magnetic fields, especially in those that are MRI-compatible. Flood histograms in PET scanners are used to determine the crystal of annihilation photon interaction and hence, for detector characterization and routine quality control. For PET detectors that use PSAPDs, flood histograms show a characteristic pincushion distortion when Anger logic is used for event positioning. A small rotation in the flood histogram is also observed when the detectors are placed in a magnetic field. We first present a general purpose automatic method for spatial distortion correction for flood histograms of PSAPD-based PET detectors when placed both inside and outside a MRI scanner. Analytical formulas derived for this scheme are based on a hybrid approach that combines desirable properties from two existing event positioning schemes. The rotation of the flood histogram due to the magnetic field is determined iteratively and is accounted for in the scheme. We then provide implementation details of a method for crystal identification we have previously proposed and evaluate it for cases when the PET detectors are both outside and in a magnetic field. In this scheme, Fourier analysis is used to generate a lower-order spatial approximation of the distortion-corrected PSAPD flood histogram, which we call the ldquotemplaterdquo. The template is then registered to the flood histogram using a diffeomorphic iterative intensity-based warping scheme. The calculated deformation field is then applied to the segmentation of the template to obtain a segmentation of the flood histogram. A manual correction tool is also developed for exceptional cases. We present a quantitative assessment of the proposed distortion correction scheme and crystal identification method against conventional methods. Our results indicate that our proposed methods l- ead to a large reduction in manual labor and indeed can routinely be used for calibration and characterization studies in MRI-compatible PET scanners based on PSAPDs.