echemdb / svgdigitizer

(x,y) Data Points from SVG files
https://echemdb.github.io/svgdigitizer/
GNU General Public License v3.0
17 stars 8 forks source link

False exported values caused by units #165

Closed FMMechem closed 1 year ago

FMMechem commented 1 year ago

When exporting CV data with the coordinate system label "j1: µA cm^-2", the exported data does not match the data in the figure. With "j1: A" the correct data is exported. With "j1: µA" the data are exported with a division factor of 10^6.

Attached are three .svg data with "j1: µA cm^-2", "j1: A" and "j1: µA". .csv created with svgdigitizer cv --sampling-interval=0.001 filename.svg

µA µAcm-2 A

DunklesArchipel commented 1 year ago

@FMMechem the factor you observe is actually intentional since the exported data is in SI units. We apologize that this is not clearly documented. Since the CSV only contains dimensions as column headers it seems to be reasonable to assume that the underlying data is in SI units. In the JSON created along with the data, both the original axis units are found in the figure_description section and the exported units in the data_decsription section.

linuxrider commented 1 year ago

@DunklesArchipel Actually, I was hit by this, too. Several times. Even I should how works. Can we have a flag which sets the output to SI units? e.g --si

DunklesArchipel commented 1 year ago

That sounds like a good idea, especially since the regular digitizing option (not cv) does not have an option for SI conversion.

DunklesArchipel commented 1 year ago

Fixed in #178