pyvisgen

Simulate observations with radio interferometers and generate complex visibilities.

https://github.com/radionets-project/pyvisgen

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Simulate observations with radio interferometers and generate complex visibilities.

Basic Info
Statistics
  • Stars: 5
  • Watchers: 3
  • Forks: 0
  • Open Issues: 5
  • Releases: 8
Created about 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.rst

==============================================================
pyvisgen |ci| |pre-commit| |codecov| |pypi| |zenodo| |license|
==============================================================

.. |ci| image:: https://github.com/radionets-project/pyvisgen/actions/workflows/ci.yml/badge.svg?branch=main
   :target: https://github.com/radionets-project/pyvisgen/actions/workflows/ci.yml?branch=main
   :alt: Test Status

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/radionets-project/pyvisgen/main.svg
   :target: https://results.pre-commit.ci/latest/github/radionets-project/pyvisgen/main
   :alt: pre-commit.ci status

.. |codecov| image:: https://codecov.io/github/radionets-project/pyvisgen/badge.svg
   :target: https://codecov.io/github/radionets-project/pyvisgen
   :alt: Code coverage

.. |pypi| image:: https://badge.fury.io/py/pyvisgen.svg
   :target: https://badge.fury.io/py/pyvisgen
   :alt: PyPI version

.. |zenodo| image:: https://zenodo.org/badge/333035370.svg
   :target: https://zenodo.org/badge/latestdoi/333035370
   :alt: Zenodo DOI

.. |license| image:: https://img.shields.io/badge/License-MIT-blue.svg
   :target: https://opensource.org/license/mit
   :alt: License: MIT


Pyvisgen is a python implementation of the Radio Interferometer Measurement Equation (RIME)
formalism inspired by the VISGEN tool of the `MIT Array Performance Simulator `_
developed at `Haystack Observatory `_. The RIME is used to simulate
the measurement process of a radio interferometer. A gridder is also implemented to process the resulting
visibilities and convert them to images suitable as input for the neural networks developed in the
`radionets repository `_.

Installation
============

You can install the necessary packages in a conda environment of your choice by executing

.. code::

  $ pip install -e .


Usage
=====

There are 3 possible modes at the moment:  ``simulate`` (default), ``slurm``, and ``gridding``. ``simulate`` and ``slurm`` both
utilize the RIME formalism for creating visibilities data. With the option ``gridding``, these visibilities get gridded and prepared
as input images for training a neural network from the radionets framework. The necessary options and variables are set with a ``toml``
file. An exemplary file can be found in ``config/data_set.toml``.

.. code::

  $ pyvisgen_create_dataset --mode=simulate some_file.toml


In the examples directory, you can find introductory jupyter notebooks which can be used as an entry point.

Input images
============

As input images for the RIME formalism, we use GAN-generated radio galaxies created by `Rustige et. al. `_
and `Kummer et. al. `_. Below, you can see four example images consisting of FRI and FRII sources.

.. image:: https://github.com/radionets-project/pyvisgen/assets/23259659/285e36f6-74e7-45f1-9976-896a38217880
   :alt: sources

Any image can be used as input for the formalism, as long as they are stored in the h5 format, generated with |h5py|_.

.. |h5py| replace:: ``h5py``
.. _h5py: https://www.h5py.org/

RIME
====

Currently, we use the following expression for the simulation process:

$$\\mathbf{V}_{\\mathrm{pq}}(l, m) = \\sum_{l, m} \\mathbf{E}_{\\mathrm{p}}(l, m) \\mathbf{K}_{\\mathrm{p}}(l, m) \\mathbf{B}(l, m) \\mathbf{K}^{H}_{\\mathrm{q}}(l, m) \\mathbf{E}^{H}_{\\mathrm{q}}(l, m)$$

Here, $\\mathbf{B}(l, m)$ corresponds to the source distribution, $\\mathbf{K}(l, m) = \\exp(-2\\pi\\cdot i\\cdot (ul + vm))$ represents
the phase delay, and $\\mathbf{E}(l, m) = \\mathrm{jinc}\\left(\\frac{2\\pi}{\\lambda}d\\cdot \\theta_{lm}\\right)$ the telescope properties,
with $\\mathrm{jinc(x)} = \\frac{J_1(x)}{x}$ and $J_1(x)$ as the first Bessel function. An exemplary result can be found below.

.. image:: https://github.com/radionets-project/pyvisgen/assets/23259659/858a5d4b-893a-4216-8d33-41d33981354c
   :alt: visibilities

Visualization of Jones matrices
===============================

In this section, you can see visualizations of the matrices $\\mathbf{E}(l, m)$  and $\\mathbf{K}(l, m)$.

Visualization of the $\\mathbf{E}$ matrix
-----------------------------------------
.. image:: https://github.com/radionets-project/pyvisgen/assets/23259659/194a321b-77cd-423b-9d01-c18c0741d6c5
   :alt: visualize_E

Visualization of the $\\mathbf{K}$ matrix
-----------------------------------------
.. image:: https://github.com/radionets-project/pyvisgen/assets/23259659/501f487a-498b-4143-b54a-eb0e2f28e417
   :alt: visualize_K

Owner

  • Name: Radionets-Project
  • Login: radionets-project
  • Kind: organization
  • Email: kevin3.schmidt@tu-dortmund.de
  • Location: Dortmund, Germany

Python packages for Machine Learning in radio interferometry.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: pyvisgen
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - family-names: Schmitz
    given-names: Kevin
    affiliation: TU Dortmund University
    orcid: "https://orcid.org/0000-0002-9883-4454"
  - family-names: Knierim
    given-names: Anno
    affiliation: TU Dortmund University
    orcid: "https://orcid.org/0009-0004-8728-2879"
  - family-names: Geyer
    given-names: Felix
    affiliation: TU Dortmund University
    orcid: "https://orcid.org/0000-0002-5615-2498"
  - family-names: Groß
    given-names: Tom
    affiliation: TU Dortmund University
    orcid: "https://orcid.org/0009-0008-5497-0885"
  - family-names: Fröse
    given-names: Stefan
    affiliation: Academia Sinica
    orcid: "https://orcid.org/0000-0003-1832-4129"
identifiers:
  - type: doi
    value: 10.5281/zenodo.10091310
    description: latest version
repository-code: 'https://github.com/radionets-project/pyvisgen/'
url: 'https://pyvisgen.readthedocs.io/en/latest/'
keywords:
  - Astronomy
  - Data Analysis
  - Simulation
license: MIT

GitHub Events

Total
  • Create event: 46
  • Release event: 2
  • Issues event: 13
  • Watch event: 2
  • Delete event: 42
  • Member event: 1
  • Issue comment event: 68
  • Push event: 241
  • Pull request review comment event: 4
  • Pull request review event: 42
  • Pull request event: 73
Last Year
  • Create event: 46
  • Release event: 2
  • Issues event: 13
  • Watch event: 2
  • Delete event: 42
  • Member event: 1
  • Issue comment event: 68
  • Push event: 241
  • Pull request review comment event: 4
  • Pull request review event: 42
  • Pull request event: 73

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 8
  • Total pull requests: 54
  • Average time to close issues: about 1 year
  • Average time to close pull requests: about 1 month
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 0.88
  • Average comments per pull request: 0.81
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 5
  • Pull requests: 50
  • Average time to close issues: 2 months
  • Average time to close pull requests: 19 days
  • Issue authors: 3
  • Pull request authors: 4
  • Average comments per issue: 1.2
  • Average comments per pull request: 0.62
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • Kevin2 (4)
  • StFroese (2)
  • FeGeyer (2)
  • aknierim (1)
  • tgross03 (1)
Pull Request Authors
  • aknierim (39)
  • tgross03 (10)
  • Kevin2 (6)
  • pre-commit-ci[bot] (5)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
no-changelog-needed (11) documentation-only (6) maintenance (5) enhancement (4) documentation (3) dependencies (1) bugfix (1) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 480 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 3
pypi.org: pyvisgen

Simulate radio interferometer observations and visibility generation with the RIME formalism.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 480 Last month
Rankings
Dependent packages count: 8.9%
Average: 29.5%
Dependent repos count: 50.1%
Maintainers (3)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • astroplan *
  • astropy *
  • ipython *
  • jupyter *
  • matplotlib *
  • numpy *
  • pandas *
  • pytest *
  • pytest-cov *
  • scipy *
  • toml *
  • torch *
  • tqdm *
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1 composite