Closed rowlesmr closed 1 year ago
I don't know if this last commit is a good idea or not, but it adds _pd_prep.char_id
as a category key to PD_PREP
and _pd_spec.prep.id
as a category key to PD_SPEC
.
This results in _pd_char.id
* being a fundamental-type in the id
heirachy (along with phase, diffractogram, instr, and instr_detector id)
* rather than those mentioned and _pd_prep.id
and _pd_spec.id
.
Making pd_prep.char_id
a key allows you to identify a sample using the same _pd_prep.id
identifier for different materials. That's a choice you can make if you want. So instead of:
loop_
_pd_prep.id
_pd_prep.char_id
_pd_prep.stuff
1 1 'stuff'
2 1 'stuff'
3 2 'stuff'
4 2 'stuff'
for 4 samples from 2 materials, you could do
loop_
_pd_prep.id
_pd_prep.char_id
_pd_prep.stuff
1 1 'stuff'
2 1 'stuff'
1 2 'stuff'
2 2 'stuff'
That's a perfectly valid choice to make, happy for this to be merged.
I was thinking more along the lines of now I only need a properly unique char.id, and the prep and spec.ids can live inside that space, but yes.
loop_
_pd_char.id
_pd_char.thing
044c5d72-00bd-4ae6-9cd6-b42c4ea70d1a 'a material thing'
loop_
_pd_prep.id
_pd_prep.char_id
_pd_prep.stuff
1 044c5d72-00bd-4ae6-9cd6-b42c4ea70d1a 'stuff1'
2 044c5d72-00bd-4ae6-9cd6-b42c4ea70d1a 'stuff2'
3 044c5d72-00bd-4ae6-9cd6-b42c4ea70d1a 'stuff3'
4 044c5d72-00bd-4ae6-9cd6-b42c4ea70d1a 'stuff4'
loop_
_pd_spec.id
_pd_spec.prep_id
_pd_spec.stuff
a 1 'stuffa'
b 1 'stuffb'
c 2 'stuffc'
d 2 'stuffd'
e 3 'stuffe'
f 3 'stufff'
g 4 'stufgf'
h 4 'stuffh'
Set in motion by #114
Added category keys for the
Set
categoriesPD_CHAR
,PD_PREP
, andPD_SPEC
Added linking keys to join
PD_CHAR
toPD_PREP
andPD_PREP
toPD_SPEC
.There is now:
_pd_char.id
_pd_prep.id
_pd_prep.char_id
_pd_spec.prep_id
to compliment the existing
_pd_spec.id
, and_pd_diffractogram.spec_id
Now you can have one material (
PD_CHAR
) making multiple samples (PD_PREP
) and each sample making multiple specimens (PD_SPEC
), and it should all link together.