Python tools for CIISCO/CISCO analysis on solar image sequences.
Project description
CISCOPy
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.NDCubeor a list ofNDCubeobjects
Implementation choices in this package favor existing, standard tools:
sunpy.mapfor 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
astropyfor FITS/WCS/time/table supportscipy.ndimagefor interpolation, filtering, morphology, and edge detectionnumpyfor 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 outputciscopy.write_table: write results to.csv,.ecsv,.tsv, or.txtciscopy.write_cme_movie: write a compact MP4 movie for a detected candidateciscopy.downsample_sequence: reduce large image sequences before analysisciscopy.normalize_input: normalize FITS paths, arrays, headers/WCS, andndcubeciscopy.load_fits_sequence: load a list of FITS files into a common sequence containerciscopy.mask_disk: mask the solar disk using header metadata or explicit scalingciscopy.polar_transform: convert a Cartesian image into a polar map usingscipy.ndimage.map_coordinatesciscopy.azimuthal_radial_intensity: compute an annular radial intensity profileciscopy.CISCO.from_input(...).characterize(): run the end-to-end CME characterization pipeline
Preset support includes:
AIA171 and 304 ASolar Orbiter FSI174 and 304 ASWAP174 AEUVI304 ALASCOC2 and C3STEREOCOR1 and COR2Solar OrbiterMETISGOESSUVIMLSOK-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:
.mp4at 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:
datestart_timeposition_anglewidthspeeddel_speedspeed_minspeed_maxaccelerationdel_accelerationacceleration_minacceleration_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:
- Normalize inputs into a common sequence container.
- Estimate a minimum background and a radially symmetric background.
- Apply disk masking and intensity normalization.
- Convert the sequence to polar coordinates, preferring SunPy's helioprojective-radial reprojection when available.
- Build height-time maps and apply Fourier motion filtering.
- Detect candidate CME regions in angle-time space.
- Estimate CME kinematics with a parabolic Hough-style characterization step.
Polar-angle convention:
- solar north is
0degrees - angles increase counterclockwise
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ciscopy-0.0.1.tar.gz.
File metadata
- Download URL: ciscopy-0.0.1.tar.gz
- Upload date:
- Size: 75.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaf8eaf66a2113d7bd3fb0d6b7bcaa0cb81ef4326d5a1468ff90727fe9dbbd51
|
|
| MD5 |
c51440c482c069363bd5fcbe40df1b42
|
|
| BLAKE2b-256 |
987f81b33450177c918ca8c256f87ae52f88cc5299a6a397983d9c7df28bc420
|
Provenance
The following attestation bundles were made for ciscopy-0.0.1.tar.gz:
Publisher:
python-publish.yaml on jmbhughes/CISCOPy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciscopy-0.0.1.tar.gz -
Subject digest:
eaf8eaf66a2113d7bd3fb0d6b7bcaa0cb81ef4326d5a1468ff90727fe9dbbd51 - Sigstore transparency entry: 1524634717
- Sigstore integration time:
-
Permalink:
jmbhughes/CISCOPy@11dbd2d4bcbc9c735b594cca956ff6e7f3362747 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/jmbhughes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yaml@11dbd2d4bcbc9c735b594cca956ff6e7f3362747 -
Trigger Event:
release
-
Statement type: