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

utils.ac_zeeman_shift: fix slicing #55

Closed
wants to merge 3 commits into from
Closed

Conversation

hartytp
Copy link
Contributor

@hartytp hartytp commented Feb 23, 2023

No description provided.

@hartytp hartytp requested a review from pathfinder49 February 23, 2023 20:57
@@ -108,7 +108,7 @@ def ac_zeeman_shift(atom: ap.Atom, state: int, f_RF: float):

E = atom.E[states]
M = atom.M[states]
R = atom.M1[states]
R = atom.M1[states, states]
Copy link
Member

@pathfinder49 pathfinder49 Feb 24, 2023

Choose a reason for hiding this comment

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

I'm not sure this is right. in the following lines we do:

rabi = R / consts.hbar
w = rabi[state, _state][0]

As we set state -= states.start, shouldn't the first axis of R have the orignial dimension?

The code reads more like we'd want something like:

R = atom.M1[:, states]

Though I haven't checked the atomic physics on that.

Aside: I'm a bit confused by the minus sign in state -= states.start

Copy link
Contributor Author

Choose a reason for hiding this comment

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

w = rabi[state, _state][0] yeah, that's not needed, not sure why it's there. Should just be w = rabi[state, _sate]

@hartytp hartytp requested a review from sotirova October 19, 2023 09:46
@hartytp hartytp closed this Dec 26, 2024
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