Added energy spectrad density calculation to the data class