I have a model with a circular parameter and I would like Stan to sample all the modes, however for some reason Stan only samples around one mode. I would like to understand if this is by design or not. Referring to the code below, I know that there are modes at d={1,2.5,4,5.5} since I define the range of d to [0,6], however Stan only samples around d=2.5. Is there any way to circumvent this?

`data { vector[3] I; real<lower=0> sigma; // sigma = 14 } transformed data { int N = 3; real phi[3] = {0.0, 2.0*pi()/N, 4.0*pi()/N}; real f = 100e6; // [Hz] real c = 299792458.0; // [m/sec] } parameters { real<lower=0> A; real<lower=0,upper=6.0> d; } model { I[1] ~ normal(A * cos(4*pi()*f / c * d + phi[1]), sigma); I[2] ~ normal(A * cos(4*pi()*f / c * d + phi[2]), sigma); I[3] ~ normal(A * cos(4*pi()*f / c * d + phi[3]), sigma); }`

Thanks,

-Arrigo