The conventional view of ultrasound pulse-echo data—focused sound sent in a direction and bounced back towards the transducer—does not capture the rich information available. REFoCUS beamforming abandons this limitation, combining the ideas of spatially coded excitation and synthetic aperture imaging. Each transmission is an encoding of elements with various weights and time delays, and the multistatic data set (all transmit/receive element pairs) is estimated from the received data. We can, therefore, apply a single focusing operation across different choices of transmit pulse sequencing and ask questions about how to best optimize that sequence.The multistatic data set is a useful mathematical model since it is tied to individual array elements. Several works have used such raw echo data in optimization problems, for instance training neural networks to improve data quality from limited transmissions. However, we have found that the image formation process (e.g., focusing, beamforming) can change the appearance of errors in the data set. Even small errors in the raw data can result in significant image artifacts due to the inherent ill-conditioning of the beamforming operation. We demonstrate improvements in optimization using loss functions defined in the image domain compared to the raw multistatic data.