Skip to main content

elliprof

ELLIPROF fits elliptical isophotes to astronomical FITS images.

For each isophote it measures the centre, position angle, ellipticity, mean intensity, the 3θ and 4θ (boxy/disky) harmonic terms, and the logarithmic slope. It can also write a smooth model image of the galaxy. The numerical code is the original ELLIPROF Fortran, compiled unchanged; elliprof makes it easy to install and run, from the command line or from Python.

Installation

pip install elliprof

Binary wheels include the compiled program and everything it needs. No compiler, gfortran or CFITSIO is required. (See Platforms for which wheels have been tested.)

Usage

elliprof galaxy.fits \
    X0=500 Y0=500 \
    R0=5 R1=200 NR=30 \
    --csv profile.csv \
    --reg profile.reg

Scalar sky:

elliprof galaxy.fits \
    --sky 1234.5 \
    X0=500 Y0=500 \
    R0=5 R1=200 NR=30

2-D sky:

elliprof galaxy.fits \
    --sky-image background.fits \
    X0=500 Y0=500 \
    R0=5 R1=200 NR=30

Mask + 2-D sky:

elliprof galaxy.fits \
    --mask mask.fits \
    --sky-image background.fits \
    X0=500 Y0=500 \
    R0=5 R1=200 NR=30

Python:

from elliprof import run_elliprof

result = run_elliprof(
    image="galaxy.fits",
    x0=500,
    y0=500,
    r0=5,
    r1=200,
    nr=30,
)

print(result.profile)

python -m elliprof is the same as the elliprof command. A worked example on a real HST image is in examples/u12517 and notebooks/elliprof_example.ipynb.

Inputs

Input Command line Python Notes
science image first argument image= 2-D FITS image
initial centre X0=x Y0=y x0=, y0= required; ELLIPROF refines it for every isophote
radii R0=r R1=r NR=n r0=, r1=, nr= required; 0 < R0 < R1, 2 ≤ NR ≤ 100
scalar sky --sky V sky= subtracted from every pixel
2-D sky --sky-image F sky_image= subtracted pixel by pixel; same size as the image
mask --mask F mask= 0 = ignored, 1 = good; same size as the image

The image is prepared as (science − sky) × mask, and ELLIPROF ignores pixels that are exactly 0.

  • --sky and --sky-image can't be used together.
  • A mask or sky image with different dimensions from the science image is an error. Nothing is ever resized, cropped or resampled.
  • Masks can be ordinary FITS images or legacy .dmask bitmaps (BITPIX = 1).

Coordinates: X0, Y0 are in ELLIPROF image coordinates, where the centre of the pixel in FITS column i is at x = i − 0.5. That is half a pixel less than DS9 or FITS pixel numbering.

Other ELLIPROF parameters

Keyword Python Meaning
NITER= niter iterations (default 5, at most 1000)
RLAW= rlaw radius spacing: 0 linear, 1 logarithmic, 2 r^¼ (default)
LINEAR linear fit intensities instead of log intensities
FIXCTR= fixctr 0 free centres, 1 fixed, 2 median centre
ELLIP= ellip force this ellipticity
RMSTAR rmstar reject star-like outliers along each isophote
COS3X= COS4X= cos3x cos4x 3θ/4θ terms in the model (0 none, 1 median, 2 each isophote; COS3X<0 uses 6θ)
TIE= tie smooth the parameters with radius
AVG= avg average a (2n+1)² box when sampling
GAIN= gain iteration gain (default 1)
SCALE= scale arcsec/pixel, recorded in the profile
SKY= elliprof_sky sky used only in ELLIPROF's de Vaucouleurs fit (it does not change the image; use --sky for that)
MODEL model make a model image (-m model.fits)
GC gc globular-cluster mode: circular annuli
VERBOSE verbose print every iteration

OLD, EDIT and TV (interactive options) are not supported.

Output

Option Python result Contents
-o out.prf result.prf_path profile, full precision (elliprof.read_profile)
--csv out.csv result.csv_path fixed-width, comma-separated profile with # provenance lines
--reg out.reg result.reg_path one DS9 ellipse per isophote, no labels
-m model.fits result.model_path model image (with MODEL)

result.profile is a pandas DataFrame with one row per isophote:

Column Meaning
Rmaj semi-major axis (pixels)
x0, y0 isophote centre
I0 mean intensity above the subtracted sky
alpha position angle; the major axis lies at alpha + 90° counter-clockwise from +x
ellip ellipticity 1 − b/a
I3, A3, I4, A4 3θ/4θ amplitude (relative to I0) and phase (degrees)
slope d log I / d log r

To view the fit in DS9: ds9 galaxy.fits -regions profile.reg.

Safety:

  • Invalid input fails immediately with a clear message, before anything runs.
  • The program never waits for keyboard input.
  • A run that takes longer than 30 minutes is stopped. Change the limit with --timeout SECONDS or run_elliprof(..., timeout=...).

elliprof --version and elliprof --diagnostics print version and platform information for bug reports.

Platforms

Platform Status
Linux x86_64, aarch64 (manylinux_2_28) Supported
Linux ppc64le, s390x (manylinux_2_28) Supported (wheels tested under QEMU emulation)
Linux x86_64, aarch64 (musllinux_1_2, e.g. Alpine) Supported
macOS 11+ arm64, x86_64 Supported
Windows x86_64 Supported
Linux riscv64 (manylinux_2_39) Experimental: the wheel builds, but its tests have not completed
Windows ARM64 Experimental: no wheel (no GNU Fortran toolchain yet)

Supported means the wheel was installed and passed the installed-wheel and regression tests in a clean environment without a compiler or CFITSIO. On ppc64le and s390x, PyPI has no numpy or pandas wheels, so install those from your Linux distribution or conda. 32-bit systems and macOS older than 11 are not supported.

Development

brew install gcc cfitsio                  # or: apt install gfortran libcfitsio-dev
pip install -e ".[test]"
make check                                # build and run all tests

The original numerical sources in src/original/ and include/ are never modified, and their SHA-256 hashes are checked on every test run. The test plan is in tests/TEST_PLAN.md.

Known limitations:

  • NR ≤ 100.
  • Isophotes smaller than about 3 pixels have too few samples.
  • GC mode assumes images at most 2048 pixels on a side.
  • The model image is written relative to the subtracted sky.

Historical note: ELLIPROF was originally developed by John Tonry as part of MONSTA.

Maintained by Ehsan Kourkchi (Edwin Kay) Email: ekourkchi@gmail.com

License: MIT for the elliprof package code (see LICENSE). The original ELLIPROF sources and bundled libraries keep their own terms (see THIRD_PARTY_NOTICES.md).

Disclaimer. This software is provided as-is, without warranty of any kind. The maintainer is not responsible for software errors, incorrect scientific results, data loss, or decisions made using results produced by this software. Users are responsible for independently validating results for their scientific application.

Release files for elliprof 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for elliprof 0.1.0
File
elliprof-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
elliprof-0.1.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
elliprof-0.1.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
elliprof-0.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
elliprof-0.1.0-py3-none-manylinux_2_27_s390x.manylinux_2_28_s390x.whl Python 3 none Linux glibc 2.28+ IBM System/390x, Linux glibc 2.27+ IBM System/390x Details
elliprof-0.1.0-py3-none-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl Python 3 none Linux glibc 2.28+ PowerPC 64-le, Linux glibc 2.27+ PowerPC 64-le Details
elliprof-0.1.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details
elliprof-0.1.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
elliprof-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 16.1 MB

Release files / elliprof-0.1.0-py3-none-win_amd64.whl

Download URL elliprof-0.1.0-py3-none-win_amd64.whl
Size 2.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
47a1ad8a02a0c91700a9d32503d7f8be63f51e2927b3cd5614d154ec0e24970b
BLAKE2b-256 checksum
How to use checksums
7a10fb5b4dd45bba368ca1cde3deb7ca6736262540ecbc46bf28d1e0464d32db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-musllinux_1_2_x86_64.whl

Download URL elliprof-0.1.0-py3-none-musllinux_1_2_x86_64.whl
Size 2.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7b6cbe3978a06622bb33f49301675af0bcd144ad029072bb819fb935f6a225e0
BLAKE2b-256 checksum
How to use checksums
b5bd719decbe09b53f59ec2f08a3c59c973869868b6f4b31d558e824106856cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-musllinux_1_2_aarch64.whl

Download URL elliprof-0.1.0-py3-none-musllinux_1_2_aarch64.whl
Size 1.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
458d912df5dc3e96c15dddba96fd7d68c32bda3a9ffabf6864239d265e27d8f3
BLAKE2b-256 checksum
How to use checksums
5dfc0acd8879c6c95d1ca41b54c4eaaca189fbba1393be3b041fddfd80a2c3d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL elliprof-0.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3321fa2e8c6186cc2d46d414874e7be9be4deb223cc90ee819b028bdf427cb8e
BLAKE2b-256 checksum
How to use checksums
494febf929022d2340ae6370a4632634cb92af8efffa7d22a34cc1a2afc3073a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-manylinux_2_27_s390x.manylinux_2_28_s390x.whl

Download URL elliprof-0.1.0-py3-none-manylinux_2_27_s390x.manylinux_2_28_s390x.whl
Size 1.5 MB
Tags Linux glibc 2.27+ IBM System/390x Linux glibc 2.28+ IBM System/390x Python 3
SHA-256 checksum
How to use checksums
2ff20fb7586df20ff09ad19be97d022214763311ed68e4f0582c1f9913e04e1f
BLAKE2b-256 checksum
How to use checksums
8732fc7b1bd1721e0fd00c1bc4b996b97f2c540674ab9986b69e0f50a5bc8d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl

Download URL elliprof-0.1.0-py3-none-manylinux_2_27_ppc64le.manylinux_2_28_ppc64le.whl
Size 1.7 MB
Tags Linux glibc 2.27+ PowerPC 64-le Linux glibc 2.28+ PowerPC 64-le Python 3
SHA-256 checksum
How to use checksums
ccb76b982a6988467d995dec8cc4d4c1d7e8ad8be37cf4dc5e9912d7e51386ce
BLAKE2b-256 checksum
How to use checksums
6ff726c3d020e73990280a43208d4d11fa500c68ce86f5bb581e59eb17edca75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL elliprof-0.1.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 1.2 MB
Tags Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
68a0eb4c0af4d5929d2cab99bb4ba41a91259c251e433d419a6a78b39a73d6db
BLAKE2b-256 checksum
How to use checksums
99b2a99faa7f97e29c894b3f0631d10cd36a9c49ed79f4994566204aa5b25c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-macosx_11_0_x86_64.whl

Download URL elliprof-0.1.0-py3-none-macosx_11_0_x86_64.whl
Size 2.3 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
0ee4a1677fcc7b05867279fb0da4b33e69cc8a19065f34d5c3fa55bf6b5fdd83
BLAKE2b-256 checksum
How to use checksums
749beffef035e1c68743ab9776ee2c295a4a64f0baf9947502331bc73d8dc3a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / elliprof-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL elliprof-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 1.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a6f839b0877c46f6813f337bf0ae145bc719e2b48f6ff1c3edfcca9b1b0d6aeb
BLAKE2b-256 checksum
How to use checksums
f0d70ac66e81da3908e51efe806c106b68367cb8f79086b9a9745d7e1a2634b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

9 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