Skip to content

Wiregrid: fix det angle error - #1762

Open
ykyohei wants to merge 3 commits into
masterfrom
wg_det_angle_error
Open

ykyohei wants to merge 3 commits into
masterfrom
wg_det_angle_error

Conversation

@ykyohei

@ykyohei ykyohei commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

The error of det_angle (γ in following equation) was actually wrong, the dimension is wrong.
All the det_angle are almost uniformly biased so the impact on circular averaged det_angle should be small but I think it's good to fix it. Also we can consider adding error of θ_wire if it depends on step, but it's not added in this PR.

Derivation:
γ = φ / 2 - θ_wire, where φ = arctan(dU/dQ), dU = U - cy and dU = Q - cx

With r = sqrt(dQ2 + dU2), ∂φ/∂dU = dQ/r^2, ∂φ/∂dQ = -dU/r^2

Var(dQ) = Var(Q) + Var(cy), Var(dU) = Var(U) + Var(cx), Cov(dQ, dU) = 0

Assuming uniform error, Var(Q) = Var(U), Var(cy) = Var(cx)
Var(φ) = [dQ^2 Var(dU) + dU^2 Var(dQ)]/r^4 = [ (Var(Q) + Var(U) + Var(cx) + Var(cy))/2 ] / r^2

σ(γ) = sqrt(Var(φ)) / 2 = sqrt([ (Var(Q) + Var(U) + Var(cx) + Var(cy))/2 ]) / 2r

@satoru99

satoru99 commented Oct 6, 2026

Copy link
Copy Markdown
Member

I agree that the original script was wrong and the following modification is correct.
50727a1

The calculation of error of each component should be also fixed to consider suppression by sqrt of (effective) sample number.

step_Q.append(np.average(tod.demodQ, axis=1, weights=instep))
step_U.append(np.average(tod.demodU, axis=1, weights=instep))
step_Qerr.append(np.std(tod.demodQ[:, instep == True], axis=1))
step_Uerr.append(np.std(tod.demodU[:, instep == True], axis=1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants