Identify Lines CLI

Commands

identify-lines

Tools to identify gamma source lines in x-ray imager data.

Usage

identify-lines [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

multiple

Identify gamma source lines multiple times for multiple sets.

FILENAME should be a CSV with headers where each row being a single set of measurements. The only required column is “csv_path”. That file should be compatable with the single FILENAME command. It may be an absolute path or relative to the working directory. Other columns will be caried to the output. This can be used for metadata like the position for that set.

The output will append n_detectors*n_lines columns. They’re titled “<Line Energy> keV d<Detector Number>”, with energy in keV to one decimal. Currently n_detectors is fixed equal to four.

Usage

identify-lines multiple [OPTIONS] FILENAME {Am241|Cd109|Co57|Na22}

Options

-g, --gain <gain>

Possible gain range (det units / keV).

-o, --output <output>

Output CSV path instead of stdout.

-b, --bar

Print extra information during run.

-v, --verbose

Print extra information during run.

-d, --debug

Print out all debug information during run.

Arguments

FILENAME

Required argument

SOURCE

Required argument

single

Identify gamma source lines in FILENAME, a CSV of measurements.

A CSV of OUTPUT will be output with one line per row. The first column is the line energy, then one column for each detector.

Usage

identify-lines single [OPTIONS] FILENAME {Am241|Cd109|Co57|Na22}

Options

-g, --gain <gain>

Possible gain range (det units / keV).

-p, --diagnostic <diagnostic>

Diagnostic to visualize groupings.

Options:

None | anger | amplitude | full

-o, --output <output>

Output CSV path instead of stdout.

-v, --verbose

Print extra information during run.

-d, --debug

Print out all debug information during run.

Arguments

FILENAME

Required argument

SOURCE

Required argument

API Reference

Command Line Interface to identify gamma lines

x_ray_imager_bagriff.identify_lines._cli.set_log_level(ctx, param, value)

Update the log level according to a CLI value.

x_ray_imager_bagriff.identify_lines._cli.load_measurement_csv(filename)

Load a CSV of measurements.

Should have a one line header, then one measurement per row. Each column should be a detector in order. Values are expected to be integers that fit in a 32 bit signed int.