Creation of two new Loop categories, PD_PHASE_LIST and PD_DIFFRACTOGRAM_LIST, to deal with cases when we need to loop _pd_phase.ids and _pd_diffractogram.ids. See also #74.
The behaviour is analagous to _pd_block.id with PD_PHASE_BLOCK or PD_BLOCK_DIFFRACTOGRAM.
_pd_phase_block.phase_id and _pd_block_diffractogram.diffractogram_id (which is where these ID values were previously able to be looped) have been removed to disconnect the different methodologies of linking with block pointers and the new way..
The structure is:
PD_PHASE_LIST
_pd_phase_list.id
Is an arbitrary code identifying a _pd_phase_list.phase_id.
Is a category key.
is (possibly) unique only within the block it is used If this is true, does everything still work?
_pd_phase_list.phase_id
Acts as Link back to _pd_phase.id (which should be unique in the entire world).
Is a category key.
PD_DIFFRACTOGRAM_LIST
_pd_diffractogram_list.id
Is an arbitrary code identifying a _pd_diffractogram_list.diffractogram_id .
Is a category key.
is (possibly) unique only within the block it is used If this is true, does everything still work?
_pd_diffractogram_list.diffractogram_id
Acts as Link back to _pd_diffractogram.id (which should be unique in the entire world).
Is a category key.
These two categories would allow for the looping of phase and diffractogram ids in data blocks where necessary, such as in a block containing a diffractogram with many phases.
In a future PR (or commit to this PR)
Further to the creation of these two categories, other categories that have _categoryname.phase_id and/or _categoryname.diffractogram_id should also have _categoryname.phase_list_id and/or _categoryname.diffractogram_list_id to be able reference a _pd_phase_list.id or _pd_diffractogram_list.id. This should allow for shorter arbitrary labels to be (re)used to refer to the long, unique phase/diffractogram_id (exactly analagous to the OG _pd_phase_id and _pd_refln.phase_id)
Something like:
data_DIFFPATT_1
_pd_diffractogram.id DIFFPAT_1_LONG_UNIQUE_STRING
loop_
_pd_phase_list.id
_pd_phase_list.phase_id
1 # the idea is that this value can repeat in different blocks
ALUMINA_A_BIG_LONG_STRING_THAT_IS_GLOBALLY_UNIQUE # this must be unique at least in the data collection, preferablly in the entire world.
2
SILICON_ANOTHER_STRING_THAT_IS_SUPPOSED_TO_BE_ALONE
loop_
_pd_phase_mass.phase_list_id
_pd_phase_mass.percent
1 72.11
2 27.89
loop_
_refln.index_h
_refln.index_k
_refln.index_l
_pd_refln.phase_list_id # this would have _pd_refln_phase_id as an alias
_refln.d_spacing
0 0 12 1 1.082702
1 0 -14 1 0.905365
2 2 0 2 1.920168
3 1 1 2 1.637525
#...
loop_
_pd_meas.2theta_scan
_pd_proc.intensity_total
_pd_calc.intensity_total
5.001 63.364 35.994
5.004 78.007 36.200
5.007 78.318 36.404
#...
Question
If I want to be able to reuse the same _pd_phase_list.id value in different blocks to refer to different (or even the same) phases, does there need to be some key based on the block?
In this PR
Creation of two new
Loop
categories,PD_PHASE_LIST
andPD_DIFFRACTOGRAM_LIST
, to deal with cases when we need to loop_pd_phase.id
s and_pd_diffractogram.id
s. See also #74.The behaviour is analagous to
_pd_block.id
withPD_PHASE_BLOCK
orPD_BLOCK_DIFFRACTOGRAM
._pd_phase_block.phase_id
and_pd_block_diffractogram.diffractogram_id
(which is where these ID values were previously able to be looped) have been removed to disconnect the different methodologies of linking with block pointers and the new way..The structure is:
PD_PHASE_LIST
_pd_phase_list.id
_pd_phase_list.phase_id
._pd_phase_list.phase_id
Link
back to_pd_phase.id
(which should be unique in the entire world).PD_DIFFRACTOGRAM_LIST
_pd_diffractogram_list.id
_pd_diffractogram_list.diffractogram_id
._pd_diffractogram_list.diffractogram_id
Link
back to_pd_diffractogram.id
(which should be unique in the entire world).These two categories would allow for the looping of phase and diffractogram ids in data blocks where necessary, such as in a block containing a diffractogram with many phases.
In a future PR (or commit to this PR)
Further to the creation of these two categories, other categories that have
_categoryname.phase_id
and/or_categoryname.diffractogram_id
should also have_categoryname.phase_list_id
and/or_categoryname.diffractogram_list_id
to be able reference a_pd_phase_list.id
or_pd_diffractogram_list.id
. This should allow for shorter arbitrary labels to be (re)used to refer to the long, unique phase/diffractogram_id (exactly analagous to the OG _pd_phase_id and _pd_refln.phase_id)Something like:
Question
If I want to be able to reuse the same
_pd_phase_list.id
value in different blocks to refer to different (or even the same) phases, does there need to be some key based on the block?