nmrium icon indicating copy to clipboard operation
nmrium copied to clipboard

Ranges / integrals, default behaviour and value

Open jliermann opened this issue 1 year ago • 5 comments

The current behaviour of the range / integral tool with a sum value and relative integration is somewhat confusing to synthetic chemists. I suggest that the first integral placed should always have an absolute value of 1.

@evaziegler

jliermann avatar May 22 '24 15:05 jliermann

First step would be to add the 'link' toggle from integrals and ranges saved in the workspace

image

Second step: if the link is unselected and we add a first integral or range it's value is set to '1'.

lpatiny avatar May 27 '24 14:05 lpatiny

@lpatiny

Toggle the integrals and ranges are specific to each spectrum, which is why they are included in the view object rather than in the workspace. The workspace is intended for general settings.

hamed-musallam avatar Jun 07 '24 08:06 hamed-musallam

Thanks Hamed. I think this can be changed without any migration script. Those settings can be in the workspace and not related to a spectrum. They can be specific for a nucleus (1H, 13C, 19F) and saved in the workspace.

lpatiny avatar Jun 07 '24 08:06 lpatiny

Sorry, that was a mistake on my part. These options belong to the ranges and integrals settings:

{
  options: { isSumConstant: boolean },
  values: []
}

hamed-musallam avatar Jun 07 '24 08:06 hamed-musallam

@lpatiny we rely on this option to adjust the relative value. If we move this option to the workspace, we still need to keep it in the data because the ranges and integrals reducer actions check this option whenever we modify ranges or integrals. Otherwise, we would need to pass this option in all actions related to ranges and integrals

hamed-musallam avatar Jun 07 '24 08:06 hamed-musallam