Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standard handling for half-polarized beam #148

Open
bmaranville opened this issue Mar 14, 2022 · 11 comments
Open

Add standard handling for half-polarized beam #148

bmaranville opened this issue Mar 14, 2022 · 11 comments

Comments

@bmaranville
Copy link
Member

On CANDOR we will be measuring without an analyzer for a while. Many files will have polarization = + or - instead of ++ and --

load4 does not work for these files (throws an exception) because it is expecting only pairs from the full 4 cross-sections.

We should work out what the standard handling for half-polarized files will be (up-convert to ++ and --?), instead of forcing users to manually edit .refl files to change the polarization in the header.

@bmaranville
Copy link
Member Author

Apparently the folks at ISIS are also frequently loading + as ++ and - as --

@bmaranville
Copy link
Member Author

Kirby pointed out that sometimes you'll want to do something more subtle, like an incoherent sum of SF and NSF, assuming that the SF channel is being measured correctly for that geometry (that Zeeman splitting < resolution).
In that case maybe users just wouldn't use load4 for that model? Then load4 could still do something 90+% of users want, which seems to be converting + to ++.

@pkienzle
Copy link
Member

There are two SF channels. Which one is added will depend on whether the spin selector is before or after the sample. Maybe a mnemonic such as ?+ or +? to distinguish.

@bmaranville
Copy link
Member Author

But what would we do in load4 and PolarizedNeutronProbe with the ?+ and +? after that? There is only a defined workflow for ++ and --

@pkienzle
Copy link
Member

Sure, we can do the same until we refactor the handling of polarized beam, which we need to do at some point.

I'm suggesting that reduction should record whether the half-polarized beam is front or back polarized for those samples which exhibit splitting in the spin flip channel and those programs that can handle it.

@bmaranville
Copy link
Member Author

Leaving aside for the moment whether we should include more information from the reduction (I agree, this is a good idea), what should refl1d do with half-polarized data? That is the essence of the ticket. I think most people will want to treat it as ++ and --

@pkienzle
Copy link
Member

This is the easier approach. I suspect most people want to treat it as ++ and -- because they believe they have no spin flip. I would prefer correct behavior by default, which would be to add in the appropriate spin flip channel. If the model has no SF then this harmless since it gives the same result, but it seamlessly handles Kirby's case as well. This is more work.

I suggest treating it as ++ and -- for now but do the full calculation when we refactor the polarized neutron data structure.

Note that sasview lets you fit the measurement without polarization correction by having mixing terms as part of the model. I don't think we want to go there.

@bmaranville
Copy link
Member Author

bmaranville commented Mar 15, 2022

There is an issue with adding in the SF channels - they don't line up on the NSF channels when the field is non-zero (Zeeman splitting). In this sense SANS has an easier time of it because they can mix spin channels all over the detector (nothing gets lost when it shifts in angle)

@pkienzle
Copy link
Member

I don't understand. If the Zeeman effect is captured in the model then it can be mixed before comparing with the data. If it is not captured in the model then it needs to be a correction in the reduction and I don't see it there.

@bmaranville
Copy link
Member Author

The Zeeman effect makes SF scatter at a different angle, so it might not make it into the detector if the shift is big enough compared to the acceptance.

@bmaranville
Copy link
Member Author

bmaranville commented Jan 11, 2024

If we make the assumption that all the scattering is captured in half-polarized mode, it should be possible to polarization-correct the measured I+ and I-, extracting the sums $S^+ \equiv \Sigma^{++} + \Sigma^{+-}$, $S^- \equiv \Sigma^{-+} + \Sigma^{--}$ (using the notation of Wildes, where we typically use $R^{++} ...$ instead of $\Sigma^{++}...$ to describe the reflectivity cross-sections)

Here is the result:
$$J^+ \equiv I^{++} + I^{+-}$$
$$J^- \equiv I^{-+} + I^{--}$$
$$J^+ = p S^+ + (1 - p) S^-$$
$$J^- = (f_p - p) S^+ + (f_p + p - 1) S^-$$
Putting that into matrix form and inverting, I get that the corrected $S^, S^-$ (which we can model exactly as an incoherent sum!) are
$$S^+ = \frac{1}{f_p (2p - 1)} \left[(f_p + p - 1)J^+ + (p - 1) J^-\right]$$
$$S^- = \frac{1}{f_p (2p - 1)} \left[(p - f_p) J^+ + p J^-\right]$$

this was calculated by taking inverses of the matrices defined in Eq. 4a from Wildes, setting $f_a = a = 1$ and calculating
$$I = [F_p^{-1}] [P^{-1}] [F_a^{-1}] [A^{-1}] \Sigma$$ noting that $F_a^{-1} = A^{-1} = Identity$ for $f_a = a = 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

No branches or pull requests

2 participants