Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

ebsd-magus

Latest version: v2.0.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: kerzel
1 Versions

Scan summary

ebsd-magus was last scanned on 27 Nov 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 27 Nov 2026.
  • Findings: No rules fired in version 2.0.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.0 LATEST 27 Nov 2026 No rules fired

No rules fired in 2.0.0

Findings

Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

EBSDmagus

Introduction

EBSDmagus orchestrates EMsoft-based EBSD simulations on HPC clusters. EMsoft provides the Monte Carlo and masterpattern solvers; EBSDmagus layers a Snakemake-directed DAG and a lightweight SQLite database on top to manage parameter sweeps, stage dependencies, SLURM submission, recovery, and analytics. Parameter sweeps quickly explode into dozens of jobs with ordering constraints (e.g., masterpattern depends on Monte Carlo outputs). Snakemake resolves these as a DAG, submits cluster-aware jobs, and EBSDmagus validates artifacts (NML/.h5/.done) and summarizes outcomes. The aim is reproducible, large-scale EBSD workflows—generate NMLs, queue jobs with appropriate resources, and track results end-to-end. Licensed under MIT.

For the EBSDmagus method and its supporting research records, see the journal article and the Zenodo deposit.

Start here

  • New to the project: read Getting started first. It explains the Monte Carlo → masterpattern → screen-pattern chain, the role of workflow.db, and the normal ebsdm prepare → ebsdm check → ebsdm submit path.
  • Running on a cluster that is not RWTH: read docs/cluster_setup.rst before submitting. RWTH examples are included as tested references, but partitions, accounts, shells, module names, and EMsoft paths are site-specific.
  • Something went wrong: read docs/troubleshooting.rst before changing job statuses. It lists dry-run-first diagnostics, SLURM checks, artifact checks, and recovery commands.
  • Developing the workflow internals: read docs/technical_architecture.rst. It explains Jinja templating, workflow generation, database helpers, Snakemake/SLURM contracts, artifact verification, and extension points.
  • Choosing a workflow config or profile: read docs/examples.rst. It separates beginner examples, RWTH site examples, DAG demos, benchmark recipes, and archived validation fixtures.
  • Using only conversion/inspection tools: see docs/tools.rst.
  • Using the terminal UI: see docs/gui.rst.
  • Upgrading from v1.3: see the 2.0.0 release notes.

Key point: done is a workflow state, not a scientific verdict. It means the runtime checks found the expected outputs. Those checks are cheap and structural: scheduler and executable status, the .done file, the expected HDF5 paths, readable non-empty HDF5 files and the required datasets for each stage. They do not judge EBSD signal quality, physical plausibility, convergence or whether results are ready to publish. That still needs review by a domain expert.

Setup

Requirements

Python ≥3.12,\<4.0 and a working EMsoft install (EMsoftinit run; $HOME/.config/EMsoft/EMsoftConfig.json set with EMdatapathname, etc.). Use EMOpenCLinfo to pick GPU platid/devid.

EMEBSD input note (screen_pattern)

The older EMsoft wiki example (https://github.com/EMsoft-org/EMsoft/wiki/EBSD-Example) shows omega in &EBSDdata, but current EMEBSD no longer accepts that key. Do not add omega to sp_template.nml.j2/screen-pattern inputs, or the run fails with Cannot match namelist object name omega.

Install the CLI

Run python -m pip install ebsd-magus==2.0.0 in an isolated environment. Use the checkout for the workflow examples and site profiles.

Install from the checkout

Run poetry install (add --with dev if you want Sphinx docs).

Profiles/config

Copy user_profiles/default.yaml → user_profiles/<name>.yaml, set paths/resources. When a tool passes an explicit config directory, profiles are resolved from that directory first; top-level user_profiles/ remains a convenience fallback for implicit repo-root runs. The selected profile path is printed to stderr. paths.repo_root defaults to ${REPO_ROOT:-$HOME/Repositories/ebsdmagus}; paths.template_dir defaults to packaged templates. Sample workflow configs live under workflow_configs/.

Normal workflow commands

Edit a workflow YAML, then run:

poetry run ebsdm prepare --config workflow_configs/<run>.yaml --profile <site-or-user>
poetry run ebsdm check --preflight
poetry run ebsdm submit            # preview only
poetry run ebsdm submit --confirm  # submits to SLURM
poetry run ebsdm post-run-check    # read-only report after jobs finish

prepare reads the project identity from workflow_config.project_name, writes a run-local Snakemake config under hpc_runs/<project>/config/snakemake_config.yaml, and records the active run in .ebsdm_active_run.json. A legacy --project <project> argument is accepted only when it matches the YAML. Later ebsdm commands and the TUI reuse the manifest so routine users do not need to know Snakemake --configfile or cluster-generic adapter details.

Crystal checks during preparation

ebsdm prepare checks every XTAL before it generates jobs. By default, it stops if a stored coordinate lies outside the unit cell or an XTAL cannot be read. For off-host staging, --coordinate-check advisory can continue if the unavailable XTAL has no crystal_references entry. A known bad coordinate still stops Prepare. A crystal reference starts a separate comparison and can lead to a review request. The Prepare guide explains how to record a review and lists what the checks do not cover. cif2xtal checks a CIF before it writes the XTAL and reports Accept, Stop or Investigate. The crystal review tutorial walks through an example.

TUI crystal review

Setup → Prepare runs the same checks and shows their results before preparing. When Setup offers a review, enter a reason and a new review file, or select an existing review. Cancel or Escape leaves the active run unchanged, and Reassess only reads the inputs again. The attempted campaign stays selected for a retry. A run prepared with a review is marked as acknowledged, and its findings appear under Active crystal evidence (historical).

Environment variables

Do not export REPO_ROOT, POETRY_ENV_PATH, WORKFLOW_PYTHON, or PYTHONPATH. Invoke the wrapper as poetry run ebsdm ...; it derives the current checkout and Poetry interpreter, replaces stale ambient values for its child processes, and leaves the parent shell unchanged. Select the cluster profile explicitly with prepare --profile <name-or-path> and set the worker module script as paths.emsoft_module_script in that profile. USER_PROFILE and EMSOFT_MODULE_SCRIPT remain compatibility fallbacks for historical or raw expert commands, not permanent .zshrc settings. See docs/cluster_setup.rst for the environment that raw Snakemake commands need.

Controller preflight before cluster submission
poetry run ebsdm check --preflight

This checks the database and rendered config recorded by prepare; it does not guess a repo-root workflow.db. Direct controller_preflight and raw Snakemake commands are retained for expert diagnostics and must name the exact run paths. The Snakemake cluster-generic worker handoff is version-sensitive; use the Snakemake and snakemake-executor-plugin-cluster-generic versions pinned in pyproject.toml/poetry.lock unless you have run the generated-jobscript dump/replay gate for another version. On clusters with site-specific shell startup or module initialization, run controller-side commands through the shell recommended by the site. RWTH example:

ssh hpc 'zsh -lic "<command>"'

For multi-line scripts sent over stdin on RWTH, keep the same login/module setup and run the normal wrapper under zsh:

ssh hpc 'zsh -lic "zsh -s"' <<'REMOTE_SCRIPT'
cd ~/Repositories/ebsdmagus
poetry run ebsdm check --preflight
REMOTE_SCRIPT

Do not use plain ssh hpc 'zsh -s' for workflow-controller commands on RWTH. It can bypass login module setup and bind the Poetry environment to incompatible Python stdlib/library paths; one common symptom is a numpy/h5py import crash. Example RWTH controller module stack before running Snakemake:

module load GCC/13.3.0 OpenMPI/5.0.3 Python/3.12.3 SQLite/3.45.3 h5py/3.12.1

Keep this controller stack separate from EMSOFT_MODULE_SCRIPT, which is the site-specific module/setup script sourced by worker jobs for EMsoft execution.

Initialize DB (fresh)
poetry run ebsdm init-db --database workflow.db

This step is separate on purpose: ebsdm prepare refuses missing, unstamped, or unusable DB files instead of silently creating a new SQLite database. The underlying setup script defaults to SQLite delete journal mode for shared/HPC filesystem safety. Use --journal-mode wal or EBSD_MAGUS_SQLITE_JOURNAL_MODE=wal only when the DB filesystem has been validated for SQLite WAL.

Tests

  • Run unit tests with coverage:
    poetry run pytest --cov=ebsd_magus --cov-report=term-missing

Usage & Examples

Console scripts

Run each with poetry run <cmd>: generate-workflow, render-config, query-jobs, list-projects, find-jobs, explain-job-status, reset-failed-jobs, update-workflow-status, delete-workflow-jobs, export-workflow-to-csv, check-job-artifacts, verify-db, chain-validator.

Scientific config lint

generate-workflow prints warning-level lint for obvious smoke-test or stage-key foot-guns before NML/DB writes. Add --strict-lint when warnings should fail generation. This is pre-submit plausibility lint, not artifact validation or proof of scientific quality.

Tools (conversion/validation/metadata)
  • Convert CIF→XTAL: poetry run cif2xtal --cif tests/data/cif2xtal/YNi2.cif --output /tmp/YNi2.xtal
  • Convert VASP CONTCAR→CIF: poetry run python -m ebsd_magus.tools.contcar2cif --poscar path/to/CONTCAR --symbols Nb,Ni,O
  • Verify XTAL vs reference h5dump: poetry run python -m ebsd_magus.tools.verify_xtal_against_reference --xtal /tmp/YNi2.xtal --reference tests/data/cif2xtal/YNi2_h5dump.txt (add --allow-ragged-atomdata if the recorded dump printed AtomData rows in multiple column blocks)
  • Verify contcar2cif vs reference CIF: poetry run python -m ebsd_magus.tools.verify_contcar_against_cif --poscar tests/data/contcar2cif/Mg_LavesPhaseStackingFaults_1.CONTCAR --reference tests/data/contcar2cif/Mg_LavesPhaseStackingFaults_1.cif
  • Extract XTAL metadata JSON, including the embedded per-atom Debye–Waller derivation record: poetry run python -m ebsd_magus.tools.extract_xtal_metadata --input /tmp/YNi2.xtal --output /tmp/YNi2_meta.json The report includes a stored-coordinate range check. Add --coordinate-check required to return exit status 2 for failed or unverified coordinate checks; advisory diagnostics are the default. This checks fractional-coordinate representation, not native multiplicity.
  • Compare metadata JSON vs h5dump: poetry run python -m ebsd_magus.tools.verify_xtal_metadata --json /tmp/YNi2_meta.json --reference tests/data/cif2xtal/YNi2_h5dump.txt (also supports --allow-ragged-atomdata)
  • Summarize CIF/XTAL/h5dump triplets: poetry run python -m ebsd_magus.tools.summarize_cif_xtal_triplets --data-dir tests/data/cif2xtal (add --allow-ragged-atomdata if a recorded h5dump prints AtomData rows split across multiple offsets and you’re OK padding the gaps with NaN).
  • See src/ebsd_magus/tools/README.md (included in Sphinx docs) for full tool list and Debye–Waller overrides.
Analytics (visualization/QA)
  • Compare masterpatterns and plot diagnostics (diff/relative diff, edge diff, gradient ratio, entropy diff, FFT panels, SSIM map + low-SSIM overlay, hist/scatter, local mean/variance scatter, gradient-orientation histograms plus PSNR/SSIM/ESSIM metrics—see docs/analysis.rst for a glossary): poetry run compare-masterpatterns --reference masterpattern/base.h5 --target masterpattern/bethe_sweep.h5 --output-dir reports/masterpattern --output-prefix yni2_bethe --reference-label "YNi2 8/20/50" --target-label "YNi2 100/100/50".
Normal quick start

For a more beginner-friendly version of this sequence, see docs/getting_started.rst.

  1. Install deps (poetry install) and set the cluster exports if submitting.
  2. Initialize the DB once for a fresh checkout:
    poetry run ebsdm init-db --database workflow.db
  3. Create/adjust profile user_profiles/<name>.yaml; set paths/resources.
  4. Edit workflow config workflow_configs/<your_config>.yaml.
  5. Prepare the active run. The project name comes from the central campaign YAML:
    poetry run ebsdm prepare --config workflow_configs/<your_config>.yaml
  6. Run read-only checks and a Snakemake dry-run:
    poetry run ebsdm check --preflight
  7. Preview the exact submit command:
    poetry run ebsdm submit
  8. Submit only after the preview is correct:
    poetry run ebsdm submit --confirm
Expert/debug path

Use generate-workflow, render-config, chain-validator, workflow-controller-preflight, and raw Snakemake only when you need to inspect a specific layer. If you run raw Snakemake, pass the run-local rendered config with --configfile and export the same absolute path as EBSD_MAGUS_SNAKEMAKE_CONFIG; otherwise the Snakefile and cluster-generic submit/status adapters can read different runtime configs. See docs/getting_started.rst and docs/cluster_setup.rst for the full command.

Other examples
# Verify DB against config (with artifact/NML checks)
poetry run verify-db --config workflow_configs/workflow_config.yaml --db workflow.db --check-artifacts --check-nml

# Update / delete / export jobs
poetry run update-workflow-status --db workflow.db --id 1 --status done
poetry run delete-workflow-jobs --db workflow.db --project MY_PROJ --stage masterpattern
poetry run export-workflow-to-csv --db workflow.db --out logs/jobs.csv

# Preview/reset failed jobs. Mutating resets require a selector or --all-failed.
poetry run reset-failed-jobs --db workflow.db --dry-run
poetry run reset-failed-jobs --db workflow.db --project MY_PROJ --stage monte_carlo
poetry run reset-failed-jobs --db workflow.db --all-failed

# Check artifacts / reconcile; preview first, then rerun without --dry-run
# only after the proposed DB changes match the scheduler and log evidence.
poetry run ebsdm post-run-check --html
poetry run ebsdm preview
poetry run ebsdm post-run-check --html
poetry run check-job-artifacts --project MY_PROJ --status pending submitted running --dry-run --verbose
poetry run reconcile-cluster-state --db workflow.db --project MY_PROJ --repo-root ${REPO_ROOT:-$HOME/Repositories/ebsdmagus} --emsoft-config $HOME/.config/EMsoft/EMsoftConfig.json --dry-run --verbose
  • ebsdm post-run-check --html is the normal read-only first report after a run. ebsdm preview renders a small visual sample and a manifest; rerun the report to embed that exact selection. The preview command does not render every branch or orientation by default.
  • reconcile-cluster-state cross-checks SLURM state vs. workflow.db to detect drift (e.g., jobs stuck/running in SLURM but marked done/failed in DB, or missing .done/.h5). Use --dry-run to review changes and then rerun without it to align DB statuses or clean up SLURM context.
Find job IDs

To reset or cancel specific jobs, first find their IDs:

# List IDs with filters (project/stage/status/filename/xtal)
poetry run find-jobs --project MY_PROJ --status todo failed
# Wildcard filename search
poetry run find-jobs --filename-like "%mc0%"

Then reset a job back to todo:

poetry run update-workflow-status --db workflow.db --id <job_id> --status todo

find-jobs defaults to the configured database if --db is omitted.

Bethe parameter sweeps

For background on excitation errors, strong/weak beam selection, and the physics behind these cutoffs, see docs/bethe_parameters.md.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases ebsd-magus

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229