Skip to content

Supermirror, flipper matrices, and workflow with configurable polarizer/analyzer #60

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

Merged
merged 16 commits into from
Jun 20, 2024

Conversation

SimonHeybrock
Copy link
Member

@SimonHeybrock SimonHeybrock commented Jun 11, 2024

This adds:

  • Flipper matrices (seems to be working, according to tests).
  • Supermirror skeleton. The actual efficiency function is not implemented.
  • PolarizationAnalysisWorkflow, which composes workflows for the polarization and analyzer (each can be He3 or supermirror) into a single workflow.

Fixes #59.

@SimonHeybrock SimonHeybrock requested a review from astellhorn June 11, 2024 05:54
@SimonHeybrock SimonHeybrock changed the title Supermirror and flipper matrices Supermirro, flipper matrices, and workflow with configurable polarizer/analyzer Jun 11, 2024
@SimonHeybrock SimonHeybrock changed the title Supermirro, flipper matrices, and workflow with configurable polarizer/analyzer Supermirror, flipper matrices, and workflow with configurable polarizer/analyzer Jun 11, 2024
Base automatically changed from he3-correction to main June 12, 2024 14:04
@jokasimr
Copy link
Contributor

jokasimr commented Jun 17, 2024

It's hard to review this without a description of the procedure. I did not find anything out flippers in the polarization analysis methodology page. What source did you use to implement this @SimonHeybrock?

@SimonHeybrock
Copy link
Member Author

It's hard to review this without a description of the procedure. I did not find anything out flippers in the polarization analysis methodology page. What source did you use to implement this @SimonHeybrock?

@astellhorn was adding information in #56, but I think a file was missing and the PR needs updating. Otherwise, have a look at the attachments in #2 (comment) (probably not most recent version).

@astellhorn
Copy link
Collaborator

It's hard to review this without a description of the procedure. I did not find anything out flippers in the polarization analysis methodology page. What source did you use to implement this @SimonHeybrock?

@astellhorn was adding information in #56, but I think a file was missing and the PR needs updating. Otherwise, have a look at the attachments in #2 (comment) (probably not most recent version).

Yes, I forgot to add the new methodology file into the branch, and will update it (best today, but I am on a conference since sunday up to tomorrow, but will have some time today lunch break).

@astellhorn
Copy link
Collaborator

astellhorn commented Jun 18, 2024

now it is under esspolarization/docs

/user-guide/

--> see file General-sans-polarization-analysis-methodology.ipynb
--> there will probably be some small changes needed again

Copy link
Contributor

@jokasimr jokasimr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me! I just have one question about the flipper implementation.

f = 1 / self.efficiency.value
if f == 1:
return up, down
return up, (1 - f) * up + f * down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit confused about what's going on here.

What is the flipper matrix? Is it correct that when swap=False then the flipper matrix is

$$F = \begin{bmatrix}1 & 0 \\ 1 - f & f \end{bmatrix}?$$

with inverse

$$F^{-1} = \begin{bmatrix}1 & 0 \\ 1 - 1/f & 1/f \end{bmatrix}$$

Does from_left compute

$$\begin{bmatrix}1 & 0 \\ 1 - 1/f & 1/f \end{bmatrix} \begin{bmatrix}u \\ d \end{bmatrix}=\begin{bmatrix}u \\ (1 - 1/f) u + d/f \end{bmatrix}?$$

In this case that seems to be the same as in the code.

Does from_right compute

$$\begin{bmatrix}u & d \end{bmatrix} \begin{bmatrix}1 & 0 \\ 1 - 1/f & 1/f \end{bmatrix} =\begin{bmatrix} u + (1 - 1/f)d & d/f \end{bmatrix}?$$

In this case the code is different from what I expected, what's wrong?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we dot have a vector [u, d] but a matrix [[u, d], [d, u]]. The function returns one of the resulting columns. Does it work out then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes then it works out 👍

@SimonHeybrock SimonHeybrock merged commit 20a8dd3 into main Jun 20, 2024
3 checks passed
@SimonHeybrock SimonHeybrock deleted the supermirror branch June 20, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Extend correction to include spin-flipper matrices
3 participants