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

how to reference other phases/diffractograms? #163

Open
rowlesmr opened this issue Jun 26, 2023 · 3 comments
Open

how to reference other phases/diffractograms? #163

rowlesmr opened this issue Jun 26, 2023 · 3 comments

Comments

@rowlesmr
Copy link
Collaborator

This was raised in the third dot point of @vaitkus #161 (comment)

What is the correct way to define a data item that is used to point to another place which contains the information you're after?

In the example below, there is a diffractogram with _pd_diffractogram.id having the value of DIFFRACTOGRAM_0020. It was quantified by the external method using the information contained in the PD_QPA_EXTERNAL_STD category data items (ie the K factor and standard MAC) associated with the key _pd_qpa_external_std.diffractogram_id which has the value SRM676A.

I've currently indicated that by having _pd_qpa_external_std.diffractogram_id SRM676A given inside the block containing DIFFRACTOGRAM_0020. The definition of _pd_qpa_external_std.diffractogram_id is below.

save_pd_qpa_external_std.diffractogram_id

    _definition.id                '_pd_qpa_external_std.diffractogram_id'
    _definition.update            2023-01-15
    _description.text
;
    The diffractogram (see _pd_diffractogram.id) which is being used to
    calculate the diffractometer constant.
;
    _name.category_id             pd_qpa_external_std
    _name.object_id               diffractogram_id
    _name.linked_item_id          '_pd_diffractogram.id'
    _type.purpose                 Link
    _type.source                  Related
    _type.container               Single
    _type.contents                Text

save_

Is this the correct way to do it, or should there be another data item used to point? Something like

save_pd_qpa_external_std.ref_diffractogram_id

    _definition.id                '_pd_qpa_external_std.ref_diffractogram_id'
    _definition.update            2023-06-26
    _description.text
;
    The diffractogram from which the diffractometer constant was calculated.
;
    _name.category_id             pd_qpa_external_std
    _name.object_id               ref_diffractogram_id
    _type.purpose                 Encode
    _type.source                  Related
    _type.container               Single
    _type.contents                Text

save_

where it isn't linked, but does Encode a diffractometer_id in order to find all the information?

#\#CIF_2.0

#######	Begin common information	#######
data_global
_diffrn_radiation_wavelength.value   1.7889847
#######	End common information	#######

#######	Begin powder diffraction data	#######
data_DIFFRACTOGRAM_0020
_pd_diffractogram.id	DIFFRACTOGRAM_0020

loop_
_pd_phase_mass.phase_id
_pd_phase_mass.percent
Goethite_0020	70.6(2)
Hematite_0020	8.11(17)
Quartz_0020 	6.48(6)
Kaolinite_0020	1.88(18)
Nacrite_0020	1.21(12)
Anatase_0020	0.35(3)
Rutile_0020 	0.44(4)
#amor 10.9(4)

_pd_qpa_external_std.diffractogram_id   SRM676A
_pd_char.mass_atten_coef_mu_calc        4.52708878
_pd_qpa_overall.method                  external_standard


loop_
	_pd_data.point_id
	_pd_meas.2theta_scan
	_pd_meas.counts_total
	_pd_calc.intensity_total
	_pd_proc.intensity_bkg_calc
1	5.007880	737	805.948339	805.681930	
#...
5713	95.008094	77	76.586601	63.972674
#######	End powder diffraction data	#######


#######	Begin External Standard information	#######
data_STD_Aluminium_oxide_alpha
_pd_phase.id	STD_Aluminium_oxide_alpha
#...

data_SRM676A
_pd_diffractogram.id	SRM676A

loop_
	_pd_phase_mass.phase_id
	_pd_phase_mass.percent
	_pd_phase_mass.percent_su
STD_Aluminium_oxide_alpha	99.02   1.11

_pd_qpa_external_std.k_factor           321.82
_pd_char.mass_atten_coef_mu_calc        4.87922752
_pd_qpa_overall.method                  external_standard
##
# _pd_qpa_external_std.diffractogram_id gets the value "SRM676A"
# solely due to the fact that _pd_diffractogram.id exists in this
# block, and has the value "SRM676A"
##

loop_
	_pd_data.point_id
	_pd_meas.2theta_scan
	_pd_meas.counts_total
	_pd_calc.intensity_total
	_pd_proc.intensity_bkg_calc
191	8.001585	66	62.572173	62.572174
#...
5713	95.008094	26	25.050297	23.441636
#######	End External Standard information	#######
    


#######	Begin powder crystal structures	#######
data_Goethite_0020
_pd_phase.id	Goethite_0020
#...
data_Hematite_0020
_pd_phase.id	Hematite_0020
#...
data_Quartz_0020
_pd_phase.id	Quartz_0020
#...
data_Kaolinite_0020
_pd_phase.id	Kaolinite_0020
#...
data_Nacrite_0020
_pd_phase.id	Nacrite_0020
#...
data_Anatase_0020
_pd_phase.id	Anatase_0020
#...
data_Rutile_0020
_pd_phase.id	Rutile_0020
#...
#######	End powder crystal structures	#######
@jamesrhester
Copy link
Contributor

What is the correct way to define a data item that is used to point to another place which contains the information you're after?

The first thing to do is to not think in terms of "pointing" to a "place" that "contains" something. Instead, you are simply "identifying" something - a diffractogram, or a phase, or an instrument, etc. So your first definition (the current one) seems correct to me.

The example also seems correct to me. It is a little strange to think that _pd_qpa_external_std.diffractogram_id has the value SRM676A, but I guess it makes sense to say that it is also calibrating itself, as well as being used by other diffractograms.

# _pd_qpa_external_std.diffractogram_id gets the value "SRM676A"
# solely due to the fact that _pd_diffractogram.id exists in this
# block, and has the value "SRM676A"

@rowlesmr
Copy link
Collaborator Author

It is a little strange to think that _pd_qpa_external_std.diffractogram_id has the value SRM676A

To my mind, the SRM676A diffractogram owns the calibration value, and all other places are merely borrowing it.

Now that I think about it, as you need to collect the unknown data under identical circumstances, isn't the calibration owned by the diffrn.id? And then you need a seperate (hypothetical) _pd_diffrn.spec_id to identify each specimen for each diffraction experiment?

.

I don't know if I'm breaking out of my baliwick, but I'm trying to think up how to make a collection of powder CIF blocks into a single set of database tables, rather than a separate set for each block, and so I need to be able to uniquely identify things.

@jamesrhester
Copy link
Contributor

I think PD_DIFFRACTOGRAM just needs a pointer to _diffrn.id, and then we have identified the conditions under which a diffractogram was measured. Sort of puzzled we don't have that yet, unless there's an indirect link.

Anyway, with that in place, SRM676A has a well-defined _diffrn.id, as do all other diffractograms, and they may differ slightly. A validation routine can decide if the variance is acceptable.

Not sure about the spec_id suggestion. The DIFFRN category does have a pointer to _exptl_crystal.id, which makes the particular crystal a part of the diffraction conditions, so by analogy spec_id has a place there as well. But spec_id is already pointed to by PD_DIFFRACTOGRAM so is already taken care of, I think.

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

No branches or pull requests

2 participants