An apparatus for measuring heart activity data of a user, the apparatus comprising: at least one sensor comprising an optical heart activity sensor , wherein the optical heart activity sensor comprises a measuring head and a matrix detector , wherein the measuring head is configured to be directed towards a body tissue of the user and to form instantaneous images on the matrix detector from a light propagated through the body tissue of the user, wherein the matrix detector is configured to detect the instantaneous images, and wherein the at least one sensor is further configured to detect spatial shifts of the measuring head in relation to the body tissue of the user; a processing circuitry configured to receive the instantaneous images from the optical heart activity sensor , to determine effect of the spatial shifts in the instantaneous images based on the detected spatial shifts, and to process the instantaneous images into the heart activity data of the user; and a controller configured to enhance the heart activity data by decreasing the effect of the spatial shifts in the instantaneous images, wherein the measuring head comprises at least one light emitting diode configured to transmit light into the body tissue of the user, and an imaging lens arranged to at least partially surround the at least one light emitting diode and encapsulate the at least one light emitting diode against the body tissue of the user and configured to receive the light propagated through the body tissue of the user, wherein the imaging lens is configured to form the instantaneous images on the matrix detector from the received propagated light, wherein the imaging lens is configured to average the received propagated light to the matrix detector , and the imaging lens comprises at least one parabolic reflector configured to direct the received propagated light to the matrix detector . at least one sensor comprising an optical heart activity sensor , wherein the optical heart activity sensor comprises a measuring head and a matrix detector , wherein the measuring head is configured to be directed towards a body tissue of the user and to form instantaneous images on the matrix detector from a light propagated through the body tissue of the user, wherein the matrix detector is configured to detect the instantaneous images, and wherein the at least one sensor is further configured to detect spatial shifts of the measuring head in relation to the body tissue of the user; a processing circuitry configured to receive the instantaneous images from the optical heart activity sensor , to determine effect of the spatial shifts in the instantaneous images based on the detected spatial shifts, and to process the instantaneous images into the heart activity data of the user; and a controller configured to enhance the heart activity data by decreasing the effect of the spatial shifts in the instantaneous images, wherein the measuring head comprises at least one light emitting diode configured to transmit light into the body tissue of the user, and an imaging lens arranged to at least partially surround the at least one light emitting diode and encapsulate the at least one light emitting diode against the body tissue of the user and configured to receive the light propagated through the body tissue of the user, wherein the imaging lens is configured to form the instantaneous images on the matrix detector from the received propagated light, wherein the imaging lens is configured to average the received propagated light to the matrix detector , and the imaging lens comprises at least one parabolic reflector configured to direct the received propagated light to the matrix detector . <EOS>