Skip to main content

MossView

MossView is a command-line tool for reading Mössbauer spectra and plotting relative transmission. The main application is src/mossview/cli.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

After installing the package, pass a .mos or .job file to either the mossview command or the module:

mossview data-control/b025a-26.mos
python -m mossview 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
src/mossview/cli.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.
  • The package provides both the mossview console command and python -m mossview.
  • legado/README.md describes a historical system and its executables, not the current implementation.

Development and releases

Release versions are controlled by .github/version.txt:

  • main uses the release entry and creates a stable PyPI release.
  • beta uses the pre-release entry and creates a prerelease. If the entry has no prerelease suffix, the workflow adds b0 automatically (for example, 1.0.3 becomes 1.0.3b0).

When the selected version already exists on PyPI or as a Git tag, the release workflow increments it automatically, updates version.txt and pyproject.toml, commits those changes, and publishes the new version.

License

Distributed under the MIT License. See LICENSE.

Metadata

Release files for mossview 1.0.1

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.1
File Size Uploaded
mossview-1.0.1.tar.gz 12.8 kB Details

Built distribution (wheel)

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

Total release size: 24.0 kB

Release files / mossview-1.0.1.tar.gz

Download URL mossview-1.0.1.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d09585b902898eb0ba65c78fd2b5a7a05e7e355b3abad734ec06eab228e0c1d
BLAKE2b-256 checksum
How to use checksums
4ad95d165e4023e6b386733c3de6d70befbe37230dce336b94ba793d69e71d30
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.1-py3-none-any.whl

Download URL mossview-1.0.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccedf58a3bbc9f403e97280fc4d64ce183a6a2da8d8a12b7a06e43d8651e02a2
BLAKE2b-256 checksum
How to use checksums
a5fcf839de0262235dc5068a3b8ebc52af706fa5cdd2dd71a11ce3adc5f2f193
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

This release

1.0.1 This release

2 release files

1.0.0

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