Afm Secm Correlation Tools 1.0.0

v1.0.0

Analyzes and correlates AFM topography and SECM activity data to identify microscale structure–activity relationships in electrocatalysis research.

0· 77·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for xrayxiaoruiyang-pixel/afm-secm-correlation-tools-1-0-0.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Afm Secm Correlation Tools 1.0.0" (xrayxiaoruiyang-pixel/afm-secm-correlation-tools-1-0-0) from ClawHub.
Skill page: https://clawhub.ai/xrayxiaoruiyang-pixel/afm-secm-correlation-tools-1-0-0
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install afm-secm-correlation-tools-1-0-0

ClawHub CLI

Package manager switcher

npx clawhub@latest install afm-secm-correlation-tools-1-0-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description, SKILL.md capabilities, dependency list (numpy, scipy, pandas, scikit-image, opencv, matplotlib) and the included Python file all align with a local data-analysis tool for AFM and SECM data. There are no environment variables, service credentials, or unrelated binaries required.
Instruction Scope
Runtime instructions are limited to running the included Python script on user-supplied AFM/SECM files and writing outputs (figures, CSV, markdown). However, the code silently falls back to generating synthetic AFM/SECM data if parsing fails (read_afm_spm/read_secm_generic), which can produce plausible-looking results without alerting the user; users should be aware and verify that their input files were actually parsed rather than replaced by synthetic data. The instructions do not emphasize this behavior or require explicit validation steps.
Install Mechanism
This is an instruction-only skill with a single Python file; there is no install spec, no network downloads or installers. Dependencies are standard Python scientific packages; installing them is the user's responsibility and is expected for the stated purpose.
Credentials
The skill requests no environment variables, credentials, or config paths. The declared dependencies are appropriate for local numerical/image processing and plotting; there are no requests for unrelated secrets or cloud access.
Persistence & Privilege
Skill has no elevated persistence flags (always:false). It does not modify other skills or system-wide configuration. It reads user-supplied files and writes outputs to a user-specified output directory only.
Assessment
This skill appears to do what it claims: local AFM/SECM correlation analysis with standard scientific Python libs. Before relying on results: (1) verify that your input files were actually parsed (check logs or inspect outputs) because the code will silently generate synthetic test maps if it cannot parse a file; (2) run it on a known test dataset to confirm behavior; (3) install dependencies from trusted sources (pip/conda) and run in a controlled environment (virtualenv/conda) if you are cautious; (4) inspect output files (CSV/figures) and check metadata (e.g., reported scan_size) to ensure units and sizes were interpreted correctly. If you need stronger guarantees, request explicit parsing-error reporting / fail-on-parse-failure behavior from the maintainer or modify the script to raise errors instead of falling back to synthetic data.

Like a lobster shell, security has layers — review code before you run it.

latestvk978ce9g2s53kzbdcd1t25yams852jaa
77downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

afm-secm-correlation-tools-1.0.0

AFM topography + SECM electrochemical activity correlation analyzer for electrocatalysis research.

Overview

Combines atomic force microscopy (AFM) surface morphology data with scanning electrochemical microscopy (SECM) activity maps to reveal structure–activity relationships at the microscale. Identifies whether high electrochemical activity hotspots correspond to topographic features (particles, edges, grain boundaries) or are driven by chemical/electronic factors alone.

Capabilities

1. Data Import

  • AFM: SPI (.spm), JPK (.jpk Force Map), NT-MDT (.md), Asylum MFP-3D (.txt/.csv), Bruker (.ps), generic CSV (X/Y/Height/Z)
  • SECM: CSV grid (X/Y/current), ASCII raster, CH Instruments, BioLogic, JPK, custom formats
  • Auto-detects scan size, resolution, units (nm/μm/Å)

2. Image Preprocessing

  • Leveling (1st/2nd order plane fit), flatten rows/columns
  • Gaussian low-pass filter (remove high-frequency noise)
  • Sharpen (Laplacian kernel) for edge enhancement
  • Remove bow/tilt artifacts

3. Morphology Feature Extraction

  • Roughness parameters: Ra (arithmetic), Rq (RMS), Rz (ten-point height), Rmax
  • Grain segmentation (watershed algorithm), grain size distribution (mean Feret diameter)
  • Particle detection: height threshold → equivalent circle diameter, aspect ratio, circularity
  • Edge/boundary density: detected as high-gradient zones (∇z threshold)
  • Bearing ratio and surface area ratio (complexity factor)

4. SECM Activity Map Processing

  • Background subtraction (median filter), IQR outlier removal
  • Normalization: min-max / z-score / relative to macroelectrode reference
  • Hotspot detection: top 5–10% pixels (configurable threshold)
  • Cross-section profile extraction (horizontal/vertical cuts)

5. AFM–SECM Co-registration & Correlation

  • Spatial overlay: AFM topography heatmap + SECM activity contour, shared colorbar
  • Scatter plot: local roughness (Ra in 8×8 windows) vs local SECM current, Pearson/Spearman r
  • Topographic masking: correlation computed only where AFM height > grain boundary threshold
  • Hotspot mapping: overlay AFM-detected particles with SECM hotspots → particle-activity contingency table
  • Dual-Y time-series: tip position along cross-section vs height and current simultaneously
  • Correlation coefficient classification: r < 0.3 (uncorrelated), 0.3–0.6 (moderate), > 0.6 (strong)

6. Reference Databases

  • Built-in AFM tips: OLTEP (Au 111), PPP- kont AFMSPA (Si), SNL-10 (soft),q
  • Built-in SECM tips: Pt ultramicroelectrode (10 μm), carbon fiber (10 μm), Au nanoelectrode (1 μm)
  • Reaction type references: OER_NiOOH, HER_Pt, ORR_Au, CO2RR_Cu, Fe(CN)6³⁻/⁴⁻
  • AFM roughness thresholds: Ra < 1 nm (ultrasmooth), 1–5 nm (smooth), 5–20 nm (rough), > 20 nm (very rough)

7. Output

  • PNG 6-panel correlation dashboard (AFM / SECM / overlay / scatter / profile / statistics)
  • Topographic feature table: grain size, particle density, edge density, activity
  • Correlation summary CSV: r_Pearson, r_Spearman, p-value, N_windows
  • Markdown full report with figure captions

Usage

# Full analysis with AFM + SECM files
python afm_secm_correlation.py \
  --afm scan_afm.spm \
  --secm secm_map.csv \
  --output output_afm_secm/ \
  --afm-height-unit nm \
  --secm-current-unit nA \
  --secm-tip-diameter 10 \
  --reaction-type OER_NiOOH

# Quick correlation scatter plot only
python afm_secm_correlation.py \
  --afm scan_afm.spm \
  --secm secm_map.csv \
  --mode scatter \
  --output quick_corr/

# Grid correlation (8x8 windows)
python afm_secm_correlation.py \
  --afm scan_afm.spm \
  --secm secm_map.csv \
  --mode grid-corr \
  --window-size 8 \
  --output grid_corr/

File Formats

InstrumentAFM FormatSECM Format
Asylum MFP-3D.ibw, .txtCSV grid
JPK Instruments.jpkCSV grid
Bruker / Veeco.spm, .000ASCII
NT-MDT.md, .msrCSV
CH Instruments.jdx
BioLogic.mpt
GenericCSV (X/Y/Z)CSV (X/Y/I)

Dependencies

  • numpy, scipy, matplotlib, pandas, scikit-image, lmfit, opencv-python (cv2)

Comments

Loading comments...