feat: generate and display stocsy
Deploying nmrium with
Cloudflare Pages
| Latest commit: |
aad389f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dc949a81.nmrium.pages.dev |
| Branch Preview URL: | https://display-boxplot-stocsy.nmrium.pages.dev |
cf build error is:
15:18:52.548 | x Build failed in 6.21s
-- | --
15:18:52.550 | error during build:
15:18:52.550 | RollupError: Could not resolve "../../context/ExportPrepareContext" from "src/component/1d/matrix/Stocsy.tsx"
15:18:52.550 | file: /opt/buildhome/repo/src/component/1d/matrix/Stocsy.tsx
15:18:52.550 | at getRollupError (file:///opt/buildhome/repo/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
15:18:52.551 | at error (file:///opt/buildhome/repo/node_modules/rollup/dist/es/shared/parseAst.js:372:42)
15:18:52.551 | at ModuleLoader.handleInvalidResolvedId (file:///opt/buildhome/repo/node_modules/rollup/dist/es/shared/node-entry.js:18891:24)
15:18:52.551 | at file:///opt/buildhome/repo/node_modules/rollup/dist/es/shared/node-entry.js:18851:26
15:18:52.629 | Failed: Error while executing user command. Exited with error code: 1
- Please use SVG and allow vertical scale. We will improve with grouped path by color very soon like Norman did in the visualizer and JsGraph
- For now please use the first row as Y axis and paint the color with the returned value from stocsy
- deal with the index on which the user clicked
If I only display the STOCSY
And I just moved the scroll wheel (without ALT), nothing happened (as expected), but nevertheless, the STOCSY was redrawn.
@hamed-musallam For the boxPlot and the calculation of the 3 paths please use xyReduce. Becuase we have only color it can be used in this case.
It seems that currently the SVG is painted outside the visible div as well. This can be observed when you donwload the SVG and open it in inkscape
And this could explain it is also relatively slow when zoomed in.
Still small improvements that could be done:
- Hiding spectra yield to an error in the console
- Confusion with 'Apply processing' and 'Update processing'
The first time we open Matrix generation the button should be labeled 'Apply processing' and after we could have 2 buttons:
- Update processing: if any of the parameters change and there is a reason to update the processing
- Remove processing: this will remove the filter 'Signal processing' from all the spectra. This button should be active if there is at least one spectrum with 'Signal processing'
- Show stocsy / boxplot
The 2 toggle button should only be available if the matrix has been generated and therefore that 'Apply processing' was clicked. We should not have a matrix before the 'Apply processing' because if we superiimpose spectra from different origins we will be in trouble.
So those button should rely on the presence of the matrix.
- Vertical scroll generates a lot of internal work by react (I guess)
Not sure how this can be improved but vertical scroll wheel even if there is no redraw takes around 100mS
- Issues when selecting exclusion zones and vertical scaling
Once we have selected the select zone option there is no way to vertical scale the STOCSY anymore
- Save / reload spectra
When we save a STOCSY with all the spectra hidden we can not reload it
- Hiding spectra yield to an error in the console
The warning you see is from Blueprint.js, indicating that a tooltip is active but its content is either empty, null, or undefined.
I will implement a temporary fix for this issue in NMRium. However, the underlying problem should be addressed in the react-science button component by checking the tooltip content and disabling it if it is empty.
i created a PR in react-science the https://github.com/zakodium-oss/react-science/pull/730