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

update PD_CALIBRATION #134

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rowlesmr
Copy link
Collaborator

@rowlesmr rowlesmr commented Jun 6, 2023

Will close #133. Also applicable to #132.

This PR enhances PD_CALIBRATION by providing a category key based on the diffractogram_id to which the calibration applies, and a dataitem to record the diffractogram_id of the reference diffraction pattern from which the calibration was made.

@rowlesmr
Copy link
Collaborator Author

Question:
Both _pd_calibration.diffractogram_id and _pd_calibration.ref_diffractogram_id are defined as

    _name.linked_item_id          '_pd_diffractogram.id'
    _type.purpose                 Link

Does this mean that if neither of these is given a value, they take on the value of _pd_diffractogram.id if it is given in the same data block?

eg:

data_aDiffractionPattern
	_pd_diffractogram.id de14a39d-0d2b-44d5-b830-522b8c68f441 

	_pd_calibration.conversion_eqn          "E = 50000 + 100 * ch#"
	_pd_calibration.special_details         "Looks like the best fit"
	# _pd_calibration.diffractogram_id      takes the value of _pd_diffractogram.id from above?
	# _pd_calibration.ref_diffractogram_id  takes the value of _pd_diffractogram.id from above?

	loop_
	_pd_data.point_id
	_pd_meas.detector_id
	_pd_proc.energy_detection
	_pd_meas.counts_total
	a   0    50000    1234
	b   1    50100    1434
	c   2    50200    1457
	#...

The intent is that _pd_calibration.diffractogram_id is the diff_id of the diffraction pattern to which the calibration is being applied, and _pd_calibration.ref_diffractogram_id is the diff_id of the diffraction pattern from where the calibration was calibrated.

Would _pd_calibration.ref_diffractogram_id be better defined as

    # _name.linked_item_id          '_pd_diffractogram.id' #not this at all
    _type.purpose                 Encode

?

If the calibration were determined by some other method than a reference diffraction pattern, then I don't want to have a value for ref_diff_id. But, then again, a diffraction pattern to which a calibration is applied, then becomes a secondary reference pattern, so...

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.

Update PD_CALIBRATION
1 participant