cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
55 stars 25 forks source link

Basic 2D representation component #240

Closed lpatiny closed 4 years ago

lpatiny commented 4 years ago

Try to prepare a component that allows to display 2D spectra.

The data that is generated and that should be displayed is present in the testcase:

https://github.com/cheminfo/nmr-displayer/blob/f6f56cfb0c9d719ca951fb0f2427232cc9c68a00/src/data/data2d/__tests__/Datum2D.test.js

let contour = datum2D.getContourLines();

This is really the beginning and we will discuss after about the interactions with the 2D Component. In order to display correctly the 2D you will also need the min and max X and Y that is present in datum2D.data

lpatiny commented 4 years ago

@hamed-musallam Is this example a good starting point https://observablehq.com/@d3/contours at the level of axis creation ? Will it allow after to make the zoom ?

lpatiny commented 4 years ago

@michaelwenk @steinbeck Do you have something we could use ? We would like to be able to display soon a 2D spectrum.

steinbeck commented 4 years ago

Michael is working on this. I was/am assuming that you guys communicate regularly. @Michael: Did you respond to this?

Kind regards, Chris

— Prof. Dr. Christoph Steinbeck Analytical Chemistry - Cheminformatics and Chemometrics Friedrich-Schiller-University Jena, Germany Phone Secretariat: +49-3641-948171 http://cheminf.uni-jena.de http://orcid.org/0000-0001-6966-0814

What is man but that lofty spirit - that sense of enterprise. ... Kirk, "I, Mudd," stardate 4513.3..

On 10. Feb 2020, at 18:09, Luc Patiny notifications@github.com wrote:

@michaelwenk @steinbeck Do you have something we could use ? We would like to be able to display soon a 2D spectrum.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

michaelwenk commented 4 years ago

@lpatiny For now, I developed a very simple project which is able to load in a 2D NMR jcamp file and display contour lines (svg with paths as contour) for a certain contour level. The next step is to replace the contour level increase/decrease buttons by a scrolling with mouse.

The project: https://github.com/michaelwenk/nmr-2d-displayer

As soon as there is the scrolling available (and some design things), one could try to integrate the important parts of that simple project into the nmr-displayer project.