polyanskiy / refractiveindex.info-database

Database of optical constants
Creative Commons Zero v1.0 Universal
159 stars 55 forks source link

Minor fixes to library.yml #18

Closed tnorth closed 7 years ago

tnorth commented 7 years ago

Hi Mikhail,

Here are some minor fixes for library.yml, to ensure that the YAML format is correct and can be parsed.

Thanks! Thibault

polyanskiy commented 7 years ago

wow! how do you do this?

tnorth commented 7 years ago

I use that script of https://github.com/polyanskiy/refractiveindex.info-scripts/commit/be71c0c0d0181d404f8a06d426b21cb96ae9d5e9 :)

If you run it on the database/ folder, the Python YAML parser tries to parse library.yml and will complain if there are error, and ensure that all YAML files in the database are in the index (and vice-versa).

Here is the script output:

[tnorth@localhost check_db]$ python check_db.py ../../refractiveindex.info-database/database/
File number mismatch: 1793 files in the index, 1718 files on disk
1718 unique files in the index, 1718 unique files on disk

../../refractiveindex.info-database/database/main/Hg/Inagaki.yml appears 3 times in the index
../../refractiveindex.info-database/database/glass/schott/N-BAF10.yml appears 3 times in the index
../../refractiveindex.info-database/database/main/SiO2/Malitson.yml appears 3 times in the index
../../refractiveindex.info-database/database/glass/schott/N-BK7.yml appears 3 times in the index
../../refractiveindex.info-database/database/main/Fe/Ordal.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/lzos/K8.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hoya/E-FD5.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/ohara/S-BAH10.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/(C16H14O3)n - polycarbonate/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/sumita/K-SFLD10.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/ohara/S-BAL11.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/H2O/Hale.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Si/Vuye-20C.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Ag/Rakic-BB.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/C3H6O - acetone/Rheims.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-BK7A.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/commercial plastics/ZeonexE48R/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-SF11.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-LASF9.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/H-K9L.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-SF11.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Cu/Rakic-BB.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Pt/Rakic-BB.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/(C5H8O2)n - poly(methyl methacrylate)/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/alloys/Cu-Zn/Querry-Cu70Zn30.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Pb/Golovashkin-293.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/ZF2.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-BAK1.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/commercial plastics/Optorez1330/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/semiconductor alloys/AlSb-GaSb/Ferrini-0.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/misc/soda-lime/Rubin-grey.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-SF10.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/sumita/K-SFLD11.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/C6H6 - benzene/Moutzouris.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Au/Rakic-BB.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/misc/soda-lime/Rubin-green.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/misc/soda-lime/Rubin-bronze.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/soots/diesel soot/Querry-NMSU.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/mixed crystals/ZrO2-Y2O3/Wood.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/commercial plastics/NAS-21/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/misc/soda-lime/Rubin-clear.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/ZF4.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/H2O/Warren.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/(C8H8)n - polystyren/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/(C6H9NO)n - polyvinylpyrrolidone/Konig.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-BAF10.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/sumita/K-SFLD5.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-SF10.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/soots/propane soot/Dalzell.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-SF5.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/C/Phillip.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Ge/Aspnes.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/ohara/S-BSL7.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-SF5.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hoya/E-FD10.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/H-BAK8.yml appears 2 times in the index
../../refractiveindex.info-database/database/organic/(C6H10O5)n - cellulose/Sultanova.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hoya/BSC7.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hoya/BAF10.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/hikari/J-BAK1.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/H-ZBAF52.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Fe/Johnson.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Al/Rakic-BB.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Ti/Johnson.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/schott/N-FK51A.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/mixed crystals/HfO2-Y2O3/Wood.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/NaCl/Li.yml appears 2 times in the index
../../refractiveindex.info-database/database/other/soots/acetylene soot/Dalzell.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/sumita/K-BK7.yml appears 2 times in the index
../../refractiveindex.info-database/database/main/Al2O3/Malitson-o.yml appears 2 times in the index
../../refractiveindex.info-database/database/glass/cdgm/ZF13.yml appears 2 times in the index

Files in one set but not the other: 

All files of the index have their counterpart on disk.

(I guess that it's a feature that some materials appear in several categories in the index)