Skip to content

Commit

Permalink
Merge branch 'main' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aknierim authored Jan 27, 2025
2 parents 40e75c6 + 17b315a commit 9cc94e2
Show file tree
Hide file tree
Showing 8 changed files with 1,032 additions and 174 deletions.
4 changes: 4 additions & 0 deletions docs/changes/39.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Fix gridding in `pyvisgen.simulation.observation.Observation` methods `create_rd_grid` and `create_lm_grid`
methods resulting in rotated images
- Fix `pyvisgen.simulation.observation.ValidBaselineSubset` dataclass field order
- Fix tests failing because of api change
5 changes: 5 additions & 0 deletions docs/changes/39.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Add class `Polarisation` to `pyvisgen.simulation.visibility` that is called in `vis_loop`
- Added linear, circular, and no polarisation options
- Update `pyvisgen.simulation.visibility.Visibilities` dataclass to also store polarisation degree tensors
- Add keyword arguments for polarisation simulation to `pyvisgen.simulation.observation.Observation` class
- Add parallactic angle computation
6 changes: 6 additions & 0 deletions docs/changes/39.maintenance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Change pyvisgen.simulation.visibility.Visibilities dataclass component names from stokes components (I , Q, U, and V)
to visibilities constructed from the stokes components (`V_11`, `V_22`, `V_12`, `V_21`)
- 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
- Update docstrings accordingly in `pyvisgen.simulation.visibility.vis_loop` and `pyvisgen.simulation.observation.Observation`
11 changes: 5 additions & 6 deletions pyvisgen/fits/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ def create_vis_hdu(data, obs, source_name="sim-source-0"):

ws = wcs.WCS(naxis=7)

# need to switch between lin and circ pol in future
crval_stokes = -5
crval_stokes = -1
stokes_comment = "-1=RR, -2=LL, -3=RL, -4=LR"
# if obs.polarisation == "linear":
# crval_stokes = -5
# stokes_comment = "-5=XX, -6=YY, -7=XY, -8=YX"
# stokes_comment += " or -5=VV, -6=HH, -7=VH, -8=HV"
if obs.polarisation == "linear":
crval_stokes = -5
stokes_comment = "-5=XX, -6=YY, -7=XY, -8=YX"
stokes_comment += " or -5=VV, -6=HH, -7=VH, -8=HV"

ws.wcs.crpix = [0, 1, 1, 1, 1, 1, 1]
ws.wcs.crota = [0, 0, 0, 0, 0, 0, 0]
Expand Down
Loading

0 comments on commit 9cc94e2

Please sign in to comment.