Skip to content

DEPRECATED : Running All Example Protocols With Multiple Contexts ‐‐ to update

Maxnor899 edited this page Jan 18, 2026 · 1 revision

DEPRECATED --> will be updated

This document describes how to run all example analysis protocols on a single audio file (example.flac) and then generate two different contextual report interpretations for each protocol.

The process is explicitly split into two phases:

  1. Analysis execution (protocol-driven, no context involved)
  2. Report generation (context-driven, no recomputation)

This separation is intentional and fundamental to the project.


Assumptions

  • Entry point: run_analysis.py
  • Audio file: example.flac
  • Protocols directory: examples/protocols/
  • Contexts directory: examples/contexts/
  • Report generator: Generate_Report.py

Common Variables

AUDIO="example.flac"

PROTO_DIR="examples/protocols"
CTX1="examples/contexts/generic_audio.yaml"
CTX2="examples/contexts/synthetic_structures.yaml"

OUT_BASE="output/example"

Phase 1 — Run Analyses (Protocols Only)

Contexts are not used during analysis execution.

python run_analysis.py "$AUDIO" --config "$PROTO_DIR/01_temporal.yaml"        --output "$OUT_BASE/01_temporal"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/02_spectral.yaml"        --output "$OUT_BASE/02_spectral"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/03_time_frequency.yaml"  --output "$OUT_BASE/03_time_frequency"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/04_modulation.yaml"      --output "$OUT_BASE/04_modulation"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/05_information.yaml"     --output "$OUT_BASE/05_information"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/06_inter_channel.yaml"   --output "$OUT_BASE/06_inter_channel"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/07_steganography.yaml"   --output "$OUT_BASE/07_steganography"
python run_analysis.py "$AUDIO" --config "$PROTO_DIR/08_meta_analysis.yaml"   --output "$OUT_BASE/08_meta_analysis"

Each output directory now contains:

  • results.json
  • optional visualizations
  • config_used.json
  • generated visualizations (PNG images) when visualization is enabled

Generated Visualizations

When visualization.enabled: true is set in the protocol configuration, the analysis phase automatically generates PNG image files.

These images include, depending on the protocol:

  • waveforms
  • spectra
  • time–frequency representations (STFT, CQT, wavelets)
  • modulation plots
  • inter-channel relationship plots

Images are saved in:

output/<run_name>/visualizations/

Visualization generation is independent from report generation. Images are produced once and reused for all contextual reports.

Phase 2 — Generate Reports With Contexts

The report generator writes files into the same directory as results.json. To preserve multiple contexts, the output directory must be duplicated.

Example — Temporal Protocol

# Context 1: generic audio
cp -r "$OUT_BASE/01_temporal" "$OUT_BASE/01_temporal__ctx_generic"
python Generate_Report.py "$OUT_BASE/01_temporal__ctx_generic"   --protocol "$PROTO_DIR/01_temporal.yaml"   --context "$CTX1"

# Context 2: synthetic structures
cp -r "$OUT_BASE/01_temporal" "$OUT_BASE/01_temporal__ctx_synthetic"
python Generate_Report.py "$OUT_BASE/01_temporal__ctx_synthetic"   --protocol "$PROTO_DIR/01_temporal.yaml"   --context "$CTX2"

Full Batch Example (All Protocols)

for P in 01_temporal 02_spectral 03_time_frequency 04_modulation 05_information 06_inter_channel 07_steganography 08_meta_analysis
do
  cp -r "$OUT_BASE/$P" "$OUT_BASE/${P}__ctx_generic"
  python Generate_Report.py "$OUT_BASE/${P}__ctx_generic"     --protocol "$PROTO_DIR/${P}.yaml"     --context "$CTX1"

  cp -r "$OUT_BASE/$P" "$OUT_BASE/${P}__ctx_synthetic"
  python Generate_Report.py "$OUT_BASE/${P}__ctx_synthetic"     --protocol "$PROTO_DIR/${P}.yaml"     --context "$CTX2"
done

Resulting Directory Structure

output/example/
  01_temporal/
    results.json
  01_temporal__ctx_generic/
    01_MEASUREMENT_SUMMARY.md
    02_METHODOLOGY_AND_READING_GUIDE.md
    03_CONTEXTUAL_POSITIONING.md
  01_temporal__ctx_synthetic/
    ...

The same structure applies to all other protocols.


Key Principles Recap

  • Protocols define what is measured
  • Contexts define how measurements are positioned
  • Analyses are executed once
  • Reports can be regenerated indefinitely
  • Interpretation remains external and human