change the contour plot behavior
- do not calculate noise every time the wheel is actioned.
- do not include the max value of the data in the contour plot, it will contain a slice of the spectrum.
- new contour levels by default are [0 - 100], the 0 level is the noise level.
- new option
numberOfZoomLevelsis the number of steps, the levels will be sampled in an exponential scale (1.25**zoom) wherezoomis an integer value between [0-`numberOfZoomLevels].
Deploying nmrium with
Cloudflare Pages
| Latest commit: |
b5963a6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dcf332b6.nmrium.pages.dev |
| Branch Preview URL: | https://1337-contour-plot-does-not-a.nmrium.pages.dev |
@hamed-musallam Could you change the behaviour so that when we move the sliders the spectrum is updated on the fly (and not on mouse release like currently) ?
A small debounce will certainly be required.
Do we want these new very large files in the repo?
Do we want these new very large files in the repo?
@jobo322 Please use 512 x 512, no need to have 1024 on 1024 I think. Also don't do it 'pretty'. Simply JSON.stringify without the '2'
The files should then be around 1.3 Mb. Just by removing the \n + spaces I went from 22Mb to 5.5 Mb.
Michael and me are also wondering if we can directly load a NMRium file. Because in this case we would also have the zip compression.
Functionality looks ok to me but for the manual change of slider that should update the contour plot after debouncing (before release of the cursor). @hamed-musallam Could you check this ?
What is left is to refactor the spectrum object and move the contours Options object to view which can be done in another PR
{
contourOptions:{
positive: {
contourLevels: [15, 100],
numberOfLayers: 10,
numberOfZoomLevels: 10,
},
negative: {
contourLevels: [15, 100],
numberOfLayers: 10,
numberOfZoomLevels: 10,
}
}
The functionalities looks better but the test are not passing. Please have a look why.
@hamed-musallam Please review the code as well.
it is fixed
Can be merged after addressing my comments.
Can we merge this PR, or are there still comments?