calculate_sdr function

Calculate SDR