Skip to main content

MossView

MossView is a command-line tool for reading Mössbauer spectra and plotting relative transmission. The main application is core-app/mossview.py. It reads counts from a .mos file and, when it finds an associated .job file, uses its metadata for the plot title and velocity scale.

Requirements

  • Python 3.8 or later, as declared in pyproject.toml.
  • Dependencies listed in requirements.txt: NumPy and Matplotlib, with their transitive dependencies pinned there.

Install the dependencies in a virtual environment if desired:

python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# macOS or Linux
source .venv/bin/activate
python -m pip install -r requirements.txt

Usage

Run from the repository root and pass a .mos or .job file:

python core-app/mossview.py data-control/b025a-26.mos
python core-app/mossview.py data-control/b025adi.job

When given a .job, MossView tries to locate the .mos file named near the beginning of the job file, then falls back to a file with the same base name. When given a .mos, it looks for a .job that references it or has the same base name. Paths are checked as provided, then relative to the script directory.

The program prints progress and saves a PNG beside the .mos file with the same base name. It also opens an interactive Matplotlib window; close the window to end the process.

Processing flow

  1. Resolves the input path and finds the associated .mos and .job files.
  2. Reads recognized metadata from the .job's &DATA ... &END block: VMAX (absolute value), ND, and TRIANG. The plot uses VMAX, defaulting to 10 mm/s when unavailable. ND and TRIANG are read but do not affect current processing.
  3. Reads counts from the .mos. The parser accepts XML containing a <data> element, as well as text containing numbers. It can read the XML time attribute, but does not currently use it in the plot.
  4. Builds a linear velocity scale from -VMAX to +VMAX, with one point per count.
  5. Calculates relative transmission as count / maximum_count × 100 and plots Poisson error bars as √count / maximum_count × 100.
  6. Saves and displays the plot.

&PARAM block validation

When a .job file is available, the program examines assignments only inside the &PARAM ... &END block. It compares selected parameters with final values found in tables in the same file. It also checks ARX values above 0.5 mm/s when no applicable reference is available. If it finds discrepancies, it writes a copy with the -updated.job suffix, reports the changes, and uses that copy. The original .job is not overwritten by this process.

This correction is a heuristic for numeric discrepancies and ARX values. It is not a complete NORMOS format validator or a guarantee of physical correctness. Review the -updated.job file before using it with another program.

Repository components

Path Purpose
core-app/mossview.py Main application: file reading, association, limited validation, and plotting.
data-control/ Local sample .mos, .job, and image files. This directory is ignored by Git.
legado/main.py Independent plotting simulator for damped sine waves and Lissajous curves; it is not called by the current MossView application.
legado/executables/ Historical DOS/MBPLOT-related executables, separate from the main application.
website/ Minimal website content; it does not provide a working viewer interface.
pyproject.toml Package metadata and Semantic Release configuration.
.github/workflows/ Release and PyPI publishing automation.

Current scope and limitations

  • The available interface is a CLI with an interactive plot; there is no dedicated GUI or web application.
  • The velocity axis is always linear and symmetric. The program does not use ND or TRIANG to reconstruct other acquisition geometries.
  • The permissive text parser extracts numeric tokens but does not support every possible .mos format.
  • pyproject.toml sets packages = [] and defines no console command. Run the script directly as shown above; the publishing configuration alone does not provide an installed CLI.
  • legado/README.md describes a historical system and its executables, not the current implementation.

Development and releases

Automatic versioning is configured for the main and beta branches with Python Semantic Release. The publishing workflow builds and uploads the package to PyPI when a GitHub release is published. Packaging configuration and workflows are still evolving; to run the tool locally, use the commands in the Usage section.

License

Distributed under the MIT License. See LICENSE.

Metadata

Release files for mossview 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mossview 1.0.0
File Size Uploaded
mossview-1.0.0.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mossview 1.0.0
File Interpreter ABI Platform
mossview-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / mossview-1.0.0.tar.gz

Download URL mossview-1.0.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7dcaffff622767e0c6349d9dc2668d6ad6b7d9dba07d39314af5fc90312965fb
BLAKE2b-256 checksum
How to use checksums
9af646a702a1eaf6c77cfc4bb9987e08692e7fb39e994ed4f2a5ff236f5d7bba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / mossview-1.0.0-py3-none-any.whl

Download URL mossview-1.0.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bc0b157ef0241959ac67d6aacd27db7403cd2f281dbb35d7d045897f7b3448b
BLAKE2b-256 checksum
How to use checksums
c82d7af635393f9321e0b70ed07facac4724a0ab983da4aca7c209c3c7beb449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page