Add subchunk_agg_check_rev8 with deterministic MC precompute and off-axis gain lookup#4
Draft
nicklasorte wants to merge 1 commit intomainfrom
Draft
Conversation
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.
Motivation
Description
subchunk_agg_check_rev8.mthat keeps the same function signature as the existingsubchunk_agg_check_rev7.mand preserves output shape and NaN handling.rand_pr_all,rand_eirp_all, andrand_clutter_allinsubchunk_agg_check_rev8.musing the original per-iteration seed identities (rand_seed1 + mc_iter,+1,+2) so each MC draw maps to the same identity as before.off_axis_gain_matrix(num_bs, num_sim_azi)by computing relative azimuthrel_az = mod(bs_azimuth - sim_azimuth,360)once and performing nearest-neighbor lookup on a deduplicated antenna-pattern azimuth axis, eliminating repeatedcircshift/unique/nearestpointoperations in the MC hot path.rngcalls:monte_carlo_Pr_dBm_rev2_app.m,monte_carlo_super_bs_eirp_dist_rev5.m, andmonte_carlo_clutter_rev3_app.m.azi_chunk) to avoid memory blow-up while removing the inner per-azimuth reconstruction loop.validate_subchunk_agg_check_rev8_rev1.mto run side-by-side comparisons and timing between rev7 and rev8, checking size equality, NaN pattern equality, max/mean absolute differences, reproducibility, and percent speedup..mfiles were modified, the rev numbering pattern was followed (new helper names use incremented revisions), noparforwas introduced, and deterministic mapping to old seeds is preserved.Testing
octave --versionreturned no binary).validate_subchunk_agg_check_rev8_rev1.mwas included and will perform automated numerical equivalence, NaN-pattern, reproducibility, and runtime comparisons when run in a MATLAB/Octave environment.Codex Task