Skip to main content

Module counts_fit

Module counts_fit 

Source
Expand description

The areal densities and temperatures of the materials in one or more regions of the detector, each region’s background and gamma transmission, the sample run’s normalization, the time background, the timing offset, the flight path and the pulse’s numbers, fitted to the counts of an open-beam run and a sample run recorded in the same time bins.

Structs§

CountsFit
The fitted quantities of every region, and the normalization, time background, timing offset, flight path and pulse numbers the regions share.
Material
A material’s isotopes and temperature.
Measurement
An open-beam run and a sample run recorded in the same time bins, read in one or more regions of the detector.
Region
The counts of a set of pixels in both runs, its background and the material the beam crosses there.
RegionFit
One region’s fitted quantities and counts.
RoomBackground
Counts that arrive at the same rate at every time of every frame, in both runs alike, whatever the proton charge and whatever is in front of the pixels, such as the detector’s dark counts: ρ per µs per pixel per frame, ρ · w_k · F per pixel in a bin of width w_k of a run of F frames.
Spread
A share h of the counts arriving in each cell of a detector grid that the detector records elsewhere, spread by the radial kernel Σ_c w_c·exp(−r/s_c)/(2π s_c²) (transfer): region r records (1 − h)·μ_r + h·Σ_q F_rq·μ_q of the counts μ arriving in the regions in each bin of both runs, F_rq the share of the spread counts arriving evenly over region q’s cells that lands in region r’s cells (region_shares). Cells in no region neither send nor record counts.

Enums§

Value
A quantity the fit holds at a known value, fits from a starting value over the quantity’s range, fits from start within lower..=upper inside that range, or fits over the range from a value measured elsewhere with standard deviation sd, a Gaussian prior on it.

Constants§

NEGLIGIBLE_PREDICTION
A count in a bin predicted fewer counts than this has a chance below it under the model.
NO_TIME_BACKGROUND
A Measurement::time_background of no counts.

Functions§

fit_counts
Fit the areal densities and temperatures of the regions’ materials, each region’s background terms and gamma transmission, the normalization, the time background, and the timing offset, flight path and pulse numbers of calibration, that are not known, to the raw counts of both runs in every region. On a uniform grid of flight times u_i, energies E_i and step w, the counts of region r in bin k are