COMCIFS / Powder_Dictionary

CIF definitions for powder diffraction
4 stars 4 forks source link

created PD_CALIB_INTENSITY #92

Closed rowlesmr closed 1 year ago

rowlesmr commented 1 year ago

This category holds information on the intensity corrections used to calibrate detector_ids.

This is different to monitor counts and variations in incident intensity; this deals with detectors that are physically less/more sensitive that others.

jamesrhester commented 1 year ago

I suggest that the PD_CALIB_INTENSITY description should give a little description of the types of intensity calibration procedures envisaged here, e.g. collection from a standard amount of crystallline sample / a known-uniform flood field / scanning a detector bank across a peak.

rowlesmr commented 1 year ago

Can do. Should there also be a data item to specifically record this, or is special_details enough?

jamesrhester commented 1 year ago

Great, that looks much more understandable now.

Ideally (and I admit this is not always achieved in other places in current dictionaries) it should be possible to automatically use the information in this category to redo the calibration calculations, that is, to rederive the incident intensity / detector response values. I can't see this being possible at the moment as a human would need to decide on the calibration algorithm.

Also, it is now clear to me that there are two distinct types of calibrations here: one is for the detector response, and one is for the incident intensity. Both of these calibrations could be present for a given diffractogram.

I would suggest therefore two categories, one for incident intensity calibration, and one for detector response calibration. Incident intensity calibration does not depend on _detector.id, which is a further sign that really we need two categories (if the key data names are different for different data names in a category, that is telling you there is more than one category). We could also reasonably have a data name enumerating the algorithms used in calibration: for automatic derivation this data name would specify the calculation to use in order to obtain the incident intensity/ detector response. As it is an enumeration, we can easily add new algorithms.

rowlesmr commented 1 year ago

Ideally (and I admit this is not always achieved in other places in current dictionaries) it should be possible to automatically use the information in this category to redo the calibration calculations, that is, to rederive the incident intensity / detector response values. I can't see this being possible at the moment as a human would need to decide on the calibration algorithm.

side ♪: this is what I'm trying to achieve (poorly atm) with the the QPA categories.

.

I'll start on breaking it up.

rowlesmr commented 1 year ago

OK.

I've set up PD_CALIB_DETECTED_INTENSITY to record the overall response of individual detectors. It's a Loop category, currently keyed on .detector_id and id. I don't think .diffrn_id is appropriate here, as a detector calibration is probably independent on the actual experimentl currently being undertaken. I think this category is pretty good.

I've also set up PD_CALIB_INCIDENT_INTENSITY to record the overall incident intensity - it doesn't deal with point-wise variations, but overall changes. It's currently a Loop category, keyed on id. I don't think this is entirely right.

The way that I've used this type of calibration before is to collect a standard diffractogram from a NIST SRM, and then immediately collect a diffractogram from the unknown specimen. I then calculate a calibration factor based on the intensity of the SRM pattern (or peak, in my case) based on the (relative) intensity values on the NIST certificate, and apply that to the unknown. Technically, you'd need to do this before each measurement, but you could probably get away with once per day/week, so does the calibration belong to the standard diffractogram, the unknown diffractogram, or even the _diffrn.id?

jamesrhester commented 1 year ago

I agree that pd_calib_detected_intensity looks good, all it needs is an example.

It's currently a Loop category, keyed on id. I don't think this is entirely right.

so does the calibration belong to the standard diffractogram, the unknown diffractogram, or even the _diffrn.id?

To my mind, a particular intensity calibration always belongs to a particular instrument, so our new _pd_instr.id would be a parent data name for one of the key data names. Apart from that I think including an identifier data name in the key is fine, e.g. you just keep calibrating the instrument every week and assign an identifier to each calibration. As you say, an intensity calibration might be chosen to apply to multiple diffractograms, so _diffractogram.id is definitely not a key data name.

rowlesmr commented 1 year ago

I think I've done as much as I can with this one. _pd_instr.id doesn't exist in this branch yet.

rowlesmr commented 1 year ago

As you say, an intensity calibration might be chosen to apply to multiple diffractograms, so _diffractogram.id is definitely not a key data name.

Yes, the phase and diffractogram ids in this category refer to the phases and diffractogram from which the calibration was calculated, not those to which the calibration applies.

jamesrhester commented 1 year ago

Great to have these in the dictionary.