Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/RadioAstronomySoftwareGroup/pyuvdata
19 July 2025, 02:51:34 UTC
  • Code
  • Branches (68)
  • Releases (1)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/add_bitshuffle
    • refs/heads/add_concat_use_axis
    • refs/heads/allow-extrap-in-beam
    • refs/heads/allow_exclude_ants
    • refs/heads/allow_power_units
    • refs/heads/bitshuffle_v2
    • refs/heads/combine_uvdata_func
    • refs/heads/double_prec_uvws
    • refs/heads/faster-interp
    • refs/heads/faster-uvh5-indexing
    • refs/heads/fits_speedup
    • refs/heads/fix-cst-beam-read
    • refs/heads/frame_attr
    • refs/heads/indexIng_tools
    • refs/heads/main
    • refs/heads/miriad_tweaks_v3
    • refs/heads/mwa_van_vleck_2
    • refs/heads/ovro-lwa
    • refs/heads/py03
    • refs/heads/simple-set-antdiam
    • refs/heads/sma_dev
    • refs/heads/snap_convert
    • refs/heads/use_gh_cache
    • refs/tags/V2.1.5
    • refs/tags/v1.1
    • refs/tags/v1.2
    • refs/tags/v1.3
    • refs/tags/v1.4
    • refs/tags/v1.5
    • refs/tags/v2.0.0
    • refs/tags/v2.0.1
    • refs/tags/v2.0.2
    • refs/tags/v2.1.0
    • refs/tags/v2.1.1
    • refs/tags/v2.1.2
    • refs/tags/v2.1.3
    • refs/tags/v2.1.4
    • refs/tags/v2.2.0
    • refs/tags/v2.2.1
    • refs/tags/v2.2.10
    • refs/tags/v2.2.11
    • refs/tags/v2.2.12
    • refs/tags/v2.2.2
    • refs/tags/v2.2.3
    • refs/tags/v2.2.4
    • refs/tags/v2.2.5
    • refs/tags/v2.2.6
    • refs/tags/v2.2.7
    • refs/tags/v2.2.8
    • refs/tags/v2.2.9
    • refs/tags/v2.3.0
    • refs/tags/v2.3.1
    • refs/tags/v2.3.2
    • refs/tags/v2.3.3
    • refs/tags/v2.4.0
    • refs/tags/v2.4.1
    • refs/tags/v2.4.2
    • refs/tags/v2.4.3
    • refs/tags/v2.4.4
    • refs/tags/v2.4.5
    • refs/tags/v3.0.0
    • refs/tags/v3.1.0
    • refs/tags/v3.1.1
    • refs/tags/v3.1.2
    • refs/tags/v3.1.3
    • refs/tags/v3.2.0
    • refs/tags/v3.2.1
    • refs/tags/v3.2.2
    • v1.0
  • a2d138a
  • /
  • docs
  • /
  • utility_functions.rst
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:f2f0e41d22eab26db3186bf005cf7425f39cc187
origin badgedirectory badge Iframe embedding
swh:1:dir:b9489ee4e5d0077cb35ced0e3a5d46268fc05aa5
origin badgerevision badge
swh:1:rev:7d65f4b59ba2fb3dc292dd040504b5e10c97d469
origin badgesnapshot badge
swh:1:snp:859837d71f00fbe17a4c6f72bbdd8a77e160de6a
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 7d65f4b59ba2fb3dc292dd040504b5e10c97d469 authored by Bryna Hazelton on 25 April 2025, 01:40:52 UTC
update changelog, remove deprecated code for v3.2
Tip revision: 7d65f4b
utility_functions.rst
Utility Functions
=================
Some of our utility functions are widely used and so are available to be imported
from the `pyuvdata.utils` namespace. These are shown here, for the full list of
all utility functions see: :ref:`utility subpackage`.

.. autofunction:: pyuvdata.utils.uvcalibrate

.. autofunction:: pyuvdata.utils.apply_uvflag

.. autofunction:: pyuvdata.utils.baseline_to_antnums
.. autofunction:: pyuvdata.utils.antnums_to_baseline

.. autofunction:: pyuvdata.utils.LatLonAlt_from_XYZ
.. autofunction:: pyuvdata.utils.XYZ_from_LatLonAlt
.. autofunction:: pyuvdata.utils.rotECEF_from_ECEF
.. autofunction:: pyuvdata.utils.ECEF_from_rotECEF
.. autofunction:: pyuvdata.utils.ENU_from_ECEF
.. autofunction:: pyuvdata.utils.ECEF_from_ENU

.. autofunction:: pyuvdata.utils.polstr2num
.. autofunction:: pyuvdata.utils.polnum2str
.. autofunction:: pyuvdata.utils.jstr2num
.. autofunction:: pyuvdata.utils.jnum2str
.. autofunction:: pyuvdata.utils.conj_pol
.. autofunction:: pyuvdata.utils.x_orientation_pol_map
.. autofunction:: pyuvdata.utils.parse_polstr
.. autofunction:: pyuvdata.utils.parse_jpolstr

.. autofunction:: pyuvdata.utils.get_lst_for_time

.. autofunction:: pyuvdata.utils.uvw_track_generator

.. autofunction:: pyuvdata.utils.collapse

Polarization Dictionaries
-------------------------
We also define some useful dictionaries for mapping polarizations:

  * ``pyuvdata.utils.POL_STR2NUM_DICT``: maps visibility polarization strings to polarization integers
  * ``pyuvdata.utils.POL_NUM2STR_DICT``: maps visibility polarization integers to polarization strings
  * ``pyuvdata.utils.JONES_STR2NUM_DICT``: maps calibration polarization strings to polarization integers
  * ``pyuvdata.utils.JONES_NUM2STR_DICT``: maps calibration polarization strings to polarization integers
  * ``pyuvdata.utils.CONJ_POL_DICT``: maps how visibility polarizations change when antennas are swapped (visibilities are conjugated)
  * ``pyuvdata.utils.XORIENTMAP``: maps x_orientation strings to cannonical names


.. _Utility subpackage:

Utils subpackage
----------------
This gives the full documentation of all functions inside the utils subpackage.
Unless they are also listed above, these functions must be imported using their
full subpackage/submodule path.

Note that we are also listing private functions here (functions that start with
an underscore). While they are listed here, **they are not considered part of the
public API, so they can change without notice**. If you find that you need to rely
one of them let us know in a github issue and we can consider making it part of
the public API.


File I/O Utility Functions
**************************

Antenna position files
~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pyuvdata.utils.io.antpos
  :members:
  :private-members:
  :undoc-members:

FHD files
~~~~~~~~~

.. automodule:: pyuvdata.utils.io.fhd
  :members:
  :private-members:
  :undoc-members:

FITS files
~~~~~~~~~~

.. automodule:: pyuvdata.utils.io.fits
  :members:
  :private-members:
  :undoc-members:

HDF5 files
~~~~~~~~~~

.. automodule:: pyuvdata.utils.io.hdf5
  :members:
  :private-members:
  :undoc-members:

Measurement Set files
~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pyuvdata.utils.io.ms
  :members:
  :private-members:
  :undoc-members:

Applying UVFlags to other objects
*********************************

.. automodule:: pyuvdata.utils.apply_uvflag.apply_uvflag
  :members:
  :private-members:
  :undoc-members:

Array collapse functions for flags
**********************************

.. automodule:: pyuvdata.utils.array_collapse
  :members:
  :private-members:
  :undoc-members:

Functions for working with baseline numbers
*******************************************

.. automodule:: pyuvdata.utils.bls
  :members:
  :private-members:
  :undoc-members:
  :ignore-module-all:

Functions for working with the baseline-time axis
*************************************************

.. automodule:: pyuvdata.utils.bltaxis
  :members:
  :private-members:
  :undoc-members:

.. _coordinate_conversions:

Functions for working with telescope coordinates
************************************************

.. automodule:: pyuvdata.utils.coordinates
  :members:
  :private-members:
  :undoc-members:
  :ignore-module-all:

Functions for working with the frequency axis
*********************************************

.. automodule:: pyuvdata.utils.frequency
  :members:
  :private-members:
  :undoc-members:

Functions for working with history
**********************************

.. automodule:: pyuvdata.utils.history
  :members:
  :private-members:
  :undoc-members:

Functions for working with phase center catalogs
************************************************

.. automodule:: pyuvdata.utils.phase_center_catalog
  :members:
  :private-members:
  :undoc-members:

Functions for working with phasing
**********************************

.. automodule:: pyuvdata.utils.phasing
  :members:
  :private-members:
  :undoc-members:

Functions for working with polarizations
****************************************

.. automodule:: pyuvdata.utils.pol
  :members:
  :private-members:
  :undoc-members:
  :ignore-module-all:

Functions for working with baseline redundancies
************************************************

.. automodule:: pyuvdata.utils.redundancy
  :members:
  :private-members:
  :undoc-members:

Functions for working with times and LSTs
*****************************************

.. automodule:: pyuvdata.utils.times
  :members:
  :private-members:
  :undoc-members:

General utility functions
*************************

.. automodule:: pyuvdata.utils.tools
  :members:
  :private-members:
  :undoc-members:

Applying calibration solutions to data
**************************************

..
   Note: listing all functions here explicitly because using automodule causes
   a conflict with the earlier pyuvdat.utils.uvcalibrate function.

.. autofunction:: pyuvdata.utils.uvcalibrate.uvcalibrate
.. autofunction:: pyuvdata.utils.uvcalibrate._get_pol_conventions
.. autofunction:: pyuvdata.utils.uvcalibrate._apply_pol_convention_corrections

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API