libamtrack / web

Web interface for libamtrack
https://libamtrack.github.io/web/
GNU General Public License v3.0
7 stars 2 forks source link

Improve validation for CSDA functions #76

Open adudzik opened 5 years ago

adudzik commented 5 years ago

I had some problems with setting correct values for functions that I added in #74. I tried to find them directly in library repository but it was very difficult. Could you @grzanka specify values or ranges which will be appropriate for that functions?

I especially mean function CSDA Energy After Slab but for all this functions when you insert incorrect parameters the application will crash. Error messages appearing in browser console aren't very helpful:

image

grzanka commented 5 years ago

As for physical meaning: slab thickness should be less than range of particle with given energy.

You are right that core library lacks any error checking mechanism: https://github.com/libamtrack/library/blob/master/src/AT_DataRange.c#L133

Please file and issue for that

adudzik commented 5 years ago

I've created an issue for that in core library: #11. Please let me know, if description I provided in that issue is unsatisfying.