Skip to content

Commit

Permalink
feat: report peaks from XRD (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
f-idiris authored Nov 14, 2023
1 parent da0074b commit 8203deb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
21 changes: 16 additions & 5 deletions app/packs/src/apps/mydb/elements/details/ViewSpectra.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class ViewSpectra extends React.Component {

formatPks({
peaks, shift, layout, isAscend, decimal, body,
isIntensity, integration, curveSt
isIntensity, integration, curveSt, waveLength
}) {
const layoutOpsObj = SpectraOps[layout];
if (!layoutOpsObj) {
Expand All @@ -226,6 +226,7 @@ class ViewSpectra extends React.Component {
const { jcamp } = this.getContent();
const { entity } = FN.buildData(jcamp);
const { features } = entity;
const { temperature } = entity;
const { observeFrequency } = Array.isArray(features)
? features[0]
: (features.editPeak || features.autoPeak);
Expand All @@ -237,7 +238,16 @@ class ViewSpectra extends React.Component {
: (features.editPeak || features.autoPeak);
const boundary = { maxY, minY };
const mBody = body || FN.peaksBody({
peaks, layout, decimal, shift, isAscend, isIntensity, boundary, integration: selectedIntegration
peaks,
layout,
decimal,
shift,
isAscend,
isIntensity,
boundary,
integration: selectedIntegration,
waveLength,
temperature
});

const { label, value, name } = selectedShift.ref;
Expand Down Expand Up @@ -332,7 +342,7 @@ class ViewSpectra extends React.Component {

writeCommon({
peaks, shift, scan, thres, analysis, layout, isAscend, decimal, body,
keepPred, isIntensity, multiplicity, integration, cyclicvoltaSt, curveSt
keepPred, isIntensity, multiplicity, integration, cyclicvoltaSt, curveSt, waveLength
}, isMpy = false) {
const { sample, handleSampleChanged } = this.props;
const si = this.getSpcInfo();
Expand All @@ -353,7 +363,8 @@ class ViewSpectra extends React.Component {
body,
isIntensity,
integration,
curveSt
curveSt,
waveLength
});
}

Expand All @@ -370,7 +381,7 @@ class ViewSpectra extends React.Component {

const cb = () => (
this.saveOp({
peaks, shift, scan, thres, analysis, keepPred, integration, multiplicity, cyclicvoltaSt, curveSt
peaks, shift, scan, thres, analysis, keepPred, integration, multiplicity, cyclicvoltaSt, curveSt, waveLength
})
);
handleSampleChanged(sample, cb);
Expand Down
7 changes: 7 additions & 0 deletions app/packs/src/utilities/quillToolbarSymbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ const opsEmmissionHead = () => (
]
);

const opsXRDHead = () => (
[
{ insert: 'XRD ' },
]
);

const opsCommonHead = () => (
[]
);
Expand All @@ -400,6 +406,7 @@ const SpectraOps = {
Emissions: { head: opsEmmissionHead, tail: opsCommonTail },
'DLS ACF': { head: opsCommonHead, tail: opsCommonTail },
'DLS intensity': { head: opsDLSIntensityHead, tail: opsCommonTail },
'X-RAY DIFFRACTION': { head: opsXRDHead, tail: opsCommonHead }
};

const reactionAnalysesMacros = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@babel/preset-react": "7.10.4",
"@citation-js/plugin-isbn": "0.3.0",
"@complat/chem-spectra-client": "1.0.0-rc18",
"@complat/react-spectra-editor": "1.0.0-rc18",
"@complat/react-spectra-editor": "1.0.0-rc19",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@novnc/novnc": "^1.2.0",
Expand Down

0 comments on commit 8203deb

Please sign in to comment.