module LZOS
using ..AGFFileReader: Glass, GlassID, AGF
export LZ_BF16, LZ_CTK8, LZ_TK12, LZ_K100, LZ_NEWGLASS, LZ_LK5, LZ_TF5, LZ_TF10, LZ_TF1, LZ_LF9, LZ_TK2, LZ_LK6, LZ_BK10, LZ_LK7, LZ_KF6, LZ_TK17, LZ_CTK9, LZ_CTK12, LZ_F13, LZ_TBF10, LZ_OK4, LZ_BF1, LZ_BF7, LZ_LF5, LZ_BF21, LZ_CTK19, LZ_BF25, LZ_F6, LZ_K8, LZ_TK20, LZ_TF4, LZ_F4, LZ_BF28, LZ_TK9, LZ_TK21, LZ_KF7, LZ_TF8, LZ_BK8, LZ_CTK3, LZ_F1, LZ_BK6, LZ_TF7, LZ_TF3, LZ_TK16, LZ_BF24, LZ_LF7, LZ_BF8, LZ_TK14, LZ_BF11, LZ_BK4, LZ_TF2, LZ_F8, LZ_OF1, LZ_LK3, LZ_TK23

const LZ_BF16 = Glass(GlassID(AGF, 1650), 1, 2.73156011, -0.00928065848, 0.0207033959, 0.000478409191, -6.64344655e-6, 2.01680308e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0012, -1.0, -1.0, 8.4, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.047, 10.0), (0.36, 0.49, 10.0), (0.38, 0.831, 10.0), (0.4, 0.915, 10.0), (0.42, 0.957, 10.0), (0.44, 0.972, 10.0), (0.46, 0.981, 10.0), (0.48, 0.988, 10.0), (0.5, 0.992, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.996, 10.0), (0.62, 0.995, 10.0), (0.64, 0.995, 10.0), (0.66, 0.995, 10.0), (0.68, 0.996, 10.0), (0.7, 0.996, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.993, 10.0), (1.0, 0.993, 10.0), (1.05, 0.993, 10.0), (1.1, 0.993, 10.0), (1.2, 0.994, 10.0), (1.3, 0.994, 10.0), (1.4, 0.994, 10.0), (1.5, 0.993, 10.0), (1.5, 1.0e-6, 10.0)], 1.671024, -1.0, -1.0, 0, 47.298918, 0, 4.02, 0.0)
const LZ_CTK8 = Glass(GlassID(AGF, 1651), 1, 2.84777546, -0.0120274217, 0.0114858486, 0.00437207651, -0.000647076967, 3.76296896e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0023, -1.0, -1.0, 9.2, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 1.0e-6, 10.0), (0.4, 0.947, 10.0), (0.42, 0.968, 10.0), (0.44, 0.977, 10.0), (0.46, 0.983, 10.0), (0.48, 0.988, 10.0), (0.5, 0.992, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.996, 10.0), (1.2, 0.996, 10.0), (1.3, 0.996, 10.0), (1.4, 0.996, 10.0), (1.5, 0.996, 10.0), (1.5, 1.0e-6, 10.0)], 1.703085, -1.0, -1.0, 0, 48.927733, 0, 4.16, 0.0)
const LZ_TK12 = Glass(GlassID(AGF, 1652), 1, 2.42940597, -0.011395594, 0.0104342309, 0.000984738195, -0.000127587405, 7.2645646e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0004, -1.0, -1.0, 6.5, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.954, 10.0), (0.4, 0.985, 10.0), (0.42, 0.989, 10.0), (0.44, 0.989, 10.0), (0.46, 0.992, 10.0), (0.48, 0.994, 10.0), (0.5, 0.995, 10.0), (0.52, 0.996, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.995, 10.0), (0.64, 0.994, 10.0), (0.66, 0.995, 10.0), (0.68, 0.995, 10.0), (0.7, 0.996, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.995, 10.0), (1.10001, 1.0e-6, 10.0)], 1.568875, -1.0, -1.0, 0, 62.675048, 0, 3.06, 0.0)
const LZ_K100 = Glass(GlassID(AGF, 1653), 1, 2.28815478, -0.00930968992, 0.000827843888, 0.00630164765, -0.00128813048, 9.15821978e-5, 0.0, 0.0, NaN, NaN, 0.40466, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0014, -1.0, -1.0, 7.8, -1.0, 0.0, -1.0, [(0.38, 0.882, 10.0), (0.4, 0.971, 10.0), (0.42, 0.982, 10.0), (0.44, 0.985, 10.0), (0.46, 0.989, 10.0), (0.48, 0.991, 10.0), (0.5, 0.993, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.994, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.996, 10.0), (0.7, 0.996, 10.0), (0.75, 0.997, 10.0), (0.8, 0.997, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.997, 10.0), (1.4, 0.993, 10.0), (1.4001, 0.0, 10.0), (1.4002, 0.0, 10.0)], 1.521628, -1.0, -1.0, 0, 57.832325, 0, 2.63, 0.0)
const LZ_NEWGLASS = Glass(GlassID(AGF, 1654), 1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0, -1.0, -1.0, 0.0, -1.0, 0.0, -1.0, [(0.3, 0.0, 10.0), (0.32, 0.0, 10.0), (0.34, 0.0, 10.0), (0.36, 0.0, 10.0), (0.38, 0.0, 10.0), (0.4, 0.0, 10.0), (0.42, 0.0, 10.0), (0.44, 0.0, 10.0), (0.46, 0.0, 10.0), (0.48, 0.0, 10.0), (0.5, 0.0, 10.0), (0.52, 0.0, 10.0), (0.54, 0.0, 10.0), (0.56, 0.0, 10.0), (0.58, 0.0, 10.0), (0.6, 0.0, 10.0), (0.62, 0.0, 10.0), (0.64, 0.0, 10.0), (0.66, 0.0, 10.0), (0.68, 0.0, 10.0), (0.7, 0.0, 10.0), (0.75, 0.0, 10.0), (0.8, 0.0, 10.0), (0.9, 0.0, 10.0), (1.0, 0.0, 10.0), (1.1, 0.0, 10.0), (1.2, 0.0, 10.0), (1.3, 0.0, 10.0), (1.4, 0.0, 10.0), (1.5, 0.0, 10.0)], 1.55, -1.0, -1.0, 0, 30.0, 0, 1.0, 0.0)
const LZ_LK5 = Glass(GlassID(AGF, 1655), 1, 2.16172762, -0.010680729, 0.0078959556, 0.000701313828, -9.09783305e-5, 5.12053096e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0012, -1.0, -1.0, 3.5, -1.0, 0.0, -1.0, [(0.32, 0.141, 10.0), (0.34, 0.596, 10.0), (0.36, 0.854, 10.0), (0.38, 0.914, 10.0), (0.4, 0.973, 10.0), (0.42, 0.973, 10.0), (0.44, 0.975, 10.0), (0.46, 0.984, 10.0), (0.48, 0.987, 10.0), (0.5, 0.99, 10.0), (0.52, 0.992, 10.0), (0.54, 0.993, 10.0), (0.56, 0.993, 10.0), (0.58, 0.991, 10.0), (0.6, 0.99, 10.0), (0.62, 0.99, 10.0), (0.64, 0.99, 10.0), (0.66, 0.991, 10.0), (0.68, 0.992, 10.0), (0.7, 0.993, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.995, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.994, 10.0), (1.4, 0.97, 10.0), (1.5, 0.992, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.478156, -1.0, -1.0, 0, 65.29558, 0, 2.27, 0.0)
const LZ_TF5 = Glass(GlassID(AGF, 1656), 1, 2.96058035, -0.0093389098, 0.0373866774, 0.00188114598, -6.3553719e-5, 1.35532965e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0056, -1.0, -1.0, 8.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.063, 10.0), (0.38, 0.444, 10.0), (0.4, 0.806, 10.0), (0.42, 0.904, 10.0), (0.44, 0.956, 10.0), (0.46, 0.975, 10.0), (0.48, 0.985, 10.0), (0.5, 0.99, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.997, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.998, 10.0), (1.4, 0.997, 10.0), (1.5, 0.995, 10.0), (1.5, 1.0e-6, 10.0)], 1.755234, -1.0, -1.0, 0, 27.512609, 0, 4.77, 0.0)
const LZ_TF10 = Glass(GlassID(AGF, 1657), 1, 3.12158254, -0.00958842044, 0.0417028532, 0.00329045461, -0.000251146907, 2.92306112e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0075, -1.0, -1.0, 8.1, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.24, 10.0), (0.4, 0.61, 10.0), (0.42, 0.848, 10.0), (0.44, 0.931, 10.0), (0.46, 0.967, 10.0), (0.48, 0.984, 10.0), (0.5, 0.991, 10.0), (0.52, 0.994, 10.0), (0.54, 0.996, 10.0), (0.56, 0.997, 10.0), (0.58, 0.997, 10.0), (0.6, 0.996, 10.0), (0.62, 0.995, 10.0), (0.64, 0.995, 10.0), (0.66, 0.995, 10.0), (0.68, 0.996, 10.0), (0.7, 0.997, 10.0), (0.75, 0.998, 10.0), (0.8, 0.997, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.997, 10.0), (1.4, 0.993, 10.0), (1.5, 0.997, 10.0), (1.5, 1.0e-6, 10.0)], 1.806276, -1.0, -1.0, 0, 25.353304, 0, 5.19, 0.0)
const LZ_TF1 = Glass(GlassID(AGF, 1658), 1, 2.63683784, -0.00915649038, 0.0244839699, 0.00136956866, -7.89238359e-5, 8.68758585e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0006, -1.0, -1.0, 8.6, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.84, 10.0), (0.4, 0.96, 10.0), (0.42, 0.977, 10.0), (0.44, 0.983, 10.0), (0.46, 0.988, 10.0), (0.48, 0.991, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.996, 10.0), (1.3, 0.997, 10.0), (1.4, 0.993, 10.0), (1.5, 0.993, 10.0), (1.5, 1.0e-6, 10.0)], 1.64766, -1.0, -1.0, 0, 33.843147, 0, 3.86, 0.0)
const LZ_LF9 = Glass(GlassID(AGF, 1659), 1, 2.43971558, -0.0100883571, 0.0175323123, 0.00149801974, -0.000153207988, 1.33947598e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0055, -1.0, -1.0, 8.9, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.885, 10.0), (0.4, 0.93, 10.0), (0.42, 0.961, 10.0), (0.44, 0.97, 10.0), (0.46, 0.981, 10.0), (0.48, 0.984, 10.0), (0.5, 0.988, 10.0), (0.52, 0.991, 10.0), (0.54, 0.992, 10.0), (0.56, 0.993, 10.0), (0.58, 0.994, 10.0), (0.6, 0.993, 10.0), (0.62, 0.992, 10.0), (0.64, 0.992, 10.0), (0.66, 0.992, 10.0), (0.68, 0.993, 10.0), (0.7, 0.994, 10.0), (0.75, 0.997, 10.0), (0.8, 0.999, 10.0), (0.9, 0.999, 10.0), (1.0, 0.999, 10.0), (1.05, 0.999, 10.0), (1.1, 0.999, 10.0), (1.10001, 1.0e-6, 10.0)], 1.580128, -1.0, -1.0, 0, 37.952693, 0, 2.61, 0.0)
const LZ_TK2 = Glass(GlassID(AGF, 1660), 1, 2.43491314, -0.00919944304, 0.0124374705, 0.00080428226, -8.9719479e-5, 5.20398686e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0003, -1.0, -1.0, 7.0, -1.0, 0.0, -1.0, [(0.3, 0.0, 10.0), (0.32, 0.0, 10.0), (0.34, 0.827, 10.0), (0.36, 0.91, 10.0), (0.38, 0.958, 10.0), (0.4, 0.985, 10.0), (0.42, 0.989, 10.0), (0.44, 0.989, 10.0), (0.46, 0.992, 10.0), (0.48, 0.993, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.996, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.993, 10.0), (0.75, 0.993, 10.0), (0.8, 0.992, 10.0), (0.9, 0.99, 10.0), (1.0, 0.989, 10.0), (1.05, 0.989, 10.0), (1.1, 0.989, 10.0), (1.1001, 0.0, 10.0), (1.1002, 0.0, 10.0)], 1.572482, -1.0, -1.0, 0, 57.325385, 0, 3.2, 0.0)
const LZ_LK6 = Glass(GlassID(AGF, 1661), 1, 2.13954871, -0.00974500629, 0.00776174717, 0.000612372701, -7.65186333e-5, 4.28387671e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0017, -1.0, -1.0, 8.2, -1.0, 0.0, -1.0, [(0.3, 0.0, 10.0), (0.32, 0.478, 10.0), (0.34, 0.834, 10.0), (0.36, 0.949, 10.0), (0.38, 0.954, 10.0), (0.4, 0.987, 10.0), (0.42, 0.982, 10.0), (0.44, 0.983, 10.0), (0.46, 0.989, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.995, 10.0), (0.58, 0.994, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.996, 10.0), (0.8, 0.997, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.05, 0.999, 10.0), (1.1, 0.999, 10.0), (1.2, 0.999, 10.0), (1.3, 0.999, 10.0), (1.4, 0.982, 10.0), (1.5, 0.99, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.470458, -1.0, -1.0, 0, 66.615189, 0, 2.3, 0.0)
const LZ_BK10 = Glass(GlassID(AGF, 1662), 1, 2.42307849, -0.00901143483, 0.0123563026, 0.000933303938, -0.00010872319, 6.35375981e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0, -1.0, -1.0, 7.1, -1.0, 0.0, -1.0, [(0.32, 0.155, 10.0), (0.34, 0.612, 10.0), (0.36, 0.849, 10.0), (0.38, 0.933, 10.0), (0.4, 0.978, 10.0), (0.42, 0.982, 10.0), (0.44, 0.986, 10.0), (0.44, 0.99, 10.0), (0.46, 0.992, 10.0), (0.48, 0.994, 10.0), (0.5, 0.995, 10.0), (0.52, 0.996, 10.0), (0.54, 0.996, 10.0), (0.56, 0.995, 10.0), (0.58, 0.994, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.993, 10.0), (0.75, 0.992, 10.0), (0.8, 0.99, 10.0), (0.9, 0.987, 10.0), (1.0, 0.986, 10.0), (1.05, 0.985, 10.0), (1.1, 0.986, 10.0), (1.2, 0.986, 10.0), (1.3, 0.986, 10.0), (1.4, 0.985, 10.0), (1.5, 0.983, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.568883, -1.0, -1.0, 0, 55.848531, 0, 3.12, 0.0)
const LZ_LK7 = Glass(GlassID(AGF, 1663), 1, 2.17594904, -0.0105105286, 0.00738823894, 0.000926815589, -0.000129026566, 7.28029068e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0, -1.0, -1.0, 4.4, -1.0, 0.0, -1.0, [(0.3, 0.39, 10.0), (0.32, 0.526, 10.0), (0.34, 0.83, 10.0), (0.36, 0.936, 10.0), (0.38, 0.938, 10.0), (0.4, 0.986, 10.0), (0.42, 0.978, 10.0), (0.44, 0.975, 10.0), (0.46, 0.982, 10.0), (0.48, 0.983, 10.0), (0.5, 0.986, 10.0), (0.52, 0.989, 10.0), (0.54, 0.991, 10.0), (0.56, 0.991, 10.0), (0.58, 0.991, 10.0), (0.6, 0.99, 10.0), (0.62, 0.989, 10.0), (0.64, 0.989, 10.0), (0.66, 0.989, 10.0), (0.68, 0.99, 10.0), (0.7, 0.992, 10.0), (0.75, 0.994, 10.0), (0.8, 0.996, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.997, 10.0), (1.4, 0.976, 10.0), (1.5, 0.994, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.48286, -1.0, -1.0, 0, 66.017997, 0, 2.3, 0.0)
const LZ_KF6 = Glass(GlassID(AGF, 1664), 1, 2.22150549, -0.00915658236, 0.00968676984, 0.000900839913, -0.000111722492, 6.5783197e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0002, -1.0, -1.0, 6.8, -1.0, 0.0, -1.0, [(0.3, 0.17, 10.0), (0.32, 0.555, 10.0), (0.34, 0.903, 10.0), (0.36, 0.976, 10.0), (0.38, 0.978, 10.0), (0.4, 0.993, 10.0), (0.42, 0.99, 10.0), (0.44, 0.989, 10.0), (0.46, 0.991, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.994, 10.0), (0.6, 0.993, 10.0), (0.62, 0.992, 10.0), (0.64, 0.991, 10.0), (0.66, 0.991, 10.0), (0.68, 0.992, 10.0), (0.7, 0.992, 10.0), (0.75, 0.992, 10.0), (0.8, 0.991, 10.0), (0.9, 0.987, 10.0), (1.0, 0.984, 10.0), (1.05, 0.984, 10.0), (1.1, 0.984, 10.0), (1.10001, 1.0e-6, 10.0)], 1.50057, -1.0, -1.0, 0, 56.963856, 0, 2.52, 0.0)
const LZ_TK17 = Glass(GlassID(AGF, 1665), 1, 2.61006508, -0.0114126401, 0.0129266114, 0.00115533766, -0.000144652472, 8.27877187e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0002, -1.0, -1.0, 7.6, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.932, 10.0), (0.4, 0.966, 10.0), (0.42, 0.982, 10.0), (0.44, 0.986, 10.0), (0.46, 0.989, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.996, 10.0), (0.54, 0.997, 10.0), (0.56, 0.997, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.996, 10.0), (0.8, 0.995, 10.0), (0.9, 0.994, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.994, 10.0), (1.4, 0.993, 10.0), (1.5, 0.992, 10.0), (1.5, 1.0e-6, 10.0)], 1.627983, -1.0, -1.0, 0, 59.126204, 0, 3.66, 0.0)
const LZ_CTK9 = Glass(GlassID(AGF, 1666), 1, 2.97705454, -0.0155247779, 0.0176170009, 0.00237738072, -0.000312943932, 1.80886898e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0098, -1.0, -1.0, 5.7, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.043, 10.0), (0.34, 0.218, 10.0), (0.36, 0.561, 10.0), (0.38, 0.797, 10.0), (0.4, 0.911, 10.0), (0.42, 0.953, 10.0), (0.44, 0.968, 10.0), (0.46, 0.977, 10.0), (0.48, 0.983, 10.0), (0.5, 0.989, 10.0), (0.52, 0.991, 10.0), (0.54, 0.994, 10.0), (0.56, 0.994, 10.0), (0.58, 0.992, 10.0), (0.6, 0.992, 10.0), (0.62, 0.992, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.992, 10.0), (0.75, 0.993, 10.0), (0.8, 0.993, 10.0), (0.9, 0.996, 10.0), (1.0, 0.996, 10.0), (1.05, 0.995, 10.0), (1.1, 0.995, 10.0), (1.2, 0.995, 10.0), (1.3, 0.995, 10.0), (1.4, 0.993, 10.0), (1.5, 0.991, 10.0), (1.5, 1.0e-6, 10.0)], 1.74251, -1.0, -1.0, 0, 49.951318, 0, 4.11, 0.0)
const LZ_CTK12 = Glass(GlassID(AGF, 1667), 1, 2.81377959, -0.0150907921, 0.0159416742, 0.00135673219, -0.000160742037, 9.00882071e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0076, -1.0, -1.0, 6.7, -1.0, 0.0, -1.0, [(0.3, 0.063, 10.0), (0.32, 0.24, 10.0), (0.34, 0.574, 10.0), (0.36, 0.799, 10.0), (0.38, 0.906, 10.0), (0.4, 0.975, 10.0), (0.42, 0.983, 10.0), (0.44, 0.985, 10.0), (0.46, 0.99, 10.0), (0.48, 0.993, 10.0), (0.5, 0.996, 10.0), (0.52, 0.996, 10.0), (0.54, 0.997, 10.0), (0.56, 0.996, 10.0), (0.58, 0.993, 10.0), (0.6, 0.995, 10.0), (0.62, 0.995, 10.0), (0.64, 0.994, 10.0), (0.66, 0.995, 10.0), (0.68, 0.996, 10.0), (0.7, 0.997, 10.0), (0.75, 0.995, 10.0), (0.8, 0.994, 10.0), (0.9, 0.995, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.996, 10.0), (1.2, 0.996, 10.0), (1.3, 0.997, 10.0), (1.4, 0.995, 10.0), (1.5, 0.994, 10.0), (1.5, 1.0e-6, 10.0)], 1.691998, -1.0, -1.0, 0, 54.774939, 0, 3.46, 0.0)
const LZ_F13 = Glass(GlassID(AGF, 1668), 1, 2.55629034, -0.00926674451, 0.0217634678, 0.00113064757, -6.42903226e-5, 6.86292105e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0, -1.0, -1.0, 7.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.288, 10.0), (0.36, 0.72, 10.0), (0.38, 0.893, 10.0), (0.4, 0.964, 10.0), (0.42, 0.978, 10.0), (0.44, 0.983, 10.0), (0.46, 0.989, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.996, 10.0), (0.62, 0.996, 10.0), (0.64, 0.995, 10.0), (0.66, 0.995, 10.0), (0.68, 0.996, 10.0), (0.7, 0.997, 10.0), (0.75, 0.998, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.998, 10.0), (1.2, 0.997, 10.0), (1.3, 0.997, 10.0), (1.4, 0.993, 10.0), (1.5, 0.994, 10.0), (1.5, 1.0e-6, 10.0)], 1.620043, -1.0, -1.0, 0, 36.312762, 0, 3.63, 0.0)
const LZ_TBF10 = Glass(GlassID(AGF, 1669), 1, 3.1854134, -0.0138979489, 0.0336848842, 0.00215987563, -0.000168106118, 1.8527248e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0041, -1.0, -1.0, 7.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.045, 10.0), (0.38, 0.651, 10.0), (0.4, 0.86, 10.0), (0.42, 0.93, 10.0), (0.44, 0.95, 10.0), (0.46, 0.963, 10.0), (0.48, 0.973, 10.0), (0.5, 0.981, 10.0), (0.52, 0.987, 10.0), (0.54, 0.991, 10.0), (0.56, 0.993, 10.0), (0.58, 0.995, 10.0), (0.6, 0.996, 10.0), (0.62, 0.997, 10.0), (0.64, 0.997, 10.0), (0.66, 0.997, 10.0), (0.68, 0.998, 10.0), (0.7, 0.998, 10.0), (0.75, 0.999, 10.0), (0.8, 0.999, 10.0), (0.9, 0.999, 10.0), (1.0, 0.999, 10.0), (1.05, 0.999, 10.0), (1.1, 0.999, 10.0), (1.2, 0.999, 10.0), (1.3, 0.999, 10.0), (1.4, 0.999, 10.0), (1.5, 0.999, 10.0), (1.5, 1.0e-6, 10.0)], 1.814808, -1.0, -1.0, 0, 33.388238, 0, 4.22, 0.0)
const LZ_OK4 = Glass(GlassID(AGF, 1670), 1, 2.0797374, -0.00704003138, 0.00540675811, 0.0002583762, -1.47913069e-5, 3.13686043e-7, 0.0, 0.0, NaN, NaN, 0.365, 0.70652, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0496, -1.0, -1.0, 14.7, -1.0, 0.0, -1.0, [(0.3, 0.217, 10.0), (0.32, 0.636, 10.0), (0.34, 0.898, 10.0), (0.36, 0.985, 10.0), (0.38, 0.996, 10.0), (0.4, 0.997, 10.0), (0.42, 0.997, 10.0), (0.44, 0.997, 10.0), (0.46, 0.997, 10.0), (0.48, 0.998, 10.0), (0.5, 0.998, 10.0), (0.52, 0.998, 10.0), (0.54, 0.998, 10.0), (0.56, 0.998, 10.0), (0.58, 0.998, 10.0), (0.6, 0.998, 10.0), (0.62, 0.997, 10.0), (0.64, 0.997, 10.0), (0.66, 0.997, 10.0), (0.68, 0.996, 10.0), (0.7, 0.996, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.995, 10.0), (1.0, 0.996, 10.0), (1.05, 0.996, 10.0), (1.1, 0.996, 10.0), (1.10001, 1.0e-6, 10.0)], 1.447342, -1.0, -1.0, 0, 92.01104, 0, 3.54, 0.0)
const LZ_BF1 = Glass(GlassID(AGF, 1671), 1, 2.29204125, -0.00969577254, 0.00993599131, 0.00129959077, -0.000170602096, 1.01977907e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0005, -1.0, -1.0, 7.2, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.964, 10.0), (0.38, 0.976, 10.0), (0.4, 0.992, 10.0), (0.42, 0.992, 10.0), (0.44, 0.992, 10.0), (0.46, 0.994, 10.0), (0.48, 0.994, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.994, 10.0), (1.0, 0.993, 10.0), (1.05, 0.993, 10.0), (1.1, 0.993, 10.0), (1.2, 0.993, 10.0), (1.3, 0.993, 10.0), (1.4, 0.987, 10.0), (1.5, 0.992, 10.0), (1.5, 1.0e-6, 10.0)], 1.524779, -1.0, -1.0, 0, 54.678186, 0, 2.67, 0.0)
const LZ_BF7 = Glass(GlassID(AGF, 1672), 1, 2.45333363, -0.00901476781, 0.0140101066, 0.000646259728, -5.55612527e-5, 3.50414686e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0002, -1.0, -1.0, 6.0, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.1, 10.0), (0.34, 0.45, 10.0), (0.36, 0.842, 10.0), (0.38, 0.944, 10.0), (0.4, 0.981, 10.0), (0.42, 0.986, 10.0), (0.44, 0.988, 10.0), (0.46, 0.991, 10.0), (0.48, 0.993, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.998, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.993, 10.0), (1.0, 0.992, 10.0), (1.05, 0.992, 10.0), (1.1, 0.992, 10.0), (1.2, 0.992, 10.0), (1.3, 0.992, 10.0), (1.4, 0.991, 10.0), (1.5, 0.99, 10.0), (1.5, 1.0e-6, 10.0)], 1.579596, -1.0, -1.0, 0, 53.767545, 0, 2.51, 0.0)
const LZ_LF5 = Glass(GlassID(AGF, 1673), 1, 2.4276347, -0.0091085506, 0.0165424679, 0.00126121546, -0.000121377375, 8.86788353e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0007, -1.0, -1.0, 7.2, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.04, 10.0), (0.34, 0.639, 10.0), (0.36, 0.907, 10.0), (0.38, 0.951, 10.0), (0.4, 0.987, 10.0), (0.42, 0.989, 10.0), (0.44, 0.989, 10.0), (0.46, 0.992, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.996, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.997, 10.0), (1.4, 0.995, 10.0), (1.5, 0.995, 10.0), (1.5, 1.0e-5, 10.0)], 1.575012, -1.0, -1.0, 0, 41.191712, 0, 3.23, 0.0)
const LZ_BF21 = Glass(GlassID(AGF, 1674), 1, 2.51357127, -0.00129528868, 0.051708665, -0.0117206736, 0.00201803154, -0.000112017691, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0001, -1.0, -1.0, 7.7, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.299, 10.0), (0.36, 0.769, 10.0), (0.38, 0.918, 10.0), (0.4, 0.964, 10.0), (0.42, 0.978, 10.0), (0.44, 0.983, 10.0), (0.46, 0.989, 10.0), (0.48, 0.991, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.996, 10.0), (0.75, 0.997, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.995, 10.0), (1.2, 0.995, 10.0), (1.2, 1.0e-6, 10.0)], 1.614225, -1.0, -1.0, 0, 42.002443, 0, 3.56, 0.0)
const LZ_CTK19 = Glass(GlassID(AGF, 1675), 1, 2.98131778, -0.0153512367, 0.0189979366, 0.00189417121, -0.000249275601, 1.55448991e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0094, -1.0, -1.0, 5.9, -1.0, 0.0, -1.0, [(0.3, 0.04, 10.0), (0.32, 0.177, 10.0), (0.34, 0.49, 10.0), (0.36, 0.764, 10.0), (0.38, 0.902, 10.0), (0.4, 0.954, 10.0), (0.42, 0.967, 10.0), (0.44, 0.973, 10.0), (0.46, 0.979, 10.0), (0.48, 0.986, 10.0), (0.5, 0.991, 10.0), (0.52, 0.993, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.996, 10.0), (0.62, 0.996, 10.0), (0.64, 0.996, 10.0), (0.66, 0.996, 10.0), (0.68, 0.996, 10.0), (0.7, 0.996, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.997, 10.0), (1.0, 0.998, 10.0), (1.05, 0.998, 10.0), (1.1, 0.999, 10.0), (1.2, 0.999, 10.0), (1.3, 0.999, 10.0), (1.4, 0.999, 10.0), (1.5, 0.998, 10.0), (1.5, 1.0e-6, 10.0)], 1.744126, -1.0, -1.0, 0, 50.259344, 0, 4.09, 0.0)
const LZ_BF25 = Glass(GlassID(AGF, 1676), 1, 2.53166932, -0.00863383325, 0.0175227595, 0.000741785351, -4.9773669e-5, 4.16332303e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.001, -1.0, -1.0, 7.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.302, 10.0), (0.36, 0.715, 10.0), (0.38, 0.873, 10.0), (0.4, 0.955, 10.0), (0.42, 0.974, 10.0), (0.44, 0.979, 10.0), (0.46, 0.985, 10.0), (0.48, 0.99, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.992, 10.0), (0.64, 0.991, 10.0), (0.66, 0.991, 10.0), (0.68, 0.991, 10.0), (0.7, 0.991, 10.0), (0.75, 0.991, 10.0), (0.8, 0.989, 10.0), (0.9, 0.986, 10.0), (1.0, 0.985, 10.0), (1.05, 0.985, 10.0), (1.1, 0.984, 10.0), (1.2, 0.985, 10.0), (1.3, 0.986, 10.0), (1.4, 0.985, 10.0), (1.5, 0.985, 10.0), (1.5, 1.0e-6, 10.0)], 1.607717, -1.0, -1.0, 0, 46.066745, 0, 3.47, 0.0)
const LZ_F6 = Glass(GlassID(AGF, 1677), 1, 2.5081748, -0.00926664366, 0.0193963679, 0.00135341288, -0.000115340433, 9.24894161e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0015, -1.0, -1.0, 7.4, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 1.0e-6, 10.0), (0.4, 0.979, 10.0), (0.42, 0.984, 10.0), (0.44, 0.985, 10.0), (0.46, 0.989, 10.0), (0.48, 0.991, 10.0), (0.5, 0.993, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.997, 10.0), (1.05, 0.998, 10.0), (1.1, 0.997, 10.0), (1.2, 0.998, 10.0), (1.3, 0.997, 10.0), (1.4, 0.992, 10.0), (1.5, 0.994, 10.0), (1.5, 1.0e-6, 10.0)], 1.603235, -1.0, -1.0, 0, 37.870876, 0, 3.48, 0.0)
const LZ_K8 = Glass(GlassID(AGF, 1678), 1, 2.27195305, -0.0105662556, 0.00931690897, 0.000684822441, -8.17556553e-5, 4.49506989e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0, -1.0, -1.0, 7.6, -1.0, 0.0, -1.0, [(0.3, 0.047, 10.0), (0.32, 0.501, 10.0), (0.34, 0.85, 10.0), (0.36, 0.967, 10.0), (0.38, 0.975, 10.0), (0.4, 0.992, 10.0), (0.42, 0.991, 10.0), (0.44, 0.99, 10.0), (0.46, 0.992, 10.0), (0.48, 0.993, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.994, 10.0), (1.0, 0.993, 10.0), (1.05, 0.993, 10.0), (1.1, 0.993, 10.0), (1.2, 0.993, 10.0), (1.3, 0.992, 10.0), (1.4, 0.967, 10.0), (1.5, 0.987, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.516367, -1.0, -1.0, 0, 63.840333, 0, 2.52, 0.0)
const LZ_TK20 = Glass(GlassID(AGF, 1679), 1, 2.58703391, -0.00966130656, 0.0149652848, 0.000633005258, -5.93845183e-5, 3.64506914e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0003, -1.0, -1.0, 7.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.023, 10.0), (0.34, 0.334, 10.0), (0.36, 0.748, 10.0), (0.38, 0.904, 10.0), (0.4, 0.968, 10.0), (0.42, 0.986, 10.0), (0.44, 0.989, 10.0), (0.46, 0.991, 10.0), (0.48, 0.994, 10.0), (0.5, 0.995, 10.0), (0.52, 0.996, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.993, 10.0), (0.8, 0.992, 10.0), (0.9, 0.989, 10.0), (1.0, 0.989, 10.0), (1.05, 0.989, 10.0), (1.1, 0.989, 10.0), (1.10001, 1.0e-6, 10.0)], 1.622089, -1.0, -1.0, 0, 56.631769, 0, 3.58, 0.0)
const LZ_TF4 = Glass(GlassID(AGF, 1680), 1, 2.91369613, -0.00939085434, 0.0355149621, 0.0017804574, -5.97294485e-5, 1.23859718e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0044, -1.0, -1.0, 8.2, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.09, 10.0), (0.38, 0.507, 10.0), (0.4, 0.822, 10.0), (0.42, 0.921, 10.0), (0.44, 0.962, 10.0), (0.46, 0.979, 10.0), (0.48, 0.988, 10.0), (0.5, 0.991, 10.0), (0.52, 0.994, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.997, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.998, 10.0), (1.3, 0.998, 10.0), (1.4, 0.996, 10.0), (1.5, 0.996, 10.0), (1.5, 1.0e-6, 10.0)], 1.740025, -1.0, -1.0, 0, 28.155393, 0, 4.65, 0.0)
const LZ_F4 = Glass(GlassID(AGF, 1681), 1, 2.56910165, -0.00921235766, 0.021753783, 0.00135425186, -9.9920825e-5, 9.17282594e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0006, -1.0, -1.0, 7.6, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.89, 10.0), (0.4, 0.962, 10.0), (0.42, 0.971, 10.0), (0.44, 0.98, 10.0), (0.46, 0.986, 10.0), (0.48, 0.989, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.992, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.05, 0.998, 10.0), (1.1, 0.997, 10.0), (1.1, 1.0e-6, 10.0)], 1.62435, -1.0, -1.0, 0, 35.893835, 0, 3.67, 0.0)
const LZ_BF28 = Glass(GlassID(AGF, 1682), 1, 2.69158831, -0.00926805586, 0.025246966, 0.00104303726, -3.80279398e-5, 6.40273561e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0007, -1.0, -1.0, 6.5, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.8, 10.0), (0.4, 0.899, 10.0), (0.42, 0.954, 10.0), (0.44, 0.973, 10.0), (0.46, 0.984, 10.0), (0.48, 0.99, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.996, 10.0), (0.8, 0.995, 10.0), (0.9, 0.994, 10.0), (1.0, 0.993, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.995, 10.0), (1.4, 0.992, 10.0), (1.5, 0.992, 10.0), (1.5, 1.0e-6, 10.0)], 1.664271, -1.0, -1.0, 0, 35.443451, 0, 3.96, 0.0)
const LZ_TK9 = Glass(GlassID(AGF, 1683), 1, 2.57082062, -0.00937761655, 0.0128028917, 0.00196440138, -0.000293263324, 1.77969401e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0007, -1.0, -1.0, 7.6, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.908, 10.0), (0.4, 0.958, 10.0), (0.42, 0.976, 10.0), (0.44, 0.981, 10.0), (0.46, 0.986, 10.0), (0.48, 0.99, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.993, 10.0), (0.75, 0.992, 10.0), (0.8, 0.991, 10.0), (0.9, 0.988, 10.0), (1.0, 0.987, 10.0), (1.05, 0.987, 10.0), (1.1, 0.987, 10.0), (1.10001, 1.0e-6, 10.0)], 1.617182, -1.0, -1.0, 0, 53.314487, 0, 3.62, 0.0)
const LZ_TK21 = Glass(GlassID(AGF, 1684), 1, 2.69129136, -0.00883561149, 0.0180045931, 0.000716414509, -5.4688791e-5, 3.7462472e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0008, -1.0, -1.0, 8.1, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.887, 10.0), (0.4, 0.939, 10.0), (0.42, 0.967, 10.0), (0.44, 0.971, 10.0), (0.46, 0.976, 10.0), (0.48, 0.983, 10.0), (0.5, 0.989, 10.0), (0.52, 0.993, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.994, 10.0), (0.8, 0.993, 10.0), (0.9, 0.992, 10.0), (1.0, 0.991, 10.0), (1.05, 0.991, 10.0), (1.1, 0.991, 10.0), (1.2, 0.992, 10.0), (1.3, 0.993, 10.0), (1.4, 0.99, 10.0), (1.5, 0.992, 10.0), (1.5, 1.0e-6, 10.0)], 1.656907, -1.0, -1.0, 0, 51.062107, 0, 3.98, 0.0)
const LZ_KF7 = Glass(GlassID(AGF, 1685), 1, 2.2676046, -0.00960405204, 0.0112639638, 0.00101025094, -0.000117978187, 7.84675481e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.001, -1.0, -1.0, 6.0, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.855, 10.0), (0.4, 0.967, 10.0), (0.42, 0.978, 10.0), (0.44, 0.98, 10.0), (0.46, 0.985, 10.0), (0.48, 0.985, 10.0), (0.5, 0.987, 10.0), (0.52, 0.988, 10.0), (0.54, 0.989, 10.0), (0.56, 0.989, 10.0), (0.58, 0.988, 10.0), (0.6, 0.987, 10.0), (0.62, 0.985, 10.0), (0.64, 0.983, 10.0), (0.66, 0.984, 10.0), (0.68, 0.988, 10.0), (0.7, 0.991, 10.0), (0.75, 0.995, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.995, 10.0), (1.4, 0.992, 10.0), (1.5, 0.992, 10.0), (1.5, 1.0e-6, 10.0)], 1.51759, -1.0, -1.0, 0, 50.999231, 0, 2.51, 0.0)
const LZ_TF8 = Glass(GlassID(AGF, 1686), 1, 2.76048757, -0.00937618097, 0.0300701363, 0.00118690238, -1.70367903e-5, 6.94635155e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0014, -1.0, -1.0, 8.1, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 1.0e-6, 10.0), (0.38, 0.841, 10.0), (0.4, 0.917, 10.0), (0.42, 0.959, 10.0), (0.44, 0.973, 10.0), (0.46, 0.982, 10.0), (0.48, 0.988, 10.0), (0.5, 0.988, 10.0), (0.52, 0.994, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.992, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.996, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.995, 10.0), (1.2, 0.995, 10.0), (1.3, 0.995, 10.0), (1.4, 0.993, 10.0), (1.5, 0.993, 10.0), (1.5, 1.0e-6, 10.0)], 1.689493, -1.0, -1.0, 0, 31.129886, 0, 4.23, 0.0)
const LZ_BK8 = Glass(GlassID(AGF, 1687), 1, 2.3626929, -0.0108658239, 0.00927841163, 0.00119101528, -0.000163068347, 9.29084884e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0005, -1.0, -1.0, 6.2, -1.0, 0.0, -1.0, [(0.36, 0.916, 10.0), (0.38, 0.96, 10.0), (0.4, 0.986, 10.0), (0.42, 0.987, 10.0), (0.44, 0.987, 10.0), (0.46, 0.99, 10.0), (0.48, 0.994, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.994, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.994, 10.0), (1.4, 0.974, 10.0), (1.5, 0.989, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.546771, -1.0, -1.0, 0, 62.415319, 0, 2.83, 0.0)
const LZ_CTK3 = Glass(GlassID(AGF, 1688), 1, 2.70824988, -0.0115853419, 0.0148353494, 0.00113661318, -0.000141122975, 8.3706103e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0021, -1.0, -1.0, 7.0, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.903, 10.0), (0.38, 0.942, 10.0), (0.4, 0.967, 10.0), (0.42, 0.977, 10.0), (0.44, 0.979, 10.0), (0.46, 0.984, 10.0), (0.48, 0.987, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.996, 10.0), (0.62, 0.996, 10.0), (0.64, 0.995, 10.0), (0.66, 0.995, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.995, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.993, 10.0), (1.3, 0.993, 10.0), (1.4, 0.983, 10.0), (1.5, 0.989, 10.0), (1.5, 1.0e-6, 10.0)], 1.659494, -1.0, -1.0, 0, 57.197863, 0, 3.91, 0.0)
const LZ_F1 = Glass(GlassID(AGF, 1689), 1, 2.53587365, -0.00924623241, 0.0206589134, 0.001286665, -9.64243985e-5, 8.49321925e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0007, -1.0, -1.0, 7.4, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.376, 10.0), (0.36, 0.81, 10.0), (0.38, 0.917, 10.0), (0.4, 0.977, 10.0), (0.42, 0.984, 10.0), (0.44, 0.986, 10.0), (0.46, 0.989, 10.0), (0.48, 0.991, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.996, 10.0), (0.6, 0.995, 10.0), (0.62, 0.995, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.996, 10.0), (0.75, 0.998, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.05, 0.998, 10.0), (1.1, 0.998, 10.0), (1.2, 0.998, 10.0), (1.3, 0.997, 10.0), (1.4, 0.994, 10.0), (1.5, 0.996, 10.0), (1.5, 1.0e-6, 10.0)], 1.612939, -1.0, -1.0, 0, 36.880176, 0, 3.57, 0.0)
const LZ_BK6 = Glass(GlassID(AGF, 1690), 1, 2.33808859, -0.00885971304, 0.0113124762, 0.000587150772, -5.8656147e-5, 3.32980279e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0019, -1.0, -1.0, 8.2, -1.0, 0.0, -1.0, [(0.3, 0.033, 10.0), (0.32, 0.461, 10.0), (0.34, 0.854, 10.0), (0.36, 0.973, 10.0), (0.38, 0.992, 10.0), (0.4, 0.991, 10.0), (0.42, 0.991, 10.0), (0.44, 0.99, 10.0), (0.46, 0.992, 10.0), (0.48, 0.993, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.992, 10.0), (0.68, 0.993, 10.0), (0.7, 0.994, 10.0), (0.75, 0.994, 10.0), (0.8, 0.993, 10.0), (0.9, 0.991, 10.0), (1.0, 0.99, 10.0), (1.05, 0.989, 10.0), (1.1, 0.989, 10.0), (1.2, 0.989, 10.0), (1.3, 0.989, 10.0), (1.4, 0.985, 10.0), (1.5, 0.985, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.539978, -1.0, -1.0, 0, 59.607401, 0, 2.86, 0.0)
const LZ_TF7 = Glass(GlassID(AGF, 1691), 1, 2.87556005, -0.00903892068, 0.0346318645, 0.0017867828, -8.10904694e-5, 1.38166415e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0039, -1.0, -1.0, 9.6, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.247, 10.0), (0.38, 0.669, 10.0), (0.4, 0.887, 10.0), (0.42, 0.952, 10.0), (0.44, 0.972, 10.0), (0.46, 0.982, 10.0), (0.48, 0.987, 10.0), (0.5, 0.991, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.992, 10.0), (0.66, 0.992, 10.0), (0.68, 0.993, 10.0), (0.7, 0.994, 10.0), (0.75, 0.998, 10.0), (0.8, 0.997, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.998, 10.0), (1.2, 0.998, 10.0), (1.3, 0.998, 10.0), (1.4, 0.997, 10.0), (1.5, 0.996, 10.0), (1.5, 1.0e-6, 10.0)], 1.728221, -1.0, -1.0, 0, 28.32234, 0, 4.52, 0.0)
const LZ_TF3 = Glass(GlassID(AGF, 1692), 1, 2.84582216, -0.00949073913, 0.0320009016, 0.00191185788, -0.000115848478, 1.47283242e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0039, -1.0, -1.0, 8.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.201, 10.0), (0.38, 0.637, 10.0), (0.4, 0.866, 10.0), (0.42, 0.942, 10.0), (0.44, 0.969, 10.0), (0.46, 0.98, 10.0), (0.48, 0.987, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.993, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.997, 10.0), (1.0, 0.997, 10.0), (1.05, 0.997, 10.0), (1.1, 0.997, 10.0), (1.2, 0.997, 10.0), (1.3, 0.998, 10.0), (1.4, 0.996, 10.0), (1.5, 0.995, 10.0), (1.5, 1.0e-6, 10.0)], 1.717412, -1.0, -1.0, 0, 29.476681, 0, 4.46, 0.0)
const LZ_TK16 = Glass(GlassID(AGF, 1693), 1, 2.55981468, -0.0100242005, 0.0134154165, 0.000925376875, -0.000110815289, 6.50410814e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0012, -1.0, -1.0, 7.3, -1.0, 0.0, -1.0, [(0.3, 2.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.36, 10.0), (0.36, 0.754, 10.0), (0.38, 0.912, 10.0), (0.4, 0.964, 10.0), (0.42, 0.98, 10.0), (0.44, 0.983, 10.0), (0.46, 0.987, 10.0), (0.48, 0.99, 10.0), (0.5, 0.993, 10.0), (0.52, 0.995, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.993, 10.0), (0.75, 0.994, 10.0), (0.8, 0.991, 10.0), (0.9, 0.988, 10.0), (1.0, 0.986, 10.0), (1.05, 0.986, 10.0), (1.1, 0.986, 10.0), (1.2, 0.987, 10.0), (1.3, 0.988, 10.0), (1.4, 0.984, 10.0), (1.5, 0.985, 10.0), (1.5, 1.0e-6, 10.0)], 1.612682, -1.0, -1.0, 0, 58.136768, 0, 3.56, 0.0)
const LZ_BF24 = Glass(GlassID(AGF, 1694), 1, 2.60182854, -0.00907273896, 0.022136924, 0.00124712094, -8.73795036e-5, 8.50139757e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0003, -1.0, -1.0, 7.9, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.055, 10.0), (0.36, 0.444, 10.0), (0.38, 0.743, 10.0), (0.4, 0.94, 10.0), (0.42, 0.968, 10.0), (0.44, 0.978, 10.0), (0.46, 0.985, 10.0), (0.48, 0.99, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.995, 10.0), (0.8, 0.994, 10.0), (0.9, 0.993, 10.0), (1.0, 0.993, 10.0), (1.05, 0.993, 10.0), (1.1, 0.993, 10.0), (1.1, 1.0e-6, 10.0)], 1.634551, -1.0, -1.0, 0, 36.733283, 0, 3.67, 0.0)
const LZ_LF7 = Glass(GlassID(AGF, 1695), 1, 2.43725266, -0.00906327607, 0.0172292069, 0.00107526924, -8.85381819e-5, 7.03961058e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0008, -1.0, -1.0, 7.5, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.059, 10.0), (0.34, 0.699, 10.0), (0.36, 0.944, 10.0), (0.38, 0.986, 10.0), (0.4, 0.988, 10.0), (0.42, 0.99, 10.0), (0.44, 0.991, 10.0), (0.46, 0.993, 10.0), (0.48, 0.994, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.995, 10.0), (0.66, 0.996, 10.0), (0.68, 0.998, 10.0), (0.7, 0.999, 10.0), (0.75, 0.998, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.05, 0.998, 10.0), (1.1, 0.998, 10.0), (1.1, 1.0e-6, 10.0)], 1.578416, -1.0, -1.0, 0, 41.04154, 0, 3.23, 0.0)
const LZ_BF8 = Glass(GlassID(AGF, 1696), 1, 2.45575926, -0.00835756809, 0.0160627256, 0.000794572904, -5.9357522e-5, 4.56440502e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0014, -1.0, -1.0, 8.2, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.093, 10.0), (0.34, 0.721, 10.0), (0.36, 0.925, 10.0), (0.38, 0.962, 10.0), (0.4, 0.988, 10.0), (0.42, 0.99, 10.0), (0.44, 0.99, 10.0), (0.46, 0.992, 10.0), (0.48, 0.994, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.995, 10.0), (0.64, 0.995, 10.0), (0.66, 0.994, 10.0), (0.68, 0.996, 10.0), (0.7, 0.996, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.994, 10.0), (1.05, 0.994, 10.0), (1.1, 0.994, 10.0), (1.2, 0.994, 10.0), (1.3, 0.994, 10.0), (1.4, 0.992, 10.0), (1.5, 0.993, 10.0), (1.5, 1.0e-6, 10.0)], 1.582703, -1.0, -1.0, 0, 46.397162, 0, 3.28, 0.0)
const LZ_TK14 = Glass(GlassID(AGF, 1697), 1, 2.56353018, -0.0112558985, 0.0129306977, 0.000811788179, -9.19927254e-5, 5.30548328e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0004, -1.0, -1.0, 6.9, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.056, 10.0), (0.34, 0.406, 10.0), (0.36, 0.763, 10.0), (0.38, 0.923, 10.0), (0.4, 0.965, 10.0), (0.42, 0.98, 10.0), (0.44, 0.983, 10.0), (0.46, 0.986, 10.0), (0.48, 0.99, 10.0), (0.5, 0.996, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.994, 10.0), (0.8, 0.993, 10.0), (0.9, 0.991, 10.0), (1.0, 0.99, 10.0), (1.05, 0.99, 10.0), (1.1, 0.99, 10.0), (1.2, 0.991, 10.0), (1.3, 0.991, 10.0), (1.4, 0.99, 10.0), (1.5, 0.99, 10.0), (1.5, 1.0e-6, 10.0)], 1.613087, -1.0, -1.0, 0, 60.435759, 0, 3.51, 0.0)
const LZ_BF11 = Glass(GlassID(AGF, 1698), 1, 2.58452612, -0.00918889928, 0.0158244594, 0.00069190774, -5.75329364e-5, 3.70190834e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0004, -1.0, -1.0, 7.0, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.284, 10.0), (0.36, 0.708, 10.0), (0.38, 0.91, 10.0), (0.4, 0.962, 10.0), (0.42, 0.981, 10.0), (0.44, 0.986, 10.0), (0.46, 0.99, 10.0), (0.48, 0.993, 10.0), (0.5, 0.995, 10.0), (0.52, 0.996, 10.0), (0.54, 0.996, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.993, 10.0), (0.68, 0.993, 10.0), (0.7, 0.993, 10.0), (0.75, 0.992, 10.0), (0.8, 0.991, 10.0), (0.9, 0.988, 10.0), (1.0, 0.986, 10.0), (1.05, 0.988, 10.0), (1.1, 0.988, 10.0), (1.1, 1.0e-6, 10.0)], 1.622301, -1.0, -1.0, 0, 53.066034, 0, 3.66, 0.0)
const LZ_BK4 = Glass(GlassID(AGF, 1699), 1, 2.31024628, -0.00901307991, 0.0102533493, 0.000831871974, -0.000102626485, 5.86726499e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0004, -1.0, -1.0, 8.0, -1.0, 0.0, -1.0, [(0.34, 0.896, 10.0), (0.36, 0.941, 10.0), (0.38, 0.958, 10.0), (0.4, 0.984, 10.0), (0.42, 0.985, 10.0), (0.44, 0.986, 10.0), (0.46, 0.99, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.995, 10.0), (0.8, 0.995, 10.0), (0.9, 0.992, 10.0), (1.0, 0.991, 10.0), (1.05, 0.991, 10.0), (1.1, 0.991, 10.0), (1.1001, 0.0, 10.0), (1.1002, 0.0, 10.0)], 1.530272, -1.0, -1.0, 0, 60.261132, 0, 2.76, 0.0)
const LZ_TF2 = Glass(GlassID(AGF, 1700), 1, 2.71155707, -0.00931191991, 0.0266942397, 0.00168606296, -0.000115751993, 1.20753872e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0012, -1.0, -1.0, 7.8, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 0.015, 10.0), (0.36, 0.4, 10.0), (0.38, 0.741, 10.0), (0.4, 0.903, 10.0), (0.42, 0.956, 10.0), (0.44, 0.973, 10.0), (0.46, 0.983, 10.0), (0.48, 0.989, 10.0), (0.5, 0.981, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.995, 10.0), (0.62, 0.995, 10.0), (0.64, 0.993, 10.0), (0.66, 0.993, 10.0), (0.68, 0.994, 10.0), (0.7, 0.995, 10.0), (0.75, 0.997, 10.0), (0.8, 0.997, 10.0), (0.9, 0.996, 10.0), (1.0, 0.996, 10.0), (1.05, 0.996, 10.0), (1.1, 0.996, 10.0), (1.2, 0.996, 10.0), (1.3, 0.996, 10.0), (1.4, 0.994, 10.0), (1.5, 0.993, 10.0), (1.5, 1.0e-6, 10.0)], 1.672677, -1.0, -1.0, 0, 32.192393, 0, 4.09, 0.0)
const LZ_F8 = Glass(GlassID(AGF, 1701), 1, 2.56893067, -0.00867019014, 0.0233836541, 0.000788814438, -1.94901062e-6, 3.65751489e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0002, -1.0, -1.0, 9.9, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.846, 10.0), (0.38, 0.933, 10.0), (0.4, 0.98, 10.0), (0.42, 0.985, 10.0), (0.44, 0.988, 10.0), (0.46, 0.99, 10.0), (0.48, 0.992, 10.0), (0.5, 0.993, 10.0), (0.52, 0.994, 10.0), (0.54, 0.993, 10.0), (0.56, 0.992, 10.0), (0.58, 0.992, 10.0), (0.6, 0.991, 10.0), (0.62, 0.992, 10.0), (0.64, 0.993, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.995, 10.0), (0.75, 0.996, 10.0), (0.8, 0.996, 10.0), (0.9, 0.995, 10.0), (1.0, 0.995, 10.0), (1.05, 0.995, 10.0), (1.1, 0.994, 10.0), (1.1, 1.0e-6, 10.0)], 1.624962, -1.0, -1.0, 0, 35.616557, 0, 3.61, 0.0)
const LZ_OF1 = Glass(GlassID(AGF, 1702), 1, 2.30412369, -0.0109592456, 0.0110535035, 0.00115646445, -0.000135754887, 7.91833375e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0054, -1.0, -1.0, 6.3, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 1.0e-6, 10.0), (0.34, 1.0e-6, 10.0), (0.36, 0.537, 10.0), (0.38, 0.805, 10.0), (0.4, 0.906, 10.0), (0.42, 0.952, 10.0), (0.44, 0.971, 10.0), (0.46, 0.983, 10.0), (0.48, 0.989, 10.0), (0.5, 0.992, 10.0), (0.52, 0.994, 10.0), (0.54, 0.995, 10.0), (0.56, 0.996, 10.0), (0.58, 0.994, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.995, 10.0), (0.7, 0.996, 10.0), (0.75, 0.997, 10.0), (0.8, 0.998, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.05, 0.998, 10.0), (1.1, 0.998, 10.0), (1.00001, 1.0e-6, 10.0)], 1.529483, -1.0, -1.0, 0, 51.596468, 0, 2.56, 0.0)
const LZ_LK3 = Glass(GlassID(AGF, 1703), 1, 2.19005351, -0.00985036837, 0.0074413086, 0.000767453298, -0.000104983034, 5.99100257e-6, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 0.0067, -1.0, -1.0, 9.2, -1.0, 0.0, -1.0, [(0.3, 0.348, 10.0), (0.32, 0.781, 10.0), (0.34, 0.925, 10.0), (0.36, 0.971, 10.0), (0.38, 0.973, 10.0), (0.4, 0.996, 10.0), (0.42, 0.994, 10.0), (0.44, 0.993, 10.0), (0.46, 0.995, 10.0), (0.48, 0.995, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.995, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.993, 10.0), (0.66, 0.995, 10.0), (0.68, 0.996, 10.0), (0.7, 0.998, 10.0), (0.75, 0.999, 10.0), (0.8, 0.999, 10.0), (0.9, 0.998, 10.0), (1.0, 0.998, 10.0), (1.1, 0.998, 10.0), (1.05, 0.998, 10.0), (1.2, 0.998, 10.0), (1.3, 0.998, 10.0), (1.4, 0.994, 10.0), (1.5, 0.994, 10.0), (1.5001, 0.0, 10.0), (1.5002, 0.0, 10.0)], 1.487453, -1.0, -1.0, 0, 69.661556, 0, 2.46, 0.0)
const LZ_TK23 = Glass(GlassID(AGF, 1704), 1, 2.4913793, -0.0113678535, 0.010280255, 0.00147657981, -0.00020427916, 1.15740924e-5, 0.0, 0.0, NaN, NaN, 0.365, 2.3254, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, -0.0014, -1.0, -1.0, 5.8, -1.0, 0.0, -1.0, [(0.3, 1.0e-6, 10.0), (0.32, 0.051, 10.0), (0.34, 0.385, 10.0), (0.36, 0.776, 10.0), (0.38, 0.931, 10.0), (0.4, 0.96, 10.0), (0.42, 0.984, 10.0), (0.44, 0.986, 10.0), (0.46, 0.989, 10.0), (0.48, 0.992, 10.0), (0.5, 0.994, 10.0), (0.52, 0.995, 10.0), (0.54, 0.995, 10.0), (0.56, 0.995, 10.0), (0.58, 0.994, 10.0), (0.6, 0.994, 10.0), (0.62, 0.994, 10.0), (0.64, 0.994, 10.0), (0.66, 0.994, 10.0), (0.68, 0.994, 10.0), (0.7, 0.994, 10.0), (0.75, 0.994, 10.0), (0.8, 0.994, 10.0), (0.9, 0.992, 10.0), (1.0, 0.992, 10.0), (1.05, 0.992, 10.0), (1.1, 0.992, 10.0), (1.2, 0.993, 10.0), (1.3, 0.993, 10.0), (1.4, 0.983, 10.0), (1.5, 0.987, 10.0), (1.5, 1.0e-6, 10.0)], 1.589173, -1.0, -1.0, 0, 60.923398, 0, 3.24, 0.0)
end # module


using CSFML.LibCSFML
using ModernGL
using CSyntax
using CSyntax.CSwitch

# shader sources
const vert_source = """
    #version 150 core
    in vec2 position;
    in vec3 color;
    out vec3 Color;
    void main()
    {
        Color = color;
        gl_Position = vec4(position, 0.0, 1.0);
    }"""

const frag_source = """
    #version 150 core
    in vec3 Color;
    out vec4 outColor;
    void main()
    {
        outColor = vec4(Color, 1.0);
    }"""

# SFML settings
settings = sfContextSettings(24, 8, 0, 3, 3, sfContextCore, true)
window = @c sfWindow_create(sfVideoMode(800, 600, 32), "OpenGL", sfTitlebar | sfClose, &settings)

# create Vertex Array Object
vao = GLuint(0)
@c glGenVertexArrays(1, &vao)
glBindVertexArray(vao)

# create a Vertex Buffer Object and copy the vertex data to it
vbo = GLuint(0)
@c glGenBuffers(1, &vbo)

vertices = GLfloat[
     0.0,  0.5, 1.0, 0.0, 0.0,
     0.5, -0.5, 0.0, 1.0, 0.0,
    -0.5, -0.5, 0.0, 0.0, 1.0]

glBindBuffer(GL_ARRAY_BUFFER, vbo)
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW)

# create and compile the vertex shader
vert_shader = glCreateShader(GL_VERTEX_SHADER)
glShaderSource(vert_shader, 1, Ptr{GLchar}[pointer(vert_source)], C_NULL)
glCompileShader(vert_shader)

# create and compile the fragment shader
frag_shader = glCreateShader(GL_FRAGMENT_SHADER)
glShaderSource(frag_shader, 1, Ptr{GLchar}[pointer(frag_source)], C_NULL)
glCompileShader(frag_shader)

# link the vertex and fragment shader into a shader program
shader_prog = glCreateProgram()
glAttachShader(shader_prog, vert_shader)
glAttachShader(shader_prog, frag_shader)
glBindFragDataLocation(shader_prog, 0, "outColor")
glLinkProgram(shader_prog)
glUseProgram(shader_prog)

# specify the layout of the vertex data
pos_attrib = glGetAttribLocation(shader_prog, "position")
glEnableVertexAttribArray(pos_attrib)
glVertexAttribPointer(pos_attrib, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), C_NULL)

color_attrib = glGetAttribLocation(shader_prog, "color")
glEnableVertexAttribArray(color_attrib);
glVertexAttribPointer(color_attrib, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), Ptr{Cvoid}(2 * sizeof(GLfloat)))

window_event_ref = Ref(sfEvent(sfEvtClosed))
running = true
while running
    global running; global window_event_ref;
    while Bool(sfWindow_pollEvent(window, window_event_ref))
        @cswitch window_event_ref[].type begin
            @case sfEvtClosed
                running = false
                break
        end
    end

    # clear the screen to black
    glClearColor(0.0, 0.0, 0.0, 1.0)
    glClear(GL_COLOR_BUFFER_BIT)

    # draw a triangle from the 3 vertices
    glDrawArrays(GL_TRIANGLES, 0, 3)

    # swap buffers
    sfWindow_display(window)
end

glDeleteProgram(shader_prog)
glDeleteShader(frag_shader)
glDeleteShader(vert_shader)

@c glDeleteBuffers(1, &vbo)

@c glDeleteVertexArrays(1, &vao)

sfWindow_close(window)
sfWindow_destroy(window)


push!(LOAD_PATH, "../../src/")

using NESSie
using NESSie.Format

abstract type MeshType end
struct Nodes   <: MeshType end
struct Surface <: MeshType end
struct Volume  <: MeshType end

const formats = Dict{String, String}(
    "hmo"  =>  "hmo",
    "m"    =>  "mcsf",
    ""     =>  "msms",
    "off"  =>  "off",
    "stl"  =>  "stl"
)

const fin = Dict{String, Tuple{DataType, Function, String}}(
    "hmo"   =>  (Surface, readhmo,  "HyperMesh/.hmo"),
    "mcsf"  =>  (Volume,  readmcsf, "GAMer/.m"),
    "msms"  =>  (Surface, readmsms, "MSMS/.{face,vert}"),
    "off"   =>  (Surface, readoff,  "GAMer/.off"),
    "stl"   =>  (Surface, readstl,  "STL/.stl")
)

const fout = Dict{String, Tuple{DataType, Function, String}}(
    "nodes.json"    =>  (Nodes,   writexml3d_json, "XML3D/.json"),
    "nodes.xml"     =>  (Nodes,   writexml3d_xml,  "XML3D/.xml"),
    "surface.hmo"   =>  (Surface, writehmo,        "HyperMesh/.hmo"),
    "surface.json"  =>  (Surface, writexml3d_json, "XML3D/.json"),
    "surface.skel"  =>  (Surface, writeskel,       "SKEL/.skel"),
    "surface.stl"   =>  (Surface, writestl,        "STL/.stl"),
    "surface.vtp"   =>  (Surface, writevtk,        "VTK/.vtp"),
    "volume.skel"   =>  (Volume,  writeskel,       "SKEL/.skel"),
    "volume.vtu"    =>  (Volume,  writevtk,        "VTK/.vtu")
)

iformat = ""; ifname = ""; oformat = ""; ofname = ""

if length(ARGS) == 3
    ifname  = ARGS[1]
    oformat = ARGS[2]
    ofname  = ARGS[3]
    spl = split(split(ifname, "/")[end], ".")
    iformat = length(spl) == 1 ? formats[""] : formats[spl[end]]
elseif length(ARGS) == 4
    iformat = ARGS[1]
    ifname  = ARGS[2]
    oformat = ARGS[3]
    ofname  = ARGS[4]
else
    println("\n\e[1mNESSie.jl file format converter\e[0m")
    println("==================================\n")
    println("\e[1mUsage:\e[0m\n")
    println("\tconverter.jl [<format in>] <file in> <format out> <file out>\n")
    println("If not specified, the input format will be guessed by file extension.")
    println("Multi-file input, as provided by some file formats (e.g., MSMS), has")
    println("to be specified without file extension. For instance,")
    println("\n\tconverter.jl msms mymesh surface.json mymesh.json\n")
    println("will read the MSMS-generated surface mesh from both files mymesh.face")
    println("and mymesh.vert and convert it into a XML3D-compatible JSON format.")
    println("\n\e[1mAvailable input formats:\e[0m\n")
    for (format, (mesh, _, desc)) in fin
        println("\t\e[1m$format\e[0m\t\t$mesh\t\t$desc")
    end
    println("\n\e[1mAvailable output formats:\e[0m\n")
    for (format, (mesh, _, desc)) in fout
        println("\t\e[1m$format\e[0m\t$mesh\t\t$desc")
    end
    println()
    exit(1)
end

mtype, f = fout[oformat][1:2]
model    = fin[iformat][2](ifname)
f(ofname, mtype === Nodes ? model.nodes : model)


"""
`module  JAC.PhotoIonizationFluores`
    ... a submodel of JAC that contains all methods for computing photo-excitation-autoionization cross
        sections and rates.
"""
module PhotoIonizationFluores

    using ..AutoIonization, ..Basics, ..ManyElectron, ..Radial, ..Nuclear, ..PhotoEmission

    """
    `struct  PhotoIonizationFluores.Settings`
        ... defines a type for the details and parameters of computing photon-impact excitation-autoionization
            pathways |i(N)>  --> |m(N)>  --> |f(N-1)>.

        + multipoles              ::Array{EmMultipole,1}               ... Specifies the multipoles of the radiation field that are to be included.
        + gauges                  ::Array{UseGauge,1}                  ... Specifies the gauges to be included into the computations.
        + printBefore  ::Bool                               ... True, if all energies and lines are printed before their evaluation.
        + selectPathways          ::Bool                               ... True if particular pathways are selected for the computations.
        + selectedPathways        ::Array{Tuple{Int64,Int64,Int64},1}  ... List of list of pathways, given by tupels (inital, inmediate, final).
        + maxKappa                ::Int64                              ... Maximum kappa value of partial waves to be included.
    """
    struct Settings
        multipoles                ::Array{EmMultipole,1}
        gauges                    ::Array{UseGauge,1}
        printBefore    ::Bool
        selectPathways            ::Bool
        selectedPathways          ::Array{Tuple{Int64,Int64,Int64},1}
        maxKappa                  ::Int64
    end

    """
    `PhotoIonizationFluores.Settings()`  ... constructor for the default values of photon-impact excitation-autoionizaton settings.
    """
    function Settings()
        Settings( Basics.EmMultipole[], UseGauge[], false,  false, Tuple{Int64,Int64,Int64}[], 0)
    end

    # `Base.show(io::IO, settings::PhotoIonizationFluores.Settings)`
    #		... prepares a proper printout of the variable settings::PhotoIonizationFluores.Settings.
    function Base.show(io::IO, settings::PhotoIonizationFluores.Settings)
        println(io, "multipoles:              $(settings.multipoles)  ")
        println(io, "gauges:                  $(settings.gauges)  ")
        println(io, "printBefore:  $(settings.printBefore)  ")
        println(io, "selectPathways:          $(settings.selectPathways)  ")
        println(io, "selectedPathways:        $(settings.selectedPathways)  ")
        println(io, "maxKappa:                $(settings.maxKappa)  ")
    end

    """
    `struct  PhotoIonizationFluores.Channel`
        ... defines a type for a photon-impact excitaton & autoionization channel that specifies all quantum numbers, phases
            and amplitudes.

        + excitationChannel  ::PhotoEmission.Channel       ... Channel that describes the photon-impact excitation process.
        + augerChannel       ::AutoIonization.Channel      ... Channel that describes the subsequent Auger/autoionization process.
    """
    struct  Channel
        excitationChannel    ::PhotoEmission.Channel
        augerChannel         ::AutoIonization.Channel
    end

    """
    `struct  PhotoIonizationFluores.Pathway`
        ... defines a type for a photon-impact excitation pathway that may include the definition of different excitation
            and autoionization channels and their corresponding amplitudes.

        + initialLevel        ::Level                  ... initial-(state) level
        + intermediateLevel   ::Level                  ... intermediate-(state) level
        + finalLevel          ::Level                  ... final-(state) level
        + photonEnergy        ::Float64                 ... energy of the (incoming) electron
        + electronEnergy      ::Float64                 ... energy of the (finally outgoing, scattered) electron
        + crossSection        ::EmProperty              ... total cross section of this pathway
        + hasChannels         ::Bool                    ... Determines whether the individual excitation and autoionization
                                                            channels are defined in terms of their multipole, gauge,
                                                            free-electron kappa, phases and the total angular momentum/parity
                                                            as well as the amplitude, or not.
        + channels            ::Array{PhotoIonizationFluores.Channel,1}  ... List of channels of this pathway.
    """
    struct  Pathway
        initialLevel          ::Level
        intermediateLevel     ::Level
        finalLevel            ::Level
        photonEnergy          ::Float64
        electronEnergy        ::Float64
        crossSection          ::EmProperty
        hasChannels           ::Bool
        channels              ::Array{PhotoIonizationFluores.Channel,1}
    end

    """
    `PhotoIonizationFluores.Pathway()`
        ... 'empty' constructor for an photon-impact excitation-autoionization pathway between a specified
            initial, intermediate and final level.
    """
    function Pathway()
        Pathway(Level(), Level(), Level(), 0., 0., 0., false, PhotoIonizationFluores.Channel[] )
    end

    # `Base.show(io::IO, pathway::PhotoIonizationFluores.Pathway)`
    #		... prepares a proper printout of the variable pathway::PhotoIonizationFluores.Pathway.
    function Base.show(io::IO, pathway::PhotoIonizationFluores.Pathway)
        println(io, "initialLevel:               $(pathway.initialLevel)  ")
        println(io, "intermediateLevel:          $(pathway.intermediateLevel)  ")
        println(io, "finalLevel:                 $(pathway.finalLevel)  ")
        println(io, "photonEnergy                $(pathway.photonEnergy)  ")
        println(io, "electronEnergy              $(pathway.electronEnergy)  ")
        println(io, "crossSection:               $(pathway.crossSection)  ")
        println(io, "hasChannels:                $(pathway.hasChannels)  ")
        println(io, "channels:                   $(pathway.channels)  ")
    end

    """
    `PhotoIonizationFluores.computePathways(finalMultiplet::Multiplet, intermediateMultiplet::Multiplet, initialMultiplet::Multiplet,
                                            grid::Radial.Grid, settings::PhotoIonizationFluores.Settings; output=true)`
        ... to compute the photo-excitation-fluorescence amplitudes and all properties as requested by the given settings.
            A list of lines::Array{PhotoIonizationFluores.Lines} is returned.
    """
    function  computePathways(finalMultiplet::Multiplet, intermediateMultiplet::Multiplet, initialMultiplet::Multiplet, grid::Radial.Grid,
                              settings::PhotoIonizationFluores.Settings; output=true)
        println("")
        printstyled("PhotoIonizationFluores.computePathways(): The computation of photo-excitation-fluorescence amplitudes starts now ... \n", color=:light_green)
        printstyled("-------------------------------------------------------------------------------------------------------------------- \n", color=:light_green)
        println("")
        #
        println("Not yet implemented: Data structures and properties still need to be worked out.")
        #
        pathways = "Not yet implemented !"
        #
        if    output    return( pathways )
        else            return( nothing )
        end
    end

end # module


mutable struct EvoDuplex <: AbstractDuplex
   duplex::RNADuplex
   alignment::Array{DNA,2}
   first::Int
   bracket::Vector{Char}
   score::Float64

   function EvoDuplex( rdup::RNADuplex, tree::PhyloTree, dsa::RNADuplexArray, fwd_index, rev_index )
      alignment = Array{DNA,2}(length(tree.order), sum(lengths(rdup.path)))
      first   = 1
      last    = size(alignment, 2)
      bracket = Vector{Char}(size(alignment, 2))
      i,j     = 0,0
      for k in 1:length(rdup.path)
         if isbulge(rdup[k]) && isfiveprime(rdup[k])
            i += 1
            col = DNA[dsa.fwd.species[s][i][fwd_index] for s in 1:length(tree.order)-1]
            unshift!(col, dsa.fwd.depth[i][fwd_index])
            alignment[:,first] = col
            bracket[first] = '.'
            first += 1
         elseif isbulge(rdup[k]) && !isfiveprime(rdup[k])
            j += 1
            col = DNA[dsa.rev.species[s][j][rev_index] for s in 1:length(tree.order)-1]
            unshift!(col, dsa.rev.depth[j][rev_index])
            alignment[:,last] = col
            bracket[last] = '.'
            last -= 1
          else
            i += 1
            j += 1
            const lcol = DNA[dsa.fwd.species[s][i][fwd_index] for s in 1:length(tree.order)-1]
            const rcol = DNA[dsa.rev.species[s][j][rev_index] for s in 1:length(tree.order)-1]
            unshift!(lcol, dsa.fwd.depth[i][fwd_index])
            unshift!(rcol, dsa.rev.depth[j][rev_index])
            #println("dsa.rev.depth $j $rev_index")
            alignment[:,first] = lcol
            alignment[:,last]  = rcol
            bracket[first] = '('
            bracket[last]  = ')'
            first += 1
            last  -= 1
         end
      end
      return new( deepcopy(rdup), alignment, first-1, bracket, 0.0 )
   end

   function EvoDuplex( rdup::RNADuplex, single::PhyloTree, paired::PhyloTree, dsa::RNADuplexArray, fwd_index, rev_index )
      evo = EvoDuplex( rdup, single, dsa, fwd_index, rev_index )
      score!( evo, single, paired )
      return evo
   end
end

path( evo::EvoDuplex )        = evo.duplex.path

energy( evo::EvoDuplex )      = energy( evo.duplex )
energies( evo::EvoDuplex )    = map( energy, [evo.duplex; evo.species] )

npairs( evo::EvoDuplex )      = npairs( evo.duplex )
nmismatches( evo::EvoDuplex ) = nmismatches( evo.duplex )
nbulges( evo::EvoDuplex )     = nbulges( evo.duplex )

strings( evo::EvoDuplex )     = strings( evo.duplex )
brackets( evo::EvoDuplex )    = brackets( evo.duplex )

Base.push!{NP <: NucleotidePair}( evo::EvoDuplex, pair::NP )         = push!( evo.duplex, pair )
Base.push!{NP <: NucleotidePair}( evo::EvoDuplex, path::Vector{NP} ) = push!( evo.duplex, path )

function join_duplex!( left::EvoDuplex, right::EvoDuplex, npairs, npairs_first, npairs_last )
   push!( left.duplex, path(right.duplex)[npairs+1:end] )
   last  = (size(left.alignment, 2) - left.first) - npairs_last - 1
   first = left.first - npairs_first
#   try
   left.alignment = hcat(left.alignment[:,1:first], right.alignment, left.alignment[:,(end-last:end)])
   left.bracket = vcat(left.bracket[1:first], right.bracket, left.bracket[end-last:end])
   left.first = right.first + first
#   catch
#      println(STDERR, "$left\n$right\n$npairs\n$npairs_first\n$npairs_last")
#   end
   left
end

mutable struct EvoScore
   unstr_cons::Float64
   struc_neut::Float64
   struc_cons::Float64
   mean_covar::Float64
   mean_cons::Float64
end

score( evo::EvoDuplex ) = evo.score

function score!( evo::EvoDuplex, single::PhyloTree, paired::PhyloTree )
   uns_like = 0.0
   str_like = 0.0
   first   = 1
   last    = size(evo.alignment, 2)
   for k in 1:length(evo.duplex.path)
      if isbulge(evo.duplex[k]) && isfiveprime(evo.duplex[k])
         like = likelihood( single, evo.alignment[:,first] )
         str_like += log2(like)
         uns_like += log2(like)
         first += 1
      elseif isbulge(evo.duplex[k]) && !isfiveprime(evo.duplex[k])
         like = likelihood( single, evo.alignment[:,last] )
         str_like += log2(like)
         uns_like += log2(like)
         last -= 1
      else
         str_like += log2(likelihood(paired, evo.alignment[:,first], evo.alignment[:,last]))
         uns_like += log2(likelihood(single, evo.alignment[:,first])) + log2(likelihood(single, evo.alignment[:,last]))
         first += 1
         last  -= 1
      end
   end
   evo.score = str_like - uns_like
   str_like
end

function score( evo::EvoDuplex, single::PhyloTree; gapdenom=1.0 )
   single_like = 0.0
   for k in 1:size(evo.alignment,2)
      single_like += log2(likelihood( single, evo.alignment[:,k], gapdenom=gapdenom ))
   end
   single_like
end

function pscore!( evo::EvoDuplex, single::PhyloTree, paired::PhyloTree )
   uns_like = 0.0
   str_like = 0.0
   first   = 1
   last    = size(evo.alignment, 2)
   for k in 1:length(evo.duplex.path)
      if isbulge(evo.duplex[k]) && isfiveprime(evo.duplex[k])
         like = likelihood( single, evo.alignment[:,first] )
         str_like += log2(like)
         uns_like += log2(like)
         first += 1
      elseif isbulge(evo.duplex[k]) && !isfiveprime(evo.duplex[k])
         like = likelihood( single, evo.alignment[:,last] )
         str_like += log2(like)
         uns_like += log2(like)
         last -= 1
      else
         str_like += log2(likelihood(paired, evo.alignment[:,first], evo.alignment[:,last]))
         uns_like += log2(likelihood(single, evo.alignment[:,first])) + log2(likelihood(single, evo.alignment[:,last]))
         first += 1
         last  -= 1
      end
   end
   evo.score = str_like - uns_like
   evo.score
end

function covariance( evo::EvoDuplex )
   first   = 1
   last    = size(evo.alignment, 2)
   vals    = 0.0
   npairs  = 0
   for k in 1:length(evo.duplex.path)
      if isbulge(evo.duplex[k]) && isfiveprime(evo.duplex[k])
         first += 1
      elseif isbulge(evo.duplex[k]) && !isfiveprime(evo.duplex[k])
         last -= 1
      else
         cov = covariance_score(evo.alignment[:,first], evo.alignment[:,last])
         #print(" $cov ")
         vals   += cov
         first  += 1
         last   -= 1
         npairs += 1
      end
   end
   #println( " $maxval \n" )
   vals / npairs
end

const PI_MATRIX = [0.0 0.0 0.0 1.0
                   0.0 0.0 1.0 0.0
                   0.0 1.0 0.0 1.0
                   1.0 0.0 1.0 0.0]

delta( a::DNA, b::DNA ) = a == b ? 1 : 0

function pi_matrix( a::DNA, b::DNA )
   if isgap( a ) || isgap( b )
      return 0.0
   else
      const ind_a = trailing_zeros(reinterpret(UInt8, a)) + 1
      const ind_b = trailing_zeros(reinterpret(UInt8, b)) + 1
      return PI_MATRIX[ ind_a, ind_b ]
   end
end

# Calculated as described by Hofacker et al. Journal of Molecular Biology 2002.
# https://www.ncbi.nlm.nih.gov/pubmed/12079347
function covariance_score( a::Vector{DNA}, b::Vector{DNA} )
   denom = binomial(length(a), 2)
   numer = 0.0
   pairs = 0
   for i in 1:length(a)-1
      pairs += pi_matrix( a[i], b[i] )
      for j in i+1:length(a)
         numer += (2 - delta(a[i], a[j]) - delta(b[i], b[j])) * pi_matrix( a[i], b[i] ) * pi_matrix( a[j], b[j] )
      end
   end
   pairs += pi_matrix( a[end], b[end] )
   return (numer / denom) * (pairs / length(a))
end


#=
This file is auto-generated. Do not edit.
=#
"""
    mutable struct Bus <: Topology
        number::Int
        name::String
        bustype::Union{Nothing, BusTypes.BusType}
        angle::Union{Nothing, Float64}
        magnitude::Union{Nothing, Float64}
        voltage_limits::Union{Nothing, Min_Max}
        base_voltage::Union{Nothing, Float64}
        area::Union{Nothing, Area}
        load_zone::Union{Nothing, LoadZone}
        ext::Dict{String, Any}
        internal::InfrastructureSystemsInternal
    end

A power-system bus.

# Arguments
- `number::Int`: number associated with the bus
- `name::String`: the name of the bus
- `bustype::Union{Nothing, BusTypes.BusType}`: bus type
- `angle::Union{Nothing, Float64}`: angle of the bus in radians, validation range: `(-1.571, 1.571)`, action if invalid: `error`
- `magnitude::Union{Nothing, Float64}`: voltage as a multiple of basevoltage, validation range: `voltage_limits`, action if invalid: `warn`
- `voltage_limits::Union{Nothing, Min_Max}`: limits on the voltage variation as multiples of basevoltage
- `base_voltage::Union{Nothing, Float64}`: the base voltage in kV, validation range: `(0, nothing)`, action if invalid: `error`
- `area::Union{Nothing, Area}`: the area containing the bus
- `load_zone::Union{Nothing, LoadZone}`: the load zone containing the bus
- `ext::Dict{String, Any}`
- `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify
"""
mutable struct Bus <: Topology
    "number associated with the bus"
    number::Int
    "the name of the bus"
    name::String
    "bus type"
    bustype::Union{Nothing, BusTypes.BusType}
    "angle of the bus in radians"
    angle::Union{Nothing, Float64}
    "voltage as a multiple of basevoltage"
    magnitude::Union{Nothing, Float64}
    "limits on the voltage variation as multiples of basevoltage"
    voltage_limits::Union{Nothing, Min_Max}
    "the base voltage in kV"
    base_voltage::Union{Nothing, Float64}
    "the area containing the bus"
    area::Union{Nothing, Area}
    "the load zone containing the bus"
    load_zone::Union{Nothing, LoadZone}
    ext::Dict{String, Any}
    "power system internal reference, do not modify"
    internal::InfrastructureSystemsInternal

    function Bus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, )
        (number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) = check_bus_params(
            number,
            name,
            bustype,
            angle,
            magnitude,
            voltage_limits,
            base_voltage,
            area,
            load_zone,
            ext,
            internal,
        )
        new(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, )
    end
end

function Bus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), )
    Bus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, InfrastructureSystemsInternal(), )
end

function Bus(; number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), )
    Bus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, )
end

# Constructor for demo purposes; non-functional.
function Bus(::Nothing)
    Bus(;
        number=0,
        name="init",
        bustype=nothing,
        angle=0.0,
        magnitude=0.0,
        voltage_limits=(min=0.0, max=0.0),
        base_voltage=nothing,
        area=nothing,
        load_zone=nothing,
        ext=Dict{String, Any}(),
    )
end

"""Get [`Bus`](@ref) `number`."""
get_number(value::Bus) = value.number

InfrastructureSystems.get_name(value::Bus) = value.name
"""Get [`Bus`](@ref) `bustype`."""
get_bustype(value::Bus) = value.bustype
"""Get [`Bus`](@ref) `angle`."""
get_angle(value::Bus) = value.angle
"""Get [`Bus`](@ref) `magnitude`."""
get_magnitude(value::Bus) = value.magnitude
"""Get [`Bus`](@ref) `voltage_limits`."""
get_voltage_limits(value::Bus) = value.voltage_limits
"""Get [`Bus`](@ref) `base_voltage`."""
get_base_voltage(value::Bus) = value.base_voltage
"""Get [`Bus`](@ref) `area`."""
get_area(value::Bus) = value.area
"""Get [`Bus`](@ref) `load_zone`."""
get_load_zone(value::Bus) = value.load_zone
"""Get [`Bus`](@ref) `ext`."""
get_ext(value::Bus) = value.ext
"""Get [`Bus`](@ref) `internal`."""
get_internal(value::Bus) = value.internal

"""Set [`Bus`](@ref) `number`."""
set_number!(value::Bus, val) = value.number = val

InfrastructureSystems.set_name!(value::Bus, val) = value.name = val
"""Set [`Bus`](@ref) `bustype`."""
set_bustype!(value::Bus, val) = value.bustype = val
"""Set [`Bus`](@ref) `angle`."""
set_angle!(value::Bus, val) = value.angle = val
"""Set [`Bus`](@ref) `magnitude`."""
set_magnitude!(value::Bus, val) = value.magnitude = val
"""Set [`Bus`](@ref) `voltage_limits`."""
set_voltage_limits!(value::Bus, val) = value.voltage_limits = val
"""Set [`Bus`](@ref) `base_voltage`."""
set_base_voltage!(value::Bus, val) = value.base_voltage = val
"""Set [`Bus`](@ref) `area`."""
set_area!(value::Bus, val) = value.area = val
"""Set [`Bus`](@ref) `load_zone`."""
set_load_zone!(value::Bus, val) = value.load_zone = val
"""Set [`Bus`](@ref) `ext`."""
set_ext!(value::Bus, val) = value.ext = val


    using Revise, Parameters, Logging, Test
    using CUDA
    includet("C:\\GitHub\\GitHub\\NuclearMedEval\\test\\includeAllUseFullForTest.jl")
    using ..CUDAGpuUtils ,..IterationUtils,..ReductionUtils , ..MemoryUtils,..CUDAAtomicUtils
    using ..BitWiseUtils,..ResultListUtils, ..MetadataAnalyzePass,..MetaDataUtils,..WorkQueueUtils,..ProcessMainDataVerB,..HFUtils, ..ScanForDuplicates

    for i in 1:100000
        result = CUDA.zeros(1)
        sourceCPU = rand(UInt32,1)[1]
        targetCPU = rand(UInt32,1)[1]
        source= CuArray([sourceCPU])
        target= CuArray([targetCPU])

        function testKernelPassOnes(source,target,result)
            result[1] = @bitPassOnes(source[1],target[1])
            return
        end
        @cuda threads=32 blocks=1 testKernelPassOnes(source,target,result)
        result[1]
    end


"""
Object that stores the search results from a single searcher.
"""
struct SearchResult{T<:AbstractFloat}
    id::String
    query_matches::Vector{Tuple{T, Int}}  # vector of (score, idx)
    needle_matches::Vector{String}
    suggestions::MultiDict{String, Tuple{T, String}} # needle => tuples of (score,partial match)
    score_weight::T  # a default weight for scores
end

isempty(result::SearchResult) = isempty(result.query_matches)

"""
Constructs a search result from a list of data ids.
"""
function build_result_from_ids(dbdata,
                               idvals,
                               idvals_key,
                               result_id;
                               id_key=Garamond.DEFAULT_DB_ID_KEY,
                               score_eltype=DEFAULT_VECTORS_ELTYPE,
                               default_score=one(score_eltype),
                               max_matches=length(idvals),
                               linear_scoring=false)
    if idvals_key != id_key
        idxs = db_select_idxs_from_values(dbdata, idvals, idvals_key; id_key=id_key)
    else
        idxs = idvals
    end

    n = min(max_matches, length(idxs))
    if linear_scoring && length(idxs) > 1
        scores = collect(score_eltype, range(1, 0, length=length(idxs)))
    else
        scores = fill(default_score, n)
    end
    return SearchResult(result_id,
                        collect(zip(scores, idxs[1:n])),
                        String[],
                        MultiDict{String, Tuple{score_eltype, String}}(),
                        one(score_eltype))
end

"""
Aggregates search results from several searchers based on
their `aggregation_id` i.e. results from searchers with identical
aggregation id's are merged together into a new search result that
replaces the individual searcher ones.
"""
function aggregate!(results::Vector{S},
                    aggregation_ids::Vector{String};
                    method=RESULT_AGGREGATION_STRATEGY,
                    max_matches=MAX_MATCHES,
                    max_suggestions=MAX_SUGGESTIONS,
                    custom_weights=DEFAULT_CUSTOM_WEIGHTS
                   ) where S<:SearchResult{T} where T
    if !(method in [:minimum, :maximum, :median, :product, :mean])
        @warn "Unknown aggregation strategy :$method. " *
              "Defaulting to $RESULT_AGGREGATION_STRATEGY."
        method = RESULT_AGGREGATION_STRATEGY
    end
    # If all aggregation ids are different (i.e. no aggregation)
    # return results unchanged
    uids  = unique(aggregation_ids)
    length(uids) == length(aggregation_ids) && return results

    # Some aggregation ids are identical (i.e. aggregate)
    for uid in uids
        positions = findall(x->x==uid, aggregation_ids)
        if length(positions) > 1
            target_results = results[positions]
            # aggregate
            qm = [result.query_matches for result in target_results]
            weights = [result.score_weight * T(get(custom_weights, Symbol(result.id), 1.0))
                       for result in target_results]
            merged_query_matches = __aggregate(qm, weights; method=method, max_matches=max_matches)
            # Create SearchResult object
            agg_result = SearchResult(
                uid,
                merged_query_matches,
                unique(vcat((result.needle_matches for result in target_results)...)),
                squash_suggestions(target_results, max_suggestions),
                one(T))
            # replace first occurence that has the non-unique id_aggregation
            results[positions[1]] = agg_result
            # remove other occurences (these have been merged)
            deleteat!(results, positions[2:end])
            deleteat!(aggregation_ids, positions[2:end])
        end
    end
end

function __aggregate(query_matches::Vector{Vector{Tuple{T,Int}}},
                     weights::Vector{T};
                     method=RESULT_AGGREGATION_STRATEGY,
                     max_matches=DEFAULT_MAX_MATCHES,
                    ) where T<:AbstractFloat
    # Preprocess data
    # col  --> searcher index
    # doc  --> document index in search index
    # row  --> index in a matrix
    row = 0
    doc2row = Dict{Int,Int}()
    rowcol2score = Dict{Tuple{Int,Int},T}()
    for (col, qm) in enumerate(query_matches)
        for (score, doc) in qm
            if !(doc in keys(doc2row))
                row += 1
                push!(doc2row, doc=>row)
                push!(rowcol2score, (row, col)=>score)
            else
                push!(rowcol2score, (doc2row[doc], col)=>score)
            end
        end
    end

    # Build matrix with scores for all documents from all searchers
    m, n = length(doc2row), length(query_matches)
    scores = zeros(T, m, n)
    @inbounds for ((row, col), score) in rowcol2score
        scores[row, col] = weights[col] * score
    end

    # Merge results
    final_scores::Vector{T} = zeros(T, m)
    (method == :minimum) && (final_scores = firstcol(minimum(scores, dims=2)))
    (method == :maximum) && (final_scores = firstcol(maximum(scores, dims=2)))
    (method == :median) && (final_scores = firstcol(median(scores, dims=2)))
    (method == :product) && (final_scores = firstcol(prod(scores, dims=2)))
    (method == :mean) && (final_scores = firstcol(mean(scores, dims=2)))

    # Sort and trim result list: intersect sorted score indices by the
    # indices with scores larger than 0 and then trim (the result of the
    # intersection is still reverse ordered)
    row2doc = Dict(v=>k for (k,v) in doc2row)
    idxs = intersect(sortperm(final_scores, rev=true),
                     findall(x->x>zero(T), final_scores))
    tidxs = idxs[1:min(length(idxs), max_matches)]
    return collect(zip(final_scores[tidxs], [row2doc[i] for i in tidxs]))
end

function squash_suggestions(results::Vector{SearchResult{T}},
                            max_suggestions::Int=MAX_SUGGESTIONS
                           ) where T<:AbstractFloat
    suggestions = MultiDict{String, Tuple{T, String}}()
    # Quickly exit if no suggestions are sought
    max_suggestions <=0 && return suggestions
    if length(results) > 1
        # Results from multiple searchers, suggestions have to
        # be processed somewhat:
        #  - keep only needles not found across all searchers
        #  - remove suggestions that correspond to found needles

        # Get the needles not found across all results
        matched_needles = (needle for _result in results
                           for needle in _result.needle_matches)
        missed_needles = union((keys(_result.suggestions)
                                for _result in results)...)
        # Construct suggestions for the whole AggregateSearcher
        for needle in missed_needles
            all_needle_suggestions = Vector{Tuple{T,String}}()
            for _result in results
                if haskey(_result.suggestions, needle) &&
                   !(any(suggestion in matched_needles
                         for (_, suggestion) in _result.suggestions[needle]))
                   # Current key was not found and the suggestions
                   # for it are not found in the matched needles
                   union!(all_needle_suggestions,
                          _result.suggestions[needle])
                end
            end
            if !isempty(all_needle_suggestions)
                sort!(all_needle_suggestions, by=t->t[1])  # sort vector of tuples by distance
                # Keep results with the same distance even if the number is
                # larger than the maximum
                n = min(max_suggestions, length(all_needle_suggestions))
                nn = 0
                d = -1.0
                for (i, (dist, _)) in enumerate(all_needle_suggestions)
                    if i <= n || d == dist
                        d = dist
                        nn = i
                    end
                end
                push!(suggestions, needle=>all_needle_suggestions[1:nn])
            end
        end
    elseif length(results) == 1
        # Results from one searcher, easy situation, just copy the suggestions
        suggestions = results[1].suggestions
    end
    return suggestions
end

# Pretty printer of results
function print_search_results(io::IO,
                              dbdata,
                              result;
                              fields=colnames(dbdata),
                              id_key=DEFAULT_DB_ID_KEY,
                              max_length=50,
                              separator=" - ")
    db_check_id_key(dbdata, id_key)
    nm = length(result.query_matches)

    printstyled(io, "[$(result.id)] ", color=:blue, bold=true)
    printstyled(io, "$(nm) search results", bold=true)

    ch = ifelse(nm==0, ".", ":");
    printstyled(io, "$ch\n")
    print_fields = Tuple(intersect!(unique!([fields..., id_key]), colnames(dbdata)))
    scores, indices = unzip(result.query_matches; ndims=2)
    dataresult = sort(rows(filter(in(indices), dbdata, select=id_key), print_fields),
                      by=row->getproperty(row, id_key))
    for (entry, score) in sort(collect(zip(dataresult, scores[sortperm(indices)])),
                               by=zipped->zipped[2], rev=true)
        entry_string = dbentry2printable(entry,
                                         print_fields,
                                         max_length=max_length,
                                         separator=separator)
        printstyled(io, "  $score ~ ", color=:normal, bold=true)
        printstyled(io, entry_string, "\n", color=:normal)
    end
    __print_suggestions(io, result.suggestions)
end

__print_suggestions(io::IO, suggestions) = begin
    ns = length(suggestions)
    ns > 0 && printstyled(io, "$ns suggestions:\n")
    for (key, s) in suggestions
        printstyled(io, "  \"$key\": ", color=:normal, bold=true)
        printstyled(io, "$(join(map(x->x[2], s), ", "))\n", color=:normal)
    end
end

print_search_results(dbdata,
                     result;
                     fields=colnames(dbdata),
                     id_key=DEFAULT_DB_ID_KEY,
                     max_length=50,
                     separator=" - ") =
    print_search_results(stdout, dbdata, result, fields=fields, id_key=id_key,
                         max_length=max_length, separator=separator)

function print_search_results(io::IO,
                              dbdata,
                              results::AbstractVector;
                              fields=colnames(dbdata),
                              id_key=DEFAULT_DB_ID_KEY,
                              max_length=50,
                              separator=" - ",
                              max_suggestions=MAX_SUGGESTIONS)
    map(result->print_search_results(io, dbdata, result, fields=fields, id_key=id_key,
                                     max_length=max_length, separator=separator), results)
    suggestions = squash_suggestions(results, max_suggestions)
    __print_suggestions(io, suggestions)
end

print_search_results(dbdata,
                     results::AbstractVector;
                     fields=colnames(dbdata),
                     id_key=DEFAULT_DB_ID_KEY,
                     max_length=50,
                     separator=" - ",
                     max_suggestions=MAX_SUGGESTIONS) =
    print_search_results(stdout, dbdata, results, fields=fields, id_key=id_key,
                         max_length=max_length, separator=separator,
                         max_suggestions=max_suggestions)


# Automatically generated using Clang.jl

# Skipping MacroDefinition: PROJ_DLL __attribute__ ( ( visibility ( "default" ) ) )
# Skipping MacroDefinition: PROJ_DEPRECATED ( decl , msg ) decl __attribute__ ( ( deprecated ( msg ) ) )

const PROJ_VERSION_MAJOR = 7
const PROJ_VERSION_MINOR = 2
const PROJ_VERSION_PATCH = 0
const PJ_DEFAULT_CTX = 0
const PJ_AREA = Cvoid

struct P5_FACTORS
    meridional_scale::Cdouble
    parallel_scale::Cdouble
    areal_scale::Cdouble
    angular_distortion::Cdouble
    meridian_parallel_angle::Cdouble
    meridian_convergence::Cdouble
    tissot_semimajor::Cdouble
    tissot_semiminor::Cdouble
    dx_dlam::Cdouble
    dx_dphi::Cdouble
    dy_dlam::Cdouble
    dy_dphi::Cdouble
end

const PJ_FACTORS = P5_FACTORS
const PJconsts = Cvoid
const PJ = PJconsts

struct PJ_INFO
    major::Cint
    minor::Cint
    patch::Cint
    release::Cstring
    version::Cstring
    searchpath::Cstring
    paths::Ptr{Cstring}
    path_count::Csize_t
end

struct PJ_PROJ_INFO
    id::Cstring
    description::Cstring
    definition::Cstring
    has_inverse::Cint
    accuracy::Cdouble
end

struct PJ_LP
    lam::Cdouble
    phi::Cdouble
end

struct PJ_GRID_INFO
    gridname::NTuple{32, UInt8}
    filename::NTuple{260, UInt8}
    format::NTuple{8, UInt8}
    lowerleft::PJ_LP
    upperright::PJ_LP
    n_lon::Cint
    n_lat::Cint
    cs_lon::Cdouble
    cs_lat::Cdouble
end

struct PJ_INIT_INFO
    name::NTuple{32, UInt8}
    filename::NTuple{260, UInt8}
    version::NTuple{32, UInt8}
    origin::NTuple{32, UInt8}
    lastupdate::NTuple{16, UInt8}
end

struct PJ_LIST
    id::Cstring
    proj::Ptr{Cvoid}
    descr::Ptr{Cstring}
end

const PJ_OPERATIONS = PJ_LIST

struct PJ_ELLPS
    id::Cstring
    major::Cstring
    ell::Cstring
    name::Cstring
end

struct PJ_UNITS
    id::Cstring
    to_meter::Cstring
    name::Cstring
    factor::Cdouble
end

struct PJ_PRIME_MERIDIANS
    id::Cstring
    defn::Cstring
end

@cenum PJ_LOG_LEVEL::UInt32 begin
    PJ_LOG_NONE = 0
    PJ_LOG_ERROR = 1
    PJ_LOG_DEBUG = 2
    PJ_LOG_TRACE = 3
    PJ_LOG_TELL = 4
    PJ_LOG_DEBUG_MAJOR = 2
    PJ_LOG_DEBUG_MINOR = 3
end

const PJ_LOG_FUNCTION = Ptr{Cvoid}
const projCtx_t = Cvoid
const PJ_CONTEXT = projCtx_t
const proj_file_finder = Ptr{Cvoid}
const PROJ_FILE_HANDLE = Cvoid

@cenum PROJ_OPEN_ACCESS::UInt32 begin
    PROJ_OPEN_ACCESS_READ_ONLY = 0
    PROJ_OPEN_ACCESS_READ_UPDATE = 1
    PROJ_OPEN_ACCESS_CREATE = 2
end

struct PROJ_FILE_API
    version::Cint
    open_cbk::Ptr{Cvoid}
    read_cbk::Ptr{Cvoid}
    write_cbk::Ptr{Cvoid}
    seek_cbk::Ptr{Cvoid}
    tell_cbk::Ptr{Cvoid}
    close_cbk::Ptr{Cvoid}
    exists_cbk::Ptr{Cvoid}
    mkdir_cbk::Ptr{Cvoid}
    unlink_cbk::Ptr{Cvoid}
    rename_cbk::Ptr{Cvoid}
end

const PROJ_NETWORK_HANDLE = Cvoid
const proj_network_open_cbk_type = Ptr{Cvoid}
const proj_network_close_cbk_type = Ptr{Cvoid}
const proj_network_get_header_value_cbk_type = Ptr{Cvoid}
const proj_network_read_range_type = Ptr{Cvoid}

@cenum PJ_DIRECTION::Int32 begin
    PJ_FWD = 1
    PJ_IDENT = 0
    PJ_INV = -1
end

"Type representing a NULL terminated list of NULL-terminate strings"
const PROJ_STRING_LIST = Ptr{Cstring}

"Guessed WKT \"dialect\""
@cenum PJ_GUESSED_WKT_DIALECT::UInt32 begin
    PJ_GUESSED_WKT2_2019 = 0
    PJ_GUESSED_WKT2_2018 = 0
    PJ_GUESSED_WKT2_2015 = 1
    PJ_GUESSED_WKT1_GDAL = 2
    PJ_GUESSED_WKT1_ESRI = 3
    PJ_GUESSED_NOT_WKT = 4
end

"Object category"
@cenum PJ_CATEGORY::UInt32 begin
    PJ_CATEGORY_ELLIPSOID = 0
    PJ_CATEGORY_PRIME_MERIDIAN = 1
    PJ_CATEGORY_DATUM = 2
    PJ_CATEGORY_CRS = 3
    PJ_CATEGORY_COORDINATE_OPERATION = 4
end

"Object type"
@cenum PJ_TYPE::UInt32 begin
    PJ_TYPE_UNKNOWN = 0
    PJ_TYPE_ELLIPSOID = 1
    PJ_TYPE_PRIME_MERIDIAN = 2
    PJ_TYPE_GEODETIC_REFERENCE_FRAME = 3
    PJ_TYPE_DYNAMIC_GEODETIC_REFERENCE_FRAME = 4
    PJ_TYPE_VERTICAL_REFERENCE_FRAME = 5
    PJ_TYPE_DYNAMIC_VERTICAL_REFERENCE_FRAME = 6
    PJ_TYPE_DATUM_ENSEMBLE = 7
    PJ_TYPE_CRS = 8
    PJ_TYPE_GEODETIC_CRS = 9
    PJ_TYPE_GEOCENTRIC_CRS = 10
    PJ_TYPE_GEOGRAPHIC_CRS = 11
    PJ_TYPE_GEOGRAPHIC_2D_CRS = 12
    PJ_TYPE_GEOGRAPHIC_3D_CRS = 13
    PJ_TYPE_VERTICAL_CRS = 14
    PJ_TYPE_PROJECTED_CRS = 15
    PJ_TYPE_COMPOUND_CRS = 16
    PJ_TYPE_TEMPORAL_CRS = 17
    PJ_TYPE_ENGINEERING_CRS = 18
    PJ_TYPE_BOUND_CRS = 19
    PJ_TYPE_OTHER_CRS = 20
    PJ_TYPE_CONVERSION = 21
    PJ_TYPE_TRANSFORMATION = 22
    PJ_TYPE_CONCATENATED_OPERATION = 23
    PJ_TYPE_OTHER_COORDINATE_OPERATION = 24
    PJ_TYPE_TEMPORAL_DATUM = 25
    PJ_TYPE_ENGINEERING_DATUM = 26
    PJ_TYPE_PARAMETRIC_DATUM = 27
end

@cenum PJ_COMPARISON_CRITERION::UInt32 begin
    PJ_COMP_STRICT = 0
    PJ_COMP_EQUIVALENT = 1
    PJ_COMP_EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS = 2
end

"WKT version"
@cenum PJ_WKT_TYPE::UInt32 begin
    PJ_WKT2_2015 = 0
    PJ_WKT2_2015_SIMPLIFIED = 1
    PJ_WKT2_2019 = 2
    PJ_WKT2_2018 = 2
    PJ_WKT2_2019_SIMPLIFIED = 3
    PJ_WKT2_2018_SIMPLIFIED = 3
    PJ_WKT1_GDAL = 4
    PJ_WKT1_ESRI = 5
end

@cenum PROJ_CRS_EXTENT_USE::UInt32 begin
    PJ_CRS_EXTENT_NONE = 0
    PJ_CRS_EXTENT_BOTH = 1
    PJ_CRS_EXTENT_INTERSECTION = 2
    PJ_CRS_EXTENT_SMALLEST = 3
end

@cenum PROJ_GRID_AVAILABILITY_USE::UInt32 begin
    PROJ_GRID_AVAILABILITY_USED_FOR_SORTING = 0
    PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID = 1
    PROJ_GRID_AVAILABILITY_IGNORED = 2
    PROJ_GRID_AVAILABILITY_KNOWN_AVAILABLE = 3
end

"PROJ string version"
@cenum PJ_PROJ_STRING_TYPE::UInt32 begin
    PJ_PROJ_5 = 0
    PJ_PROJ_4 = 1
end

@cenum PROJ_SPATIAL_CRITERION::UInt32 begin
    PROJ_SPATIAL_CRITERION_STRICT_CONTAINMENT = 0
    PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION = 1
end

@cenum PROJ_INTERMEDIATE_CRS_USE::UInt32 begin
    PROJ_INTERMEDIATE_CRS_USE_ALWAYS = 0
    PROJ_INTERMEDIATE_CRS_USE_IF_NO_DIRECT_TRANSFORMATION = 1
    PROJ_INTERMEDIATE_CRS_USE_NEVER = 2
end

@cenum PJ_COORDINATE_SYSTEM_TYPE::UInt32 begin
    PJ_CS_TYPE_UNKNOWN = 0
    PJ_CS_TYPE_CARTESIAN = 1
    PJ_CS_TYPE_ELLIPSOIDAL = 2
    PJ_CS_TYPE_VERTICAL = 3
    PJ_CS_TYPE_SPHERICAL = 4
    PJ_CS_TYPE_ORDINAL = 5
    PJ_CS_TYPE_PARAMETRIC = 6
    PJ_CS_TYPE_DATETIMETEMPORAL = 7
    PJ_CS_TYPE_TEMPORALCOUNT = 8
    PJ_CS_TYPE_TEMPORALMEASURE = 9
end

struct PROJ_CRS_INFO
    auth_name::Cstring
    code::Cstring
    name::Cstring
    type::PJ_TYPE
    deprecated::Cint
    bbox_valid::Cint
    west_lon_degree::Cdouble
    south_lat_degree::Cdouble
    east_lon_degree::Cdouble
    north_lat_degree::Cdouble
    area_name::Cstring
    projection_method_name::Cstring
end

struct PROJ_CRS_LIST_PARAMETERS
    types::Ptr{PJ_TYPE}
    typesCount::Csize_t
    crs_area_of_use_contains_bbox::Cint
    bbox_valid::Cint
    west_lon_degree::Cdouble
    south_lat_degree::Cdouble
    east_lon_degree::Cdouble
    north_lat_degree::Cdouble
    allow_deprecated::Cint
end

struct PROJ_UNIT_INFO
    auth_name::Cstring
    code::Cstring
    name::Cstring
    category::Cstring
    conv_factor::Cdouble
    proj_short_name::Cstring
    deprecated::Cint
end

const PJ_OBJ_LIST = Cvoid
const PJ_OPERATION_FACTORY_CONTEXT = Cvoid