hereon-GEMS / pydidas

Python Diffraction Data Analysis Suite (pydidas) which merges toolkits and tries to supply broad functionality for X-ray diffraction data analysis.
https://hereon-gems.github.io/pydidas/
Other
4 stars 2 forks source link

Is the word count missing? #31

Closed gudlot closed 3 months ago

gudlot commented 3 months ago

https://github.com/hereon-GEMS/pydidas/blob/5fd3a94ee99a42a7c05f346642d3f851a913c5ce/pydidas/plugins/base_fit_plugin.py#L355

 _output = _output.replace("total count intensity", "total intensity / cts")

Is the word 'count' here missing in the second argument?

malte-storm commented 3 months ago

No, this is deliberate as the counts is moved to the "unit"

gudlot commented 3 months ago

Below is the output of an imported Dataset after fitting a peak with pydidas. Obviously, there is a mismatch between axis_labels[3] (aka fit_labels) and data_label: "total count intensity" vs. "total intensity". My suggestion is to rename the "fit label" (axis_labels[3] for the peak intensity) to "total intensity" to be consistent.

Dataset(
axis_labels: {
    0: 'y'
    1: 'x'
    2: 'chi'
    3: '0: position; 1: area; 2: FWHM; 3: background at peak; 4: total count
       intensity'},
axis_ranges: {
    0: array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5, 6. ,
              6.5, 7. , 7.5, 8. , 8.5])
    1: array([ 0. ,  0.5, ...,  9.5, 10. ])
    2: array([-174.987382, -164.987736, ...,  165.000559,  175.000204])
    3: array([0, 1, 2, 3, 4])},
axis_units: {
    0: 'um'
    1: 'um'
    2: 'deg'
    3: ''},
metadata: {'indices': '[]', 'dataset': 'entry/data/data'},
data_unit: ,
data_label: position / nm^-1; area / (cts * nm^-1); FWHM / nm^-1; background at peak / cts; total intensity / cts,
array([[[[ 26.081963,   8.901319, ...,   3.462794, 197.2645  ],
      dtype=float32)
)