Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polarisation #39

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Polarisation #39

wants to merge 17 commits into from

Conversation

aknierim
Copy link
Member

@aknierim aknierim commented Oct 1, 2024

Add rudimentary implementation of polarisation in pyvisgen

  • Add class Polarisation to pyvisgen.simulation.visibility that is called in vis_loop
    • Available: linear, circular, and no polarisation
  • Update pyvisgen.simulation.visibility.Visibilities dataclass to also store polarisation degree tensors
  • Change pyvisgen.simulation.visibility.Visibilities dataclass component names from stokes components ($I$, $Q$, $U$,and $V$) to the visibilities constructed from stokes components (V_11, V_22, V_12, V_21)

Updates to pyvisgen.simulation.observation

  • Fix gridding in Observation.create_rd_grid and Observation.create_lm_grid methods resulting in rotated images
  • Add keyword arguments for polarisation simulation
  • Fix ValidBaselineSubset dataclass field order

Updates to FITS writer pyvisgen.fits.writer

  • Change indices for stokes components according to AIPS Memo 114
    • Indices will be set automatically depending on simulated polarisation
  • Update comment strings in FITS files

General

  • Update docstrings accordingly in the respective classes/methods

Still missing:

  • Option to pass arguments via config files
  • Tests

- Add numeric codes for stokes parameters
- Add header comments for stokes parameters
- Add comment for visibilities (real, complex, weight)
- Fixes image rotation due to rd grid indexing
- Fixes Baselines dataclass attribute sequence, where `num_baseline`
  would previously be saved as first element
- Fix calculation of Stokes parameters in Polarisation class
- Rename visibilities I -> V_11, Q -> V_12, U -> V_21, V -> V_22.
  The previous names are confusing, as the quantities that are returned
  are not the Stokes parameters but calculated from the Stokes
  parameters (i.e. V_11 = I + V for circular polarization)
- Fix visbilities sequence -> V_11, V_22, V_12, V_21 (previously V_11,
  V_12, V_21, V22), i.e. main diagonal of the Jones matrix first, then
  subdiagonals
@aknierim aknierim requested a review from Kevin2 October 1, 2024 07:34
@aknierim aknierim marked this pull request as draft October 1, 2024 07:35
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 98.55769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.47%. Comparing base (94fe38f) to head (daff864).

Files with missing lines Patch % Lines
pyvisgen/fits/writer.py 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   86.28%   88.47%   +2.18%     
==========================================
  Files          13       13              
  Lines         853     1041     +188     
==========================================
+ Hits          736      921     +185     
- Misses        117      120       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aknierim aknierim added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant