Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category keys and links for PD_CHAR, PD_PREP, and PD_SPEC #127

Merged
merged 12 commits into from
Jun 15, 2023

Conversation

rowlesmr
Copy link
Collaborator

@rowlesmr rowlesmr commented Jun 4, 2023

Set in motion by #114

Added category keys for the Set categories PD_CHAR, PD_PREP, and PD_SPEC

Added linking keys to join PD_CHAR to PD_PREP and PD_PREP to PD_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.

This was referenced Jun 8, 2023
@rowlesmr
Copy link
Collaborator Author

rowlesmr commented Jun 13, 2023

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.

@jamesrhester
Copy link
Contributor

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.

@rowlesmr
Copy link
Collaborator Author

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'


@rowlesmr rowlesmr merged commit 8518196 into COMCIFS:master Jun 15, 2023
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.

2 participants