Skip to main content

No project description provided

Project description

DOI Documentation Status License: MIT PyPI - Version

Shock Tracking Library

Overview

The instability of shock waves due to induced separation presents a significant challenge in aerodynamics. Accurately predicting shock wave instability is crucial for reducing vibrations and noise generation. The high-speed schlieren technique, valued for its simplicity, affordability, and non-intrusiveness, is crucial for understanding flow patterns in linear cascades.

This Python package introduces an advanced method that employs line-scanning to detect and track shock waves from large series of schlieren images. It includes an adaptive feedback system to handle uncertainties in shock detection and is compatible with supervised learning and AI workflows. The method is capable of identifying and analyzing different types of shocks, even in low-resolution or visually degraded images.

The method's performance has been validated in a transonic fan passage test section and a supercritical A320 wing profile under varying Reynolds numbers and oscillation conditions.

For scientific details and benchmarking, please refer to the article:
"Advancements in Shock-Wave Analysis and Tracking from Schlieren Imaging"
DOI: 10.2139/ssrn.4797840


drawing drawing

Key Features

  • Three robust shock tracking methods:

    • integral: Based on maximum blocked light intensity.
    • darkest_spot: Tracks absolute minimum intensity.
    • maxGrad: Uses Sobel gradient to locate shock edge.
  • Adaptive outlier detection using RANSAC and Tukey's fences.

  • Confidence estimation via t-distribution and standard error for shock angle.

  • Weighted vs. arithmetic averaging for better estimation accuracy.

  • Automatic feedback system for detecting uncertain shock positions.

  • Visual tools for tracking and comparing shock signals.


What's New in This Release

Code Enhancements

  • Improved code style according to PEP 8

  • Defined universal units:

    SOA.univ_unit = {'freq': 'fps', 'dis': 'mm', 'angle': 'deg'}
    
  • Abort preview with ESC or continue with any key.

  • Logging all tracking activities using:

    SOA.log(log_message: str, directory_path: str)
    

Improved generating slice list array sliceListGenerator.GenerateSliceArray:

  • Define number of tracking points: npnts=n

  • Slice thickness in pixels or universal units: slice_thickness =[5.5, 'mm']

  • Custom vertical range: sat_vr = [-5.5, 3, 'mm']

  • avg_shock_loc now uses coordinate tuple (x, y)

Improved shock angle estimation inc_tracking.InclinedShockTracking

  • RANSAC for better fitting

  • Enhanced cached metadata and filename comments

  • Confidence estimation: conf_interval=0.95

  • Histogram plotting with confidence stats

  • Weighted average using slope std and error

see more in this tutorial

Visualization Upgrades

  • Custom point size: points_size=12

  • Confidence/prediction bands:

    • conf_color, conf_range_opacity

    • pred_color, pred_range_opacity

  • Custom background image:

    op_bg_path, bg_y_crop, bg_x_crop, bg_resize, bg_90rotate

  • Rotate output: op_90rotate=True

  • Use nReviewas an integer or tuple: (start, end, step) - applicable only with inc_tracking.ShockPointsTracking

Output Format Improvements

  • avg_shock_angle:

    [arith_avg, arith_conf, weight_avg, weight_conf, std_dev]

  • avg_shock_loc:

    [loc_avg, loc_conf, std_dev]

Function Optimizations

Improved: SOA.extract_coordinates, v_least_squares

Robust File Handling

Crop X: crop_x_img, Crop Y: crop_y_img, Resize: resize_img

Bug Fixes

  • Handle images without scale in sliceListGenerator.GenerateSliceArray

  • Fix corner cases in v_least_squares

  • Robust angle estimation even with missing slices ShockTraking

  • Fixed circular import issue using constent.py

  • Also, InclinedLine, AvgAnglePlot, InclinedShockDomainSetup

Installation

To install Shock Tracking Liberary from pip you can use:
pip install ShockOscillationAnalysis

Alternatively, you can also clone the repository manually by running:
git clone https://github.com/EngAhmedHady/ShockTrackingLibrary.git

Then install the package using:
pip3 install dist\ShockOscillationAnalysis-2.15.9-py3-none-any.whl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shockoscillationanalysis-2.15.10.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shockoscillationanalysis-2.15.10-py3-none-any.whl (76.5 kB view details)

Uploaded Python 3

File details

Details for the file shockoscillationanalysis-2.15.10.tar.gz.

File metadata

File hashes

Hashes for shockoscillationanalysis-2.15.10.tar.gz
Algorithm Hash digest
SHA256 b464812793e13f503e71bcd34aaaf1eab56056f9d2fd80d7751ab7625f6b6bdf
MD5 4a288ab29aed08e37aab549405dc2c25
BLAKE2b-256 130575a2954d8557c4ace6dcb242926ff7c0f12c9281e6c5028e1ef1ffbf2453

See more details on using hashes here.

File details

Details for the file shockoscillationanalysis-2.15.10-py3-none-any.whl.

File metadata

File hashes

Hashes for shockoscillationanalysis-2.15.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4abf9452341f9a0fe7f9cc00c4294e537c74c1a48e98cff0a773d2903bacb2ea
MD5 0a504136c50dde468f39398d9de988e0
BLAKE2b-256 173ac0f270999125b6804351458d559850d2991d1bc68a717b2785e8add8cd47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page