Skip to content

Cleanup coord transform files.#105

Merged
wtgee merged 4 commits intomainfrom
refactor/pfs-astrometric-engine
May 6, 2026
Merged

Cleanup coord transform files.#105
wtgee merged 4 commits intomainfrom
refactor/pfs-astrometric-engine

Conversation

@wtgee
Copy link
Copy Markdown
Member

@wtgee wtgee commented May 6, 2026

First commit adds docstrings and inline comments for all the methods in Subaru_POPT2_PFS_AG.py and the second commit renames variables to be more clear but makes no functional changes.

These are strictly changes to documentation and no functional changes.

wtgee added 4 commits May 5, 2026 23:01
…lass

Step 1 of refactor plan: add comprehensive docstrings to all six methods
in the PFS class and annotate RADECInRShiftA with labelled phase comments.

- sourceFilter: documents agarray column layout, filter criteria
  (ellipticity, upper/lower size), and return values
- RADECInRShiftA: documents all parameters, v0/v1 column layout,
  inrflag/scaleflag semantics, mr column index table, and labels
  all seven algorithmic phases with inline block comments
- makeBasis: explains role as stable public delegate to makeBasisPfi
- makeBasisPfi: documents z/o detector-half flag, sep/zpa meanings,
  v_0/v_1 column layout, and why the magnitude column is absent
- agarray2momentdifference: explains spider-shadow focus-proxy physics,
  the six-CCD assumption, and per-output-entry meaning
- momentdifference2focuserror: names the empirical calibration constants
  (0.0086 mm/px2, 0.026 mm), their units, and sign convention
… class

Step 2 of refactor plan: rename all opaque short-hand variable names to
descriptive alternatives, with no behavioural changes.

Renames applied in Subaru_POPT2_PFS_AG.py:
- v0 / v1       -> catalog_left / catalog_right  (detector-half basis arrays)
- rCRA / rCDE   -> coarse_ra_coeff / coarse_dec_coeff  (Cramer's-rule result)
- flg           -> right_detector_mask  (RIGHT-half source selector)
- f             -> close_match_mask  (refined-match 2 mm distance gate)
- A             -> lstsq_coeffs  (least-squares coefficient vector)
- vc / vch      -> inlier_flat_mask / inlier_mask  (outlier-rejection inliers)
- rej_thres / rej_thres_lim -> rejection_threshold / max_rejection_threshold
- mr            -> match_result  (per-match return matrix)
- v             -> valid_mask  (sourceFilter boolean quality mask)
- vdatanum      -> removed; replaced with valid_mask.sum() inline
- outarray      -> moment_diff_per_ccd  (agarray2momentdifference output)
- inrflag / scaleflag -> fit_inr: bool / fit_scale: bool  (semantic type change)
- loop variable `array` -> ccd_array  (fixes variable shadowing of method param)

FieldAcquisitionAndFocusing.py updated simultaneously:
- calculate_offsets parameters inrflag/scaleflag renamed to fit_inr/fit_scale
  with type annotations updated from int to bool and defaults from 1/1 to
  True/True; the call site to RADECInRShiftA updated accordingly.
@wtgee wtgee changed the title Cleanup coord tranform files. Cleanup coord transform files. May 6, 2026
@wtgee wtgee merged commit 635c7f5 into main May 6, 2026
2 checks passed
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.

1 participant