[WIP] Add optional near-field corrections to the phasing function #1482
+381
−6
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.
Description
Included code to perform near-field corrections through keyword arguments passed to the phase() function.
I added two new keys to the
phase_dict
dictionary (cat_dist_units
andcat_near_field
), allowing the user to specify the units associated with thecat_dist
key, and whether or not to apply near-field corrections (boolean value). As a result, a lot of tests are breaking because these extra keys didn't exist when they were written. I'm having trouble tracking down every instance ofphase_dict
to patch this.It also still isn't clear whether or not an
unproject_near_field()
function is necessary, so I have left in some commented-out lines of code while I work on figuring this out (to be removed or uncommented when this is resolved).Motivation and Context
This feature allows users to specify the RA, DEC, and distance to a near-field source, and "focus" on that source (it will then appear in focus in an image, for example). This is done in practice by calculating the geometric near-field
w
values for each visibility, updating those in theuvw_array
, computing the resulting phase differences, and updating the phase directly for each visibility. This feature is turned off by default (i.e. the default behavior for thephase()
function is just to perform the traditional far-field phasing).Types of changes
Checklist:
New feature checklist: