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

nmredata importation: assigning ranges from auto ranges detection could lost information from nmredata #1011

Open jobo322 opened 3 years ago

jobo322 commented 3 years ago

@lpatiny, could I generate the ranges from a delta e.g from = delta - x and to = delta + x. in order to avoid the automatic ranges detection. When the spectrum has overlapped signals or big differences from the highest and smaller signals is probable that an assignation would get lost in the importation.

lpatiny commented 3 years ago

This is a topic to discuss with @djeanner because I don't know how we should proceed.

I guess we should calculate ranges based either of the from / to of the signal in case of the massif or from the delta + half ot the sum of all the couplings.

We should then add a small delta to cover the integral range.

Once the ranges are created we should check if they overlap. If it is the case we would join them (with the corresponding signal).

But this means we will somehow loose the integration that is present in the NMReData file because we are recalculating it anyway from the spectrum.

djeanner commented 3 years ago

What is the problem?

On Sat, May 1, 2021 at 14:18, Luc Patiny @.***> wrote:

This is a topic to discuss with @.***(https://github.com/djeanner) because I don't know how we should proceed.

I guess we should calculate ranges based either of the from / to of the signal in case of the massif or from the delta + half ot the sum of all the couplings.

We should then add a small delta to cover the integral range.

Once the ranges are created we should check if they overlap. If it is the case we would join them (with the corresponding signal).

But this means we will somehow loose the integration that is present in the NMReData file because we are recalculating it anyway from the spectrum.

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

lpatiny commented 3 years ago

We would like to display ranges. Ranges are a zone of integration that contains signals. Signals correspond to one kind of atom. Problem is that we don't know the zone of integration in the NMRedata and this is why I was proposing to combine your signals if they overlap and calculate the width based on the sum of coupling constants.

djeanner commented 3 years ago

This seems reasonable to me. I don’t see a problem with this approach.

On 1 May 2021, at 15:33 , Luc Patiny @.***> wrote:

We would like to display ranges. Ranges are a zone of integration that contains signals. Signals correspond to one kind of atom. Problem is that we don't know the zone of integration in the NMRedata and this is why I was proposing to combine your signals if they overlap and calculate the width based on the sum of coupling constants.

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

jobo322 commented 3 years ago

I did implement the idea of @lpatiny