Alter category key pd_calib_xcoord #315
Conversation
|
Just making sure I understand the logic here. An x-calibration, described in |
|
The way I see it is that So detector_id should be a key. I've become not a fan of long chained lookups, as it is too easy to lose a link in that chain. The aim of this PR was to provide a direct linkage, rather than a chained lookup. Indeed, In this proposed PR, |
|
Chained lookups are meant to be a feature of a properly normalised relational model, in that the information about something is always bundled behind its identifier (or multiple identifiers if it's a joint property) instead of information being repeated more than once and creating the danger of inconsistent information. But there are different ways to skin that relational cat, depending on taste. What we do want to avoid is any column not being a function of all the key data names, or in other words, it shouldn't be possible to determine the value of a data name in some category without knowing the value of every key data name in that category, because then that data name is more properly describing a property of the key data name that it depends on. What you win with all this chaining is the ability to make localised changes without affecting other categories. Anyway, I agree that the second key data name in Let's think this through. This PR implicitly assumes that there is a unique X calibration for a detector in a data set, as knowing the detector and calibration point is enough to determine the new X coordinate (this agrees with the intensity calibration approach, which also assumes a single intensity calibration.) Therefore, the overall X calibration information is a function of the detector and we can define non-key data name Furthermore, a consequence of changing the key to So I'd be happy with this PR if |
|
I'm kind of following you right up to the last line. Those last data names make no sense. |
|
Whoops, that last line should read: So I'd be happy with this PR if |
|
I reckon I understand that. The principle re a function of all keys drives it home. Will make those changes tonight. |
tp link detector with the conditions that calibrated it
…lesmr/Powder_Dictionary into rekey-PD_CALIB_XCOORD-take-2
pd_calib_xcoord- originally keyed on.idand.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_idwas demoted to linked non-key data item..detector_idpromoted to part of composite key. Updated the examples.