def _delta_kt_prime_dirint(kt_prime, use_delta_kt_prime, times):
if use_delta_kt_prime:<EOL><INDENT>kt_next = kt_prime.shift(-<NUM_LIT:1>)<EOL>kt_previous = kt_prime.shift(<NUM_LIT:1>)<EOL>kt_next.iloc[-<NUM_LIT:1>] = kt_previous.iloc[-<NUM_LIT:1>]<EOL>kt_previous.iloc[<NUM_LIT:0>] = kt_next.iloc[<NUM_LIT:0>]<EOL>delta_kt_prime = <NUM_LIT:0.5> * ((kt_prime - kt_next).abs().add(<EOL>(kt_prime - kt_previous).abs(),<EOL>fill_value=<NUM_LIT:0>))<EOL><DEDENT>else:<EOL><INDENT>delta_kt_prime = pd.Series(-<NUM_LIT:1>, index=times)<EOL><DEDENT>return delta_kt_prime<EOL>
Calculate delta_kt_prime (Perez eqn 2 and eqn 3), or return a default value
for use with :py:func:`_dirint_bins`.