1. A method of thermoacoustic imaging of an object, the method comprising: pre-calculating, with a processor, a forward model matrix M that represents a relation between (i) absorption of electromagnetic energy within the object and (ii) pressure signals generated in response to said absorption of electromagnetic energy within the object, the forward model matrix M satisfying a forward model matrix equation expressed as p=Mh, wherein h is a vector having a plurality of elements h i that correspond to respective amounts h(x i ) of electromagnetic energy absorbed at respective grid coordinates x i within the object and p is a vector having a plurality of elements p j corresponding to respective pressures p(x j , t j ) at respective coordinates x j at respective times t j ; irradiating, with an electromagnetic enemy source, the object with a quantity of electromagnetic energy; detecting, with at least one acoustic detection element, pressure signals generated in response to said absorption of the quantity of electromagnetic energy within the object; generating a data vector that contains the detected pressure signals; reconstructing an energy deposition image of the object by inverting the forward model matrix equation p=Mh to recover the vector h by either of: calculating, with said processor, a pseudo-inverse of the forward model matrix M and multiplying the pseudo-inverse of the forward model matrix M with the data vector; or using the data vector as the vector p in the forward model matrix equation p=Mh and performing, with said processor, a least square error minimization of the forward model matrix equation p=Mh; and outputting via an interface of said processor the energy deposition image to a control device that is configured to perform further data handling of the energy deposition image, said further data handling comprising displaying the energy deposition image.