function [a_inf,s_inf,tau_a,tau_s]=f_HH_ASIC(pH)

% Returns gating parameters of the ASIC model as a function of pH

% Input: pH

% Outputs:
% a_inf, s_inf: steady-state values of the gating variables a and s
% tau_a, tau_s: time constants of the gating variables a and s
% according to Table 1 in Alijevic et al. Front. Cell. Neurosci. 14:41 doi: 10.3389/fncel.2020.00041 

steepness_factor=1.48; % make steady-state activation curve steeper by this factor
shift=0; % pH shift of the desensitization curve, set to 0

a1 =      0.3487;
a2 =       234.3;
b1 =       10.14;
b2 =      -5.553;
c1 =       6.392;
c2 =       8.595;
tfast=a1/(1+exp(b1*(pH-c1))) + a2/(1+exp(b2*(pH-c2)));
tau_a=1/tfast;

a1 =    0.002531;
a2 =   0.0008942;
b1 =       13.94;
b2 =      -18.39;
c1 =       6.769;
c2 =       7.436;
tslow=a1/(1+exp(b1*(pH-c1))) + a2/(1+exp(b2*(pH-c2)));
tau_s=1/tslow;

a =       23.67;
b =       2.797;
a_inf=1/(  1 +   a * (a^(steepness_factor-1)) * 10^(steepness_factor*b*(pH-7)) );

a =       11.18;
b =      -9.448;
s_inf=1/(1+a*10^(b*(pH-shift-7)));

end