Skip to main content

FeatherPy

Actions Status Documentation Status

PyPI version PyPI platforms

GitHub Discussion

Combine images in the Fourier domain.

Installation

This package is written in pure Python, with all dependencies (including the Python version) specified in the pyproject.toml.

PyPI (stable):

pip install featherpy

GitHub (latest):

pip install git+https://github.com/AlecThomson/FeatherPy

Usage

Command line:

$ featherpy -h
usage: featherpy [-h] [-c FEATHER_CENTRE] [-s FEATHER_SIGMA] [-u OUTER_UV_CUT] [-lu LOW_RES_UNIT] [-hu HIGH_RES_UNIT] [-p] [-o] low_res_file high_res_file output_file frequency

Feather two FITS files

positional arguments:
  low_res_file          Low resolution FITS file
  high_res_file         High resolution FITS file
  output_file           Output feathered FITS file
  frequency             Frequency of the data in Hz

options:
  -h, --help            show this help message and exit
  -c FEATHER_CENTRE, --feather-centre FEATHER_CENTRE
                        UV centre of the feathering function in meters (default: 0)
  -s FEATHER_SIGMA, --feather-sigma FEATHER_SIGMA
                        UV width of the feathering function in meters (default: 1)
  -u OUTER_UV_CUT, --outer-uv-cut OUTER_UV_CUT
                        Outer UV cut in meters (default: None)
  -lu LOW_RES_UNIT, --low-res-unit LOW_RES_UNIT
                        Unit of the low resolution data. Will try to read from BUNIT if not provided (default: None)
  -hu HIGH_RES_UNIT, --high-res-unit HIGH_RES_UNIT
                        Unit of the high resolution data. Will try to read from BUNIT if not provided (default: None)
  -p, --do-feather-plot
                        Make a plot of the feathering (default: False)
  -o, --overwrite       Overwrite the output file if it exists (default: False)

Python API:

from featherpy.core import feather_from_fits

See the API docs for further detail.

Algorithm

Here I follow the technique outlined by Weiss et al. 2001. For further reading the see the CASA Feather documentation and references.

Two input images are required a 'low resolution' image and a 'high resolution' image. I assume the 'low resolution' is sensitive to all spatial scales, as is typical for a single-dish radio image, and that the 'high resolution' image is missing short spacing scales.

Weighting between the two images is done in the $uv$-plane in unites of metres. I assume that:

  • There is sufficient $uv$ overlap between the two images
  • The images are measured at the same frequency and with the same bandwidth
  • The images can be converted to units of Jy/sr

I weight between in the images in the $uv$-plane using a logistic (sigmoid) function. You must specify both the mid-point of the overlap in $uv$ space as well as the 1$\sigma$ overlap (which I approximately convert to the right parameter of the logictic function).

Steps:

  • Regrid low resolution image to match high resolution
  • Convert low and high resolution images to Jy/sr
  • FFT the low-resolution image
  • Optionally apply an outer $uv$ cut to the low resolution FFT
  • Deconvolve the low-resolution FFT
  • FFT the high-resolution image
  • Calculate weights in the $uv$-plane
  • Combine image FFTs as a weighted sum
  • FFT back to the image domain
  • Convert feathered image to Jy/beam

Metadata

Release files for FeatherPy 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FeatherPy 0.0.1
File Size Uploaded
featherpy-0.0.1.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FeatherPy 0.0.1
File Interpreter ABI Platform
featherpy-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / featherpy-0.0.1.tar.gz

Download URL featherpy-0.0.1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ec2a21650fb54ac8f95d221c7c734162648c0e2e5b8809d89343029060048c3e
BLAKE2b-256 checksum
How to use checksums
c69b1e249c57d052736fcb31bf2f431bd90b966909842cfbfd7936d7751dbc92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2024.

Transparency log

Release files / featherpy-0.0.1-py3-none-any.whl

Download URL featherpy-0.0.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec933c1b5b21417f2b4fb56987c6848db3d29afcecbeb195a3c2a3065cfc7819
BLAKE2b-256 checksum
How to use checksums
d72606c6217ecc05adb6b236abc45a9e7ef39bf3733a76f6a38b690843a47536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page