Open pstahlhofen opened 2 years ago
I'll look into this in January. JCAMP allows a lot of different configurations which creates a lot of possibilities. Adding what was missing manually was a good idea, I've had to do that a lot of times (not for the LINK, but for required parameters that vendors leave out).
Alright, thank you!
##DATA TYPE= LINK
##BLOCKS=some_integer
The above is what the JCAMP standard requires, but the function only checks for ##BLOCKS=
so I guess the file that is giving you trouble is missing ##BLOCKS=
. But, is it also missing ##DATA TYPE= LINK
line?
I think the fix is to issue a warning if ##BLOCKS=
is missing, but then we'll still have to find an equal number of TITLE
and END
statements.
Is it possible to check in a multi-block JCAMP-file, if there is any block with
DATA_TYPE=LINK
and to adjust the behaviour of thesplitMultiblockDX
-function accordingly? I experienced that in cases where the LINK-block is missing, the function will now simply throw an error because it thinks that the number ofSTART
andEND
statements do not match. I viewed the code and found out that this is due to the implicit assumption that there must always be a LINK-block. In my example, however, there was no such block, so I added it manually.