LIMS-2054: Dont exclude peaks from MCA spectra#1036
Conversation
|
I think that is just what the analysis results file says. @pblowey might be able to tell us why that is. |
|
The file that SynchWeb reads has peak counts as peak areas, however, Synchweb must be applying some logic to estimate a peak height for showing the labels. Do you know where that logic exists in the SynchWeb code? |
|
I think Synchweb assumes they are heights, not areas, so this quite wide Zn peak gets a label a bit too high. Some logic is at https://github.com/DiamondLightSource/SynchWeb/blob/master/api/src/Page/DC.php#L1255 (basically it passing the contents of results.dat) and then more logic at https://github.com/DiamondLightSource/SynchWeb/blob/master/client/src/js/modules/dc/views/mcaplot.js#L29 |
|
I'm not 100% sure that I'm following the code correctly but what I think it is doing is this:
I think this probably works well enough to make the labels readable and obvious enough as to which peak they refer to but we may see some variance in the heights of the label above the peak with different peak widths. |
|
Yeah that's my reading too. So I think the slight variance in label heights is not a problem, or not enough of a problem to affect this PR at least! |
|
That makes sense! Sorry, I was away the last two days |


JIRA ticket: LIMS-2054
Summary:
The SynchWeb view of MCA spectra uses logic to determine whether to label fitted peaks by comparing the energy of emission lines to a cutoff applied to exclude the Compton scattering region of the spectrum (currently applied as a blanket beam energy - 1 keV cutoff).
This logic is redundant as similar logic is applied at the analysis step and peaks would not be included in the results file if they fall into this cutoff region. The code should therefore be removed to avoid needing to change logic in two locations if the application of the cutoff needs to be modified.
Changes:
To test:
NB
There is also code to plot the graph within 1100eV as a different colour, just above this change. That is to be addressed in ticket LIMS-2055