Skip to content

Enhancement: Output per-pixel areal density maps from SAMMY fitting #248

@KedoKudo

Description

@KedoKudo

Context

The imaging pipeline currently outputs normalized atom-fraction composition maps (summing to 1.0 per pixel) via ResultsAggregator. This is correct for composition analysis.

However, the absolute areal density (atoms/barn-cm) per isotope per pixel is also scientifically valuable — it encodes both composition and sample thickness variation across the image.

Current behavior

  • Pass 1 fits the global thickness n(x,y) per pixel
  • Pass 2 fits per-isotope abundances f_i(x,y) (IFLISO=1)
  • The LPT parser (lpt_manager.py) extracts only abundances and chi-squared
  • ResultsAggregator normalizes abundances: w_i = f_i / Σf_i
  • Per-pixel thickness n(x,y) is discarded after Pass 1

Desired behavior

In addition to normalized composition maps, optionally output:

  1. Per-pixel thickness map: n(x,y) in atoms/barn-cm — extract from Pass 1 LPT or PAR output
  2. Areal density maps: n(x,y) * f_i(x,y) for each isotope — the product of thickness and abundance
  3. Store both in Imaging2DResults and HDF5 output

Physics

T(E) = exp( -n * Σᵢ fᵢ * σᵢ(E) )

areal_density_A0(x,y) = n(x,y) * f_A0(x,y)    [atoms/barn-cm]
composition_A0(x,y)   = f_A0 / Σᵢ fᵢ            [atom fraction, sums to 1.0]

Implementation notes

  • Extract fitted thickness from SAMMY LPT (broadening parameters section) or from the output PAR file after Pass 1
  • Add thickness_map: Optional[np.ndarray] and areal_density_maps: Optional[np.ndarray] to Imaging2DResults
  • Backwards compatible: existing code that only uses abundance_maps is unaffected

Priority

Low — composition maps are sufficient for current research. This is a nice-to-have for quantitative analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions