Skip to content

alter category keys: pd_calib_xcoord and pd_qpa_external_std#290

Open
rowlesmr wants to merge 13 commits into
COMCIFS:masterfrom
rowlesmr:checking-keys
Open

alter category keys: pd_calib_xcoord and pd_qpa_external_std#290
rowlesmr wants to merge 13 commits into
COMCIFS:masterfrom
rowlesmr:checking-keys

Conversation

@rowlesmr

@rowlesmr rowlesmr commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

pd_calib_xcoord - originally keyed on .id and .xcoord_overall_id (linked to _pd_calib_xcoord_overall.id). There was no way to link each point of the calibration to the detector it was calibrating. .xcoord_overall_id was demoted to linked non-key data item. .detector_id promoted to part of composite key. Updated the examples.

pd_qpa_external_std - originally keyed on .diffractogram_id. This was only used to get to the associated .instr_id value, so I decided to cut out the middleman and key it directly on .instr_id. This has the side-effect of requiring a new _pd_instr.id if a recalibration is required, but this was always implicitly there. .diffractogram_id demoted to linked, non-key data name. .instr_id added as category key. Updated the example to link the mass absorption coefficient of the specimen to the diffractogram though a pd_char, pd_prep, pd_spec chain.

Also misc changes putting the category key names in alphabetical order for all categories.

rowlesmr added 13 commits June 24, 2026 20:39
Removed _pd_calib_xcoord.xcoord_overall_id (kept as linked non-key)
Added _pd_calib_xcoord.detector_id -> otherwise don't know which detector is being calibrated
It was a circuitous lookup. Use instr_id associated with the unknown diffractogram to look up the (non-key) instr_id of the diffractogram in the qpa_ext_std table to get the k_factor.

K factors are associated with instruments. If anything changes in the instrument, particularly anything to do with flux, a new id is required, and so a new K_factor can be gotten.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant