Skip to content

v0.3: Unified 3-Phase Multi-Electrode Beamtime Multiplier, REV Binning & Numerical Z-Compression Baselines - #1

Open
jameslehoux wants to merge 8 commits into
feature/carbon-conditional-diffusionfrom
feature/paper-ready-conditional
Open

jameslehoux wants to merge 8 commits into
feature/carbon-conditional-diffusionfrom
feature/paper-ready-conditional

Conversation

@jameslehoux

@jameslehoux jameslehoux commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Overview (v0.3 — The Synchrotron Beamtime Multiplier)

Upgrades PorousDiff on feature/paper-ready-conditional into a Unified Multi-Electrode, 3-Phase, Physical-REV Compression Surrogate across Virgin Carbon Felt (virgin_carbon), $\text{TiO}_2$-coated Carbon Felt Anode (tio2_anode), Copper Hexacyanoferrate Coated Cathode (cuhcf_cathode), and independent cross-resolution DLS K11 DIAD scans.

Key Highlights

  1. 3-Phase Calibration, REV Binning & Spyder Preview (porousdiff/preprocessing.py, prepare_local_drive_bundle.py):
    • Pore-gated plateau-centered Otsu + 1D IsoData half-maximum calibration (calibrate_multiphase_thresholds, segment_slice_multiphase) separating {0: pore, 1: carbon_fiber, 2: active_coating} without 80–95% pore bias or high-$Z$ CuHCF skew.
    • Topology- and volume-fraction-conserving downsample_volume_rev (--spatial-bin 2 / 3) enlarging $96^3$ patches to $2\times$–$3\times$ physical REV (~20–30 fiber diameters).
    • CalibrationMetadata (--voxel-size-um, --kpa-per-mvv, --beamline) + ~10-second --preview-only Spyder overlay (qa/multiphase_overlay_diagnostic.png).
  2. Literature Numerical Z-Compression Baselines (porousdiff/baselines.py):
    • affine_z_compress_to_target (affine Z-resampling + calibrated signed-distance threshold) and pillar_pore_deletion_compress (stochastic XY-column pore-layer removal) supporting both 2-phase and 3-phase volumes.
  3. Hierarchical 2-Channel 3-Phase Encoding & Multi-Modal Conditioning (porousdiff/data.py, porousdiff/models.py):
    • Hierarchical [c_solid, c_coating] encoding in {-1, +1} aligns Channel 0 (total solid vs. pore) across 2-phase Virgin Felt and 3-phase $\text{TiO}_2$/CuHCF so dense Virgin scans transfer scaffold mechanics to sparse (2–3 load) coated-electrode beamtime schedules; decode_channels_to_phases prevents floating unattached coating artifacts.
    • MultiModalConditionEmbedder jointly embeds normalized stress/load + material_id + log(dx / dx_ref) voxel size into temb and spatial conditioning channels.
  4. 3-Phase Electrochemical Interfacial Metrics & Head-to-Head Benchmark (porousdiff/metrics.py, evaluate_beamtime_multiplier.py, slurm/run_beamtime_multiplier.slurm):
    • Computes EASA (ssa_pore_coating), Triple-Phase Boundary density (tpb_density), electronically wired coating fraction (wired_coating_fraction), directional tortuosity, and multi-phase OpenImpala TIFF export ({0, 1, 2}).
    • Automated benchmark comparing Real Held-Out XCT vs. affine_z_squash vs. pillar_pore_deletion vs. Dense/Few-Shot PorousDiff (beamtime_multiplier_report.json, baseline_vs_porousdiff_table.csv, beamtime_multiplier_comparison.{png,pdf}).

Verification

  • python -m compileall porousdiff scripts tests
  • bash -n slurm/*.slurm
  • pytest -v (19 passed, 1 skipped across unit, analytical TPB/EASA, numerical Z-compression baseline, and end-to-end multi-electrode CLI tests)

@jameslehoux jameslehoux changed the title Calibrated XCT preprocessing, multi-scale continuous load conditioning & 3D physics validation v0.3: Unified 3-Phase Multi-Electrode Beamtime Multiplier, REV Binning & Numerical Z-Compression Baselines Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant