COMCIFS / Powder_Dictionary

CIF definitions for powder diffraction
4 stars 4 forks source link

adding diffractogram_id and phase_id to per-phase intensities #69

Closed rowlesmr closed 1 year ago

rowlesmr commented 1 year ago

I've added diffractogram_id and phase_id to the categories that allow the addition of per-phase intensities.

I've initially done something naughty, and put them in PD_CALC_OVERALL (this is a Set category), but named them _pd_calc_component.diffractogram/phase_id (_PD_CALC_COMPONENET is a Loop category). I've chosen to do this as the new data items should be single-valued, and it allows for all _pd_calc_component.* data names to be used in a data block, as: Ignore - I was talking bollocks.

_PD_CALC_COMPONENT now has _pd_calc_component.diffractogram_id, _pd_calc_component.phase_id, as well as _pd_calc_component.point_id to identify values.

data_component1
_pd_calc_component.phase_id     the_first_phase
_pd_calc_component.diffractogram_id the_diff_patt

loop_
_pd_calc_component.point_id
_pd_calc_component.intensity_total
    1   5
    2   5.1
    3   6.0
    #...
rowlesmr commented 1 year ago

~~Just thinking of pathological cases: There can only be one phase; that's kind of the point.~~

But: The calculated pattern could exist in more than one _pd_calc.intensity_* loop, if you're doing pattern simulations (or some other crazy thing where scale factors are linked).

So _pd_calc_component.phase_id should be Set, but _pd_calc_component.diffractogram_id should be Loop. talking more rubbish

rowlesmr commented 1 year ago

Added additional category keys. PD_CALC_COMPONENT now has _pd_calc_component.diffractogram_id, _pd_calc_component.phase_id, and _pd_calc_component.point_id as its keys.

This compares with PD_DATA which has _pd_data.diffractogram_id and _pd_data.point_id; PD_CALC_COMPONENT also has to worry about the phase to which it belongs.