Blackmannharris beams and update functional decomposition#339
Blackmannharris beams and update functional decomposition#339nicholebarry wants to merge 8 commits intomasterfrom
Conversation
Added new parameters for beam function decomposition and width.
There was a problem hiding this comment.
Pull request overview
This pull request introduces Blackman-Harris window functions as an alternative to Gaussian decomposition for beam modeling, and refactors the beam decomposition infrastructure to support multiple functional forms. The changes generalize the previous Gaussian-specific code into a more flexible framework where beams can be represented using different mathematical functions.
Changes:
- Adds new Blackman-Harris decomposition function with both analytic FT and real-space implementations
- Refactors beam decomposition code from
beam_gaussian_decomp.prointo more generalbeam_decomp.prosupporting multiple function types - Renames parameters throughout (e.g.,
beam_gaussian_decomp→beam_function_decomp,beam_gauss_param_transfer→beam_param_transfer) - Introduces new
beam_decomp_infostructure to store beam decomposition parameters in a unified way - Adds
beam_width_degkeyword to specify beam width in degrees for simple beam creation - Updates parameter handling in
gaussian_decomp.proto support overresolution and improved grid transformation
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| gaussian_decomp.pro | Refactored grid transformation logic, replaced volume_beam outputs with max_amp, added over_res parameter |
| fhd_struct_init_psf.pro | Removed beam_gaussian_params_arr field, added image_res_scale parameter to support new infrastructure |
| fhd_struct_init_antenna.pro | Renamed beam decomposition parameters to be function-agnostic, removed PSF dimension matching logic |
| blackmanharris_decomp.pro | NEW: Implements 7-term Blackman-Harris window decomposition with separable 2D support |
| beam_setup.pro | Major refactoring to use new beam_decomp_info structure, simplified beam volume calculations |
| beam_power.pro | Updated to call new beam_decomp function with revised parameter names |
| beam_gaussian_decomp.pro | DELETED: Functionality moved into generalized beam_decomp.pro |
| beam_decomp.pro | NEW: Unified beam decomposition supporting gaussian and blackmanharris functions, includes parameter transfer and beam_width_deg functionality |
| dictionary.md | Added documentation for beam_function_decomp, beam_param_transfer, and beam_width_deg keywords |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| FUNCTION blackmanharris_decomp, x, y, p, $ | ||
| ftransform=ftransform, model_npix=model_npix, model_res=model_res, over_res=over_res,$ | ||
| volume_beam=volume_beam, sq_volume_beam=sq_volume_beam, max_amp=max_amp, $ | ||
| conserve_memory=conserve_memory |
There was a problem hiding this comment.
Unused parameter: conserve_memory is declared in the function signature but never used in the function body. Consider removing it from the parameter list or implementing memory conservation logic if needed.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@nicholebarry I've opened a new pull request, #340, to work on those changes. Once the pull request is ready, I'll request review from you. |
) * Initial plan * Remove unused conserve_memory parameter from blackmanharris_decomp Co-authored-by: nicholebarry <5588290+nicholebarry@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nicholebarry <5588290+nicholebarry@users.noreply.github.com>
Beams can now be represented as a Blackman-Harris using the infrastructure of the Gaussian decomposition code. Functions have been renamed to more general, and a new structure called
beam_decomp_infocontains all the required variables needed and is located in the psf structure. Some better flexibility was also added to the Gaussian decomposition code as well, allowing for transferred variables that were not made at the same resolution/extent as the current run.Fitting the beams with Blackman-Harris is not currently feasible, and is left up to the user to figure out. For example, I made beam images and externally used a MCMC to fit the most likely Blackman-Harris on the main lobe -- I can't imagine this being fast enough to perform on the fly in IDL.
There is new functionality to provide a beam width in degrees on the sky, given a specified functional decomposition. It currently only points up at zenith, but that is easily changeable if that functionality is desired.
Please see new keywords in dictionary.