Text this: Model-based optical and acoustical compensation for photoacoustic tomography of heterogeneous mediums