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
- Resolves the input path and finds the associated
.mosand.jobfiles. - Reads recognized metadata from the
.job's&DATA ... &ENDblock:VMAX(absolute value),ND, andTRIANG. The plot usesVMAX, defaulting to 10 mm/s when unavailable.NDandTRIANGare read but do not affect current processing. - Reads counts from the
.mos. The parser accepts XML containing a<data>element, as well as text containing numbers. It can read the XMLtimeattribute, but does not currently use it in the plot. - Builds a linear velocity scale from
-VMAXto+VMAX, with one point per count. - Calculates relative transmission as
count / maximum_count × 100and plots Poisson error bars as√count / maximum_count × 100. - 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
NDorTRIANGto reconstruct other acquisition geometries. - The permissive text parser extracts numeric tokens but does not support every possible
.mosformat. - The package provides both the
mossviewconsole command andpython -m mossview. legado/README.mddescribes a historical system and its executables, not the current implementation.
Development and releases
Release versions are controlled by .github/version.txt:
mainuses thereleaseentry and creates a stable PyPI release.betauses thepre-releaseentry and creates a prerelease. If the entry has no prerelease suffix, the workflow addsb0automatically (for example,1.0.3becomes1.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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mossview-1.0.3.tar.gz | 23.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mossview-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.5 kB
Release files / mossview-1.0.3.tar.gz
| Download URL | mossview-1.0.3.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47961dce21d181ab1c58eb340eaf4e6ecda064e733a414ce8f12805c1f37d632
|
|
BLAKE2b-256 checksum How to use checksums |
36d28ca6b58bb004662ab6ee59f7fc72e6c9b930474b264a778d27238067327d
|
| 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 logRelease files / mossview-1.0.3-py3-none-any.whl
| Download URL | mossview-1.0.3-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b92a62d86dbf91dfef58ad61ca108c266b115846f00082e0f66acf38fee2d9f
|
|
BLAKE2b-256 checksum How to use checksums |
7d2e66813f8c8770761aa280f7b82fd9d21738d8657d910c9a861f361e69643b
|
| 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