Skip to main content

CISCOPy

codecov

CIISCO in Python with generalizations to more data.

CISCOPy is a Python package for CIISCO/CISCO-style analysis of solar image sequences. It is being built from the legacy IDL implementation together with the method described by Patel et al. (2021), using standard scientific Python tools where possible.

Installation

Standard install:

python -m pip install .

Install from requirements:

python -m pip install -r requirements.txt
python -m pip install -e .

Development install:

python -m pip install -r requirements-dev.txt
python -m pip install -e .

The package accepts:

  • a list of FITS file paths
  • a 2D image or 3D image cube as a NumPy array
  • an image cube plus FITS headers and/or WCS objects
  • a single ndcube.NDCube or a list of NDCube objects

Implementation choices in this package favor existing, standard tools:

  • sunpy.map for solar-map aware data handling when FITS headers are available
  • SunPy helioprojective-radial reprojection for solar-north-aware Cartesian-to-polar conversion when the map stack is available
  • astropy for FITS/WCS/time/table support
  • scipy.ndimage for interpolation, filtering, morphology, and edge detection
  • numpy for array processing and FFT-based motion filtering

Current API

import ciscopy

result = ciscopy.main(
    cube,
    header=headers,
    output_path="cme_results.csv",
)
table = result.table

Available utilities:

  • ciscopy.main: top-level entry point that runs the pipeline and optionally writes output
  • ciscopy.write_table: write results to .csv, .ecsv, .tsv, or .txt
  • ciscopy.write_cme_movie: write a compact MP4 movie for a detected candidate
  • ciscopy.downsample_sequence: reduce large image sequences before analysis
  • ciscopy.normalize_input: normalize FITS paths, arrays, headers/WCS, and ndcube
  • ciscopy.load_fits_sequence: load a list of FITS files into a common sequence container
  • ciscopy.mask_disk: mask the solar disk using header metadata or explicit scaling
  • ciscopy.polar_transform: convert a Cartesian image into a polar map using scipy.ndimage.map_coordinates
  • ciscopy.azimuthal_radial_intensity: compute an annular radial intensity profile
  • ciscopy.CISCO.from_input(...).characterize(): run the end-to-end CME characterization pipeline

Preset support includes:

  • AIA 171 and 304 A
  • Solar Orbiter FSI 174 and 304 A
  • SWAP 174 A
  • EUVI 304 A
  • LASCO C2 and C3
  • STEREO COR1 and COR2
  • Solar Orbiter METIS
  • GOES SUVI
  • MLSO K-Coronagraph

Unknown instruments still work through the generic path as long as the data can be represented with image arrays plus reasonable FITS headers and/or WCS. For instruments like Solar Orbiter FSI, where the apparent solar size changes with spacecraft distance, the preset stays in solar-radii units and the actual pixel-space radial bounds are computed from the image metadata at runtime. By default, the pipeline also downsamples large images because the algorithm is designed for large-scale structures; this can be turned off manually. When FITS paths are used, the loader checks the primary HDU first and then automatically falls back to the first 2D image extension if the primary HDU is empty, which is useful for products such as Solar Orbiter EUI/FSI. For older LASCO-style headers with sparse solar metadata, the package warns and fills standard solar-radius / Earth-observer assumptions so processing can continue.

End-to-End Example

from ciscopy import main

result = main(
    fits_paths,
    preset="lasco_c2",
    output_path="cme_results.csv",
    make_movie=True,
    movie_output_path="cme_event.mp4",
    reduce_resolution=True,
)
table = result.table
processed = result.processed

print(table["date", "start_time", "position_angle", "width", "speed", "acceleration"])

Supported text output formats:

  • .csv
  • .ecsv
  • .tsv
  • .txt

Movie output:

  • .mp4 at compact 256x256 rendering by default
  • overlays the detected position angle, angular width, and event time span
  • uses the fitted height-time ridge to determine the event end time

The output table contains:

  • date
  • start_time
  • position_angle
  • width
  • speed
  • del_speed
  • speed_min
  • speed_max
  • acceleration
  • del_acceleration
  • acceleration_min
  • acceleration_max

Scientific Reference

The method is based on Patel et al. 2021:

Pipeline Outline

The current end-to-end pipeline follows the same broad stages as the IDL workflow and paper:

  1. Normalize inputs into a common sequence container.
  2. Estimate a minimum background and a radially symmetric background.
  3. Apply disk masking and intensity normalization.
  4. Convert the sequence to polar coordinates, preferring SunPy's helioprojective-radial reprojection when available.
  5. Build height-time maps and apply Fourier motion filtering.
  6. Detect candidate CME regions in angle-time space.
  7. Estimate CME kinematics with a parabolic Hough-style characterization step.

Polar-angle convention:

  • solar north is 0 degrees
  • angles increase counterclockwise

Metadata

Release files for ciscopy 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 ciscopy 0.0.1
File Size Uploaded Provenance Actions
ciscopy-0.0.1.tar.gz 75.0 kB With provenance Details for ciscopy-0.0.1.tar.gz

Release files / ciscopy-0.0.1.tar.gz

Download URL ciscopy-0.0.1.tar.gz
Size 75.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eaf8eaf66a2113d7bd3fb0d6b7bcaa0cb81ef4326d5a1468ff90727fe9dbbd51
BLAKE2b-256 checksum
How to use checksums
987f81b33450177c918ca8c256f87ae52f88cc5299a6a397983d9c7df28bc420
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 13, 2026.

Transparency log

Security for ciscopy 0.0.1

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.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for ciscopy-0.0.1.tar.gz

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 May 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file Full provenance

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