epyr.cli

Command Line Interface for EPyR Tools

Provides command-line tools for common EPyR workflows: - Data conversion (Bruker -> FAIR formats) - Baseline correction - Batch processing - Configuration management

Usage:

epyr-convert input.dsc –output-dir ./results epyr-baseline spectrum.dsc –method polynomial –order 2 epyr-batch-convert ./data/ –formats csv,json,hdf5,jpg epyr-config –set plotting.dpi 300

Functions

cmd_baseline()

Apply baseline correction to EPR data.

cmd_batch_convert()

Batch convert multiple files.

cmd_config()

Configuration management.

cmd_convert()

Convert Bruker files to FAIR formats.

cmd_info()

Show system and configuration information.

cmd_isotopes()

Launch the isotope database GUI.

cmd_plot()

Load and plot EPR data files interactively.

cmd_plot_with_args(args)

Load and plot EPR data files interactively with pre-parsed args.

cmd_validate()

Validate EPR data files.

cmd_view()

Interactive EPR viewer: 1D plot or 2D slicer depending on data dimensionality.

create_interactive_plot_with_measurements(x, ...)

Create an interactive plot with optional measurement tools.

main()

Main CLI entry point - shows available commands.

Classes

InteractiveMeasurementTool(ax, x_data, y_data)

Interactive tool for measuring distances between two points on a plot.

class epyr.cli.InteractiveMeasurementTool(ax, x_data, y_data)[source]

Interactive tool for measuring distances between two points on a plot.

__init__(ax, x_data, y_data)[source]

Initialize the measurement tool.

Parameters:
  • ax – Matplotlib axes object

  • x_data – X-axis data array

  • y_data – Y-axis data array

enable()[source]

Enable the measurement tool.

disable()[source]

Disable the measurement tool.

on_click(event)[source]

Handle mouse click events.

calculate_distance()[source]

Calculate and display distance between two points.

clear_measurements()[source]

Clear all measurements from the plot.

epyr.cli.create_interactive_plot_with_measurements(x, y, params, file_path, enable_measurements=False)[source]

Create an interactive plot with optional measurement tools.

Parameters:
  • x – X-axis data

  • y – Y-axis data

  • params – Parameter dictionary

  • file_path – Path to the loaded file

  • enable_measurements – Whether to enable measurement tool

epyr.cli.cmd_view()[source]

Interactive EPR viewer: 1D plot or 2D slicer depending on data dimensionality.

Return type:

None

epyr.cli.cmd_convert()[source]

Convert Bruker files to FAIR formats.

epyr.cli.cmd_baseline()[source]

Apply baseline correction to EPR data.

epyr.cli.cmd_batch_convert()[source]

Batch convert multiple files.

epyr.cli.cmd_config()[source]

Configuration management.

epyr.cli.cmd_info()[source]

Show system and configuration information.

epyr.cli.cmd_isotopes()[source]

Launch the isotope database GUI.

epyr.cli.cmd_plot()[source]

Load and plot EPR data files interactively.

epyr.cli.cmd_plot_with_args(args)[source]

Load and plot EPR data files interactively with pre-parsed args.

epyr.cli.cmd_validate()[source]

Validate EPR data files.

epyr.cli.main()[source]

Main CLI entry point - shows available commands.