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 and 10.1007/s00348-021-03145-3


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

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.8-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.9.tar.gz (65.5 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.9-py3-none-any.whl (76.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for shockoscillationanalysis-2.15.9.tar.gz
Algorithm Hash digest
SHA256 eb4d02719ac0445c3c88b8c58ac3af54645476e676de784e93c37e7b25591b8e
MD5 7882bcc8c957a1290dcb6c2005ca039d
BLAKE2b-256 fdc196d4bce070a51bc72f05e99d992dcb86ba1a9bf752509b7e6c982dd2685d

See more details on using hashes here.

File details

Details for the file ShockOscillationAnalysis-2.15.9-py3-none-any.whl.

File metadata

File hashes

Hashes for ShockOscillationAnalysis-2.15.9-py3-none-any.whl
Algorithm Hash digest
SHA256 34c752743221cb556edd75a5efd3533166ceabf91ffa926745dbf6dd07271da7
MD5 6eb5b4e1329c1f932002838ac3a3bbf5
BLAKE2b-256 6613f6c12be7f3e3aa68e72957d0c99ea1e72841570f8fe73985e9705492ca50

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