lab-cosmo / chemiscope

An interactive structure/property explorer for materials and molecules
http://chemiscope.org
BSD 3-Clause "New" or "Revised" License
127 stars 31 forks source link

Fix exporting and importing of invalid values #353

Closed sofiia-chorna closed 1 month ago

sofiia-chorna commented 1 month ago

Issue to be fixed with this PR: 1) Export of settings with NaN values. If display mode is changed and z-axes is not selected, we export NaN to JSON as z.min and z.max are not defined; hence it breaks once someone wants to import this dataset to the chemiscope. Now we don't include such values to the exported settings.

2) Import of settings with NaN or null values. It raises an exception currently in chemiscope.org, now we send a warning about an invalid value and omit it.