Bed Surface Profiling (BSP) data used for calculating pickup probability
Description
Bed Surface Profiling (BSP) data
The Bed Surface Profiling (BSP) data scanned by an underwater 3D laser scanner for different flow conditions (Case Nos. 1-12). The sampling rate was 10 Hz. Each line of data corresponds to the xyz point cloud data, where x-direction corresponds to streamwise direction, y-direction to trnasverse dirction, and z-dirction to vertical direction.
Code
A python code is included to process the BSP data for calculating sediment pickup probability for each case. This code analyzes 12 case files (Case1.txt to Case12.txt) containing measurement data, processes them using dynamic denoising filters, and calculates a derived metric (p_value) for each case. The results are saved in an Excel file.
Key Components
-
Dynamic Denoising Filter (
dynamic_denoise_filter):- Implements two filtering schemes based on parameter
d:- 3-Window Rule (
d=0.00185): Checks immediate neighbors (previous and next columns) to correct 0, 1, or -1 values. - 11-Window Rule (
d=0.00380): Uses a larger window (11 columns) with different criteria:- For zeros: Requires immediate neighbors (columns 4 and 6) to be zero.
- For ±1: Requires all non-center columns (first 5 and last 5) to match the target value.
- 3-Window Rule (
- Implements two filtering schemes based on parameter
-
Case Processing (
process_case):- Data Loading: Reads CSV-like files, extracts
y(2nd column) andz(3rd column) values. - Derivative Calculation: Computes
dzas the finite difference ofzvalues scaled byd. - Marker Matrix: Creates a matrix
mmarking regions wheredzexceeds ±0. - Denoising: Applies
dynamic_denoise_filterto clean the marker matrix. - p-value Calculation:
- Computes
y_diffas half the absolute difference between adjacentyvalues. - Identifies valid transitions (1 → -1) in the denoised matrix.
- Aggregates weighted counts and normalizes by the total
yrange.
- Computes
- Data Loading: Reads CSV-like files, extracts
-
Parameter Settings:
- **
dValues**:0.00185for Cases 1–60.00380for Cases 7–12
- Critical Value (
cr): Set to 0 for thresholdingdz. - Data Directory: Configured as
D:/data_ana_ca.
- **
-
Output:
- Results are saved in
analysis_result_ca_cr.xlsxwith columnsCaseandp_value.
- Results are saved in
Usage
- Input: 12 text files (
Case1.txttoCase12.txt) with comma-separated data. - Output: Excel file containing calculated p-values.
- Runtime Monitoring: Prints processing time for each case during execution.
The code efficiently handles large datasets using vectorized operations and sliding window techniques, ensuring scalability for similar analytical tasks.
Files
calculate_pickup_probability_from_bed_level_data.ipynb
Files
(2.2 GB)
| Name | Size | Download all |
|---|---|---|
|
md5:5f9230281f289a61929e1b54644d70d2
|
5.5 kB | Preview Download |
|
md5:fb7a4d2844335c71438b3cdb41c7597f
|
187.6 MB | Preview Download |
|
md5:ef02c0093c2f9dbf37d7c649bb788372
|
177.4 MB | Preview Download |
|
md5:767e694a6c7144386aae10c4075daa23
|
183.0 MB | Preview Download |
|
md5:754468d738520e30aa09114268ead29f
|
169.6 MB | Preview Download |
|
md5:f3d35014d49d0a4eaad030396e6f1294
|
182.5 MB | Preview Download |
|
md5:66c55ef2b492943da0b3b26dce677ea5
|
187.9 MB | Preview Download |
|
md5:f208b8eb9fad8caeb9a32493dd8703c9
|
188.8 MB | Preview Download |
|
md5:826d209af00b06ccca044716139125d1
|
199.3 MB | Preview Download |
|
md5:51bd3730b73445687c6262f85509231c
|
184.6 MB | Preview Download |
|
md5:e98b234fdaed4b7e60949ec189e67544
|
178.7 MB | Preview Download |
|
md5:24c535450afc19cc805186af7d594312
|
182.6 MB | Preview Download |
|
md5:ba2116da998efe6a087f8c614c76020a
|
182.4 MB | Preview Download |