autoemx.config.schema_models.legacy_size_stats module

Legacy compatibility: particle size statistics of ledgers saved before frames and segmentations were recorded (particle_stats, particle_stats_progress and eds_size_scans), converted to frames, segmentations, size_measurements and size_results when the ledger is loaded.

  • The settings of the measurement (particle_stats.powder_meas_cfg) and of the EDS acquisition give the segmentations (one if they are the same).

  • The frames searched by EDS, and the frames of the size bands of the measurement (and of the measurement in progress), become frames with the result of their segmentation; the particles of the size bands, recorded as ParticleInfo (selection ‘size_stats’), become the particles of their frame (those measured by EDS stay).

  • particle_stats becomes measurement 0 (completed) and result 0 (the active one, statistics kept), the particles left out becoming (frame_id, index) pairs.

Frames of earlier measurements, replaced in the ledger by a later one, were not kept and cannot be recovered.

autoemx.config.schema_models.legacy_size_stats.migrate_legacy_size_statistics(data: Any) → Any[source]

Convert the legacy particle size statistics of a saved ledger (plain JSON data); other data is returned as is.