Skip to content

LAT pointing model and ffp updates #1216

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

LAT pointing model and ffp updates #1216

wants to merge 8 commits into from

Conversation

skhrg
Copy link
Member

@skhrg skhrg commented May 12, 2025

No description provided.

@skhrg skhrg requested a review from mhasself May 12, 2025 17:56
Copy link
Member

@mhasself mhasself left a comment

Choose a reason for hiding this comment

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

I only looked at pointing_model.py for now -- please remove all the reformatting of code you didn't change.

Also please don't hardcode the model parameters. Those should default to zero (and that would ideally correspond to the trivial pointing model).

@skhrg skhrg requested a review from mhasself May 12, 2025 19:06
Copy link
Member

@mhasself mhasself left a comment

Choose a reason for hiding this comment

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

Basically I'd like to converge this a bit better with the SAT model and params ... and take an opportunity to decide how we want to think about those (xi, eta) "offsets".

Comment on lines +227 to +228
if "r2" in aman.pointing:
r2 = aman.pointing.R2[msk][srt][mapping]
Copy link
Member

Choose a reason for hiding this comment

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

"r2" and "R2"?

Comment on lines +178 to +182
q_mir = quat.rotation_xieta(params["mir_xi_offset"], params["mir_eta_offset"])
q_el_roll = quat.euler(2, el.copy() + params["el_offset"] - np.deg2rad(60))
q_tel = quat.rotation_xieta(params["el_xi_offset"], params["el_eta_offset"])
q_cr_roll = quat.euler(2, -1 * cr - params["cr_offset"])
q_rx = quat.rotation_xieta(params["rx_xi_offset"], params["rx_eta_offset"])
Copy link
Member

Choose a reason for hiding this comment

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

So with regards to q_mir, q_tel, q_rx. The coordinates that go into these are all offsets, in a sense. But not in the same way as encoder offsets are... so I might drop that word in favor of some other descriptive token.

But more importantly we should decide whether we want to apply them as rotation_xieta(xi, eta) or rotation_xieta(-xi, -eta).

Consider the combo q_cr_roll * q_rx. If q_rx = rotation_xieta(+xi, +eta), then you're saying "where (xi, eta) represents a shift applied to the focal plane, prior to rotating by the corotator angle." If you use (-xi, -eta), then you can say "(xi, eta) represents the position in the focal plane which that remains fixed under corotation."

It's equivalent, mathematically. But the signs of the parameters change. So it's really a choice of how you want to be able to describe this, in words, in code comments and supporting writeups, going forward. I think it's nice to be able to say that second thing -- "xi, eta is a position in the focal plane where some thing happens". This is the rationale for the docstring re-wording above. But there is probably a reasonable opposite view.

(In the current SAT parametrization I think these might be mixed ... fp_rot seems to the "position of" convention but fp_offset uses the "shift applied" convention. Something to consider for v2...)

az, el, roll: naive horizon coordinates, in radians, of the
boresight.
The implemented model parameters are:
Copy link
Member

Choose a reason for hiding this comment

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

On naming of the parameters ... here are some things that I like about the SAT model naming:

  • (xi, eta) coordinate pairs are of the form something_{xi,eta}0. The 0 indicates it's a single number, rather than a vector. The xi, eta last means you can easily just say something, to mean the pair / the whole rotation.
  • Encoder offsets are called "enc_offset_{axis}".

I'm on board with "cr" for the corotator.

I left some comments in the model about how the various (xi, eta) pairs should be described, and whether or not that means you apply (xi, eta) or (-xi, -eta) in the model... it bears a bit of thought, in case we ever want to describe this carefully to someone. The specific problem I have with the current param descriptions is that "the offset between A and B" is ambiguous to me ... it doesn't have a specific direction attached to it (whereas "the position of A relative to B" does).

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