Position Estimation CLI

Commands

position-estimation

Tools for estimating position/energy for x-ray imager observations.

Usage

position-estimation [OPTIONS] COMMAND [ARGS]...

animation

Animate a time series of x-ray positions and/or energies.

Uses the same figures as the plot command for each frame. OBSERVATIONS should be a CSV with columns ‘energy’, ‘x’, ‘y’, and ‘t’. All times are in seconds.

Usage

position-estimation animation [OPTIONS] OBSERVATIONS {spectrum|image|both}

Options

-o, --output <output>

Output animation plot with a file type supported by matplotlib’s FFMpegWriter.

-s, --step <step_duration>

Observation time for each frame, in seconds.

-e, --energy <energy_range>

Only use x-rays in this energy band for position plots.

-i, --interval <frame_interval>

Frame duration in the final video.

--maxspectrum <max_spectrum>

Max on the energy spectrum y-axis (x-rays / keV.s).

--maximage <max_image>

Max on the image colormap (x-rays / bin).

--error

Use uncertainties to construct plots.

-d, --debug

Print out all debug information during run.

-v, --verbose

Print extra information during run.

Arguments

OBSERVATIONS

Required argument

FIGURE

Required argument

plot

Plot a set of x-ray positions and/or energies.

OBSERVATIONS is a CSV with each row being a single observed x-ray. It should have columns ‘energy’, ‘x’, and ‘y’. FIGURE is the selected plot type. All energies should be in keV and lengths in mm.

Usage

position-estimation plot [OPTIONS] OBSERVATIONS {spectrum|image|both}

Options

-o, --output <output>

Output plot path. Any type supported by matplotlib.

-e, --energy <energy_range>

Only use x-rays in this energy band for position plots.

--error

Use uncertainties to construct plots.

-d, --debug

Print out all debug information during run.

-v, --verbose

Print extra information during run.

Arguments

OBSERVATIONS

Required argument

FIGURE

Required argument

series

Estimate the position and energy for a list of observations.

CALIBRATION is an npz file with four arrays, x, y, energy, and response. Each row should be a single calibration point (interpolated or otherwise). OBSERVATIONS is a CSV with each row being a single observed x-ray. An estimated position and energy will be added as new columns in a CSV.

Usage

position-estimation series [OPTIONS] CALIBRATION OBSERVATIONS

Options

-o, --output <output>

Output CSV path instead of stdout.

--threshold <threshold>

Minimum sum of detector values to output.

-d, --debug

Print out all debug information during run.

-v, --verbose

Print extra information during run.

Arguments

CALIBRATION

Required argument

OBSERVATIONS

Required argument

API Reference

Command line interface to estimate position/energy for an x-ray imager.