Bug in UVCal read of FHD calibration data?

Open
#1,748 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start in pyuvdata/uvcal/fhd_cal.py where gain_array is built, and compare it with the read-in conjugation applied in pyuvdata/uvdata/fhd.py. Then trace utils.uvcalibrate to see how flip_gain_conj is applied when forming g_1 g_2^* versus g_1^* g_2. Check existing FHD calibration tests and add a case that compares calibrated visibilities with model visibilities; done means the gain convention matches FHD and the test pins it down.

Written by the indexing model from the issue text.

Description

In uvdata.fhd the visibilities are conjugated on read-in to create the data_array because the FHD convention is supposed to be flipped. However a similar conjugation doesn’t happen in uvcal.fhd_cal on creating the gain_array. So $v_{ij}$ seems to be conjugated for FHD but not $g_{ij}$.

I guess because of that, when applying utils.uvcalibrate with a UVCal object created from a calh5 file converted with UVCal from the original FHD files, I get a better result if I set flip_gain_conj=True than if I don’t, i.e. if the calibration is applied with $g_1^* g_2$ instead of $g_1 g_2^*$. (By “better result” I mean I see a smaller magnitude difference between the calibrated visibilities and the model visibilities.)

It may be worth mentioning that FHD (in FHD/fhd_core/calibration/vis_calibration_apply.pro) currently follows the conjugation convention $g_1 g_2^*$ for the gains on antennas 1 and 2 — the opposite of the convention set by flip_gain_conj=True.

Dominant language
Python
Stars
103
Forks
40
Avg merge
4d 11h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RadioAstronomySoftwareGroup/pyuvdata

All issues in RadioAstronomySoftwareGroup/pyuvdata

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.