Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First commit adds docstrings and inline comments for all the methods in
Subaru_POPT2_PFS_AG.pyand the second commit renames variables to be more clear but makes no functional changes.These are strictly changes to documentation and no functional changes.