Skip to content

Added script that solves satv1 pointing model parameters.#999

Open
elle-shaw wants to merge 72 commits intomasterfrom
solve_pointing
Open

Added script that solves satv1 pointing model parameters.#999
elle-shaw wants to merge 72 commits intomasterfrom
solve_pointing

Conversation

@elle-shaw
Copy link
Copy Markdown
Contributor

Script that solves for pointing model parameters given an input config and saves manifest/metadata.

@elle-shaw elle-shaw requested a review from mhasself October 11, 2024 18:19
Copy link
Copy Markdown
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.

Thanks! Here's the round 1 review (there will be more rounds).

As a site_pipeline script, this should conform to site_pipeline standards (which I admit are not evenly enforced):

  • Reformulate main(...), add a get_parser() function, and use util.main_launcher. See site_pipeline/preprocess_tod.py for a correct example.
  • Register the function in site_pipeline/cli.py so it can be run from the command line using so-site-pipeline entry point.
  • Add an entry in docs/site_pipeline.rst. Make sure the text includes an example config file. If command line args are non-trivial, it should include those two. Both of those things can be "automagically" dropped in by sphinx, from the module code / docstrings, with the right constructions. (See other examples in site_pipeline.rst)

One more big request for overall scope: I know this fitter has been validated on this dataset, elsewhere. But when it is used on future data sets it will be essential to visualize the results, to see the residuals, and explore param combos. So... please include plotting functionality in here.

(Also a few minor comments inline.)

Comment thread sotodlib/site_pipeline/solve_pointing_model.py Outdated
Comment thread sotodlib/site_pipeline/solve_pointing_model.py Outdated
Comment thread sotodlib/site_pipeline/solve_pointing_model.py Outdated
Comment thread sotodlib/site_pipeline/solve_pointing_model.py Outdated
Added plotting functionality, added fit iteration, added documentation.
@elle-shaw
Copy link
Copy Markdown
Contributor Author

I had to do lots of the code editing on site computing while NERSC was down, so when I copied it back to NERSC to do the git push-ing, it makes it look like every line of code is new! Sorry

@tskisner
Copy link
Copy Markdown
Member

Just a heads up that the tests on the most recent push will fail. so3g and toast both had releases in the last couple hours and I'm about to merge a PR that updates the sotodlib interfaces in a couple places. I'll post more info on dm-support shortly.

elle-shaw and others added 17 commits January 20, 2026 12:32
…ombineFlags, implemented MPI parallel processing, and other syntax updates.
…ts through to the outputs of finalize focal plane. Useful for per-obs usecase, and when loaded with Receiver.load the values will be under det_boresight
* feat: lat v2 pointing model

* Update sotodlib/coords/pointing_model.py

Co-authored-by: Matthew Hasselfield <mhasself@users.noreply.github.com>

* Update sotodlib/coords/pointing_model.py

Co-authored-by: Matthew Hasselfield <mhasself@users.noreply.github.com>

* feat: quiver plot

* fix: use correct roll

* fix: remove unused lines

* feat: add option for optics tubes to float and moved some fitter options to config file

* fix: dont run second iteration if there are no cut points and fix missing comma

* fix: apply ot offsets when plotting

* fix: use same xieta_mode when making final plots and save ot offsets seperately

---------

Co-authored-by: Matthew Hasselfield <mhasself@users.noreply.github.com>
perdetector azimuth changes to finalize_focal_plane and fp_coords will
function.
…aving of lmfit parameter errors and correlations matrix. Simplifies loading of data into axis managers.
…n of differential xi and eta in analyze_PM_with_all_dets function. Feature plot of correlation matrix.
test_params = epoch["solver_aman"].pointing_model_i1
else:
test_params = epoch["solver_aman"].pointing_model
if "ot_float_aman" in epoch["solver_aman"]._assignments:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Had a question about why the if "ot_float_aman" statement is only on this second statement. We could have it make the fancy plots for both first and second fits. If that was the case, should the ot_float statement also apply to both minimizations?

Copy link
Copy Markdown
Contributor Author

@elle-shaw elle-shaw left a comment

Choose a reason for hiding this comment

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

Quick changes look good to me, I just have the one question on the ot_float option handling on the analyze_PM_with_all_dets plotting section.

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.

5 participants