Hi,
I fear, the header sounds a little bit strange and I have to explain the header first.
Due to my bad english knowledge, I had no idea how to describe my issue using a few words.
After my retirement I started to move my old educational spectra collection from PDF to tablets and smartphones.
There are much better possibility to introduce interaction and of course nowadays everybody
uses a smartphone nearly any time.
I just started, but to provide a weak impression, what I want to do:
https://nmr.haessner.net
using the account: php
and the password: Rumpelmuetzchen
You might not be able to open this page, because it's pure IPv6. I will create an IPv4
shadow copy later, but really, this project just started.
But back to my issue.
When I started the project at the end of the last millenium, Topspin provided HP-GL output.
It was easy to import this type of output using vector illustration software, like CorelDraw.
I still have these old spectra, but I want to add new ones.
HP-GL is gone and became replaced by PostScript/PDF. In principle thats no big deal, it's possible
to import PostScript and PDF as well.
During the HP-GL area a line had no width. The width of the line became defined by the plotter pen.
Using PostScript you may define the width of a line, but the TopSpin plot editor chooses another
way. Instead of drawing the spectrum as a line, the spectrum becomes decomposed into thousands
of filled polygons.
Using this methods of course the programmers have full control over the line width and have not
to rely on any presentation device to draw the correct line width.
But its a crazy pain to import this kind of spectra for further processing with JavaScript
(especially using the the d3.js framework). I tried to create a pure line from this collection
of polygons using a python script. In principle this works, but I believe, that's not the ideal
solution.
There is a second issue, much easier to solve. Cross peaks become displayed as lines (not as
polygons). But if you have a closer look, the order of these lines is funny. There is a
systematics, but the order is not "first cross peak", "second cross peak" but seems to be more
random at a first glance.
"Two lines at the seconds cross peak", "one line at the forth cross peak", "the third line at
the second cross peak", "three lines at the sixth cross peak" and so on. It's not that
complicated to get these lines into an order helpful for JavaScript (for specialists, for d3.js
I need a SVG-path) using a short python script.
The question of the polygons, however, is still open. Unfortunately I have the dumb feeling
to be unable to see the already existing simple solution.
Greetings
Rainer
Received on Sun Dec 16 2018 - 03:15:59 MST