diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 8dd520a3b..5a2a89b5b 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -38,6 +38,10 @@ jobs: with: project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} coverage-reports: tests_and_analysis/test/reports/coverage.xml + - uses: codecov/codecov-action@v2 + if: startsWith(matrix.os, 'ubuntu') + with: + files: tests_and_analysis/test/reports/coverage.xml publish-test-results: needs: test diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f357a67e2..15b0f90e2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ `Unreleased `_ ---------- +- New Features: + + - New ``Spectrum1D.to_text_file`` and ``Spectrum1DCollection.to_text_file`` + methods to write to column text files + `v0.6.2 `_ ------ diff --git a/euphonic/spectra.py b/euphonic/spectra.py index 11a5ad4a8..65c7e8da0 100644 --- a/euphonic/spectra.py +++ b/euphonic/spectra.py @@ -3,6 +3,7 @@ import copy import itertools import math +import json from numbers import Integral from typing import (Any, Dict, List, Optional, overload, Sequence, Tuple, TypeVar, Union, Type, Iterable) @@ -15,7 +16,7 @@ _obj_to_dict, _process_dict) from euphonic.readers.castep import read_phonon_dos_data from euphonic.util import _get_unique_elems_and_idx -from euphonic import ureg, Quantity +from euphonic import ureg, Quantity, __version__ class Spectrum(ABC): @@ -374,6 +375,25 @@ def to_dict(self) -> Dict[str, Any]: return _obj_to_dict(self, ['x_data', 'y_data', 'x_tick_labels', 'metadata']) + def to_text_file(self, filename: str, + fmt: Optional[Union[str, Sequence[str]]] = None) -> None: + """ + Write to a text file. The header contains metadata and unit + information, the first column contains x_data and the second + column contains y_data. Note that text files written in this + format cannot be read back in by Euphonic. + + Parameters + ---------- + filename + Name of the text file to write to + fmt + A format specifier or sequence of specifiers (one for each + column), to be passed to numpy.savetxt + """ + spec = Spectrum1DCollection.from_spectra([self]) + spec.to_text_file(filename, fmt) + @classmethod def from_dict(cls: Type[T], d: Dict[str, Any]) -> T: """ @@ -733,6 +753,39 @@ def to_dict(self) -> Dict[str, Any]: return _obj_to_dict(self, ['x_data', 'y_data', 'x_tick_labels', 'metadata']) + def to_text_file(self, filename: str, + fmt: Optional[Union[str, Sequence[str]]] = None) -> None: + """ + Write to a text file. The header contains metadata and unit + information, the first column is x_data and each subsequent + column is a y_data spectrum. Note that text files written in + this format cannot be read back in by Euphonic. + + Parameters + ---------- + filename + Name of the text file to write to + fmt + A format specifier or sequence of specifiers (one for each + column), to be passed to numpy.savetxt + """ + common_metadata = copy.deepcopy(self.metadata) + line_data = common_metadata.pop('line_data', + [{} for i in self.y_data]) + header = [f'Generated by Euphonic {__version__}', + f'x_data in ({self.x_data.units})', + f'y_data in ({self.y_data.units})', + f'Common metadata: {json.dumps(common_metadata)}', + f'Column 1: x_data'] + for i, line in enumerate(line_data): + header += [f'Column {i + 2}: y_data[{i}] {json.dumps(line)}'] + out_data = np.hstack((self.get_bin_centres().magnitude[:, np.newaxis], + self.y_data.transpose().magnitude)) + kwargs = {'header': '\n'.join(header)} + if fmt is not None: + kwargs['fmt'] = fmt + np.savetxt(filename, out_data, **kwargs) + @classmethod def from_dict(cls: Type[T], d) -> T: """ diff --git a/tests_and_analysis/test/data/spectrum1d/quartz_666_dos_from_text.json b/tests_and_analysis/test/data/spectrum1d/quartz_666_dos_from_text.json new file mode 100644 index 000000000..54bb09128 --- /dev/null +++ b/tests_and_analysis/test/data/spectrum1d/quartz_666_dos_from_text.json @@ -0,0 +1,628 @@ +{ + "__euphonic_class__": "Spectrum1D", + "__euphonic_version__": "0.6.2+4.g34f80ec.dirty", + "x_data": [ + 0.25, + 0.75, + 1.25, + 1.75, + 2.25, + 2.75, + 3.25, + 3.75, + 4.25, + 4.75, + 5.25, + 5.75, + 6.25, + 6.75, + 7.25, + 7.75, + 8.25, + 8.75, + 9.25, + 9.75, + 10.25, + 10.75, + 11.25, + 11.75, + 12.25, + 12.75, + 13.25, + 13.75, + 14.25, + 14.75, + 15.25, + 15.75, + 16.25, + 16.75, + 17.25, + 17.75, + 18.25, + 18.75, + 19.25, + 19.75, + 20.25, + 20.75, + 21.25, + 21.75, + 22.25, + 22.75, + 23.25, + 23.75, + 24.25, + 24.75, + 25.25, + 25.75, + 26.25, + 26.75, + 27.25, + 27.75, + 28.25, + 28.75, + 29.25, + 29.75, + 30.25, + 30.75, + 31.25, + 31.75, + 32.25, + 32.75, + 33.25, + 33.75, + 34.25, + 34.75, + 35.25, + 35.75, + 36.25, + 36.75, + 37.25, + 37.75, + 38.25, + 38.75, + 39.25, + 39.75, + 40.25, + 40.75, + 41.25, + 41.75, + 42.25, + 42.75, + 43.25, + 43.75, + 44.25, + 44.75, + 45.25, + 45.75, + 46.25, + 46.75, + 47.25, + 47.75, + 48.25, + 48.75, + 49.25, + 49.75, + 50.25, + 50.75, + 51.25, + 51.75, + 52.25, + 52.75, + 53.25, + 53.75, + 54.25, + 54.75, + 55.25, + 55.75, + 56.25, + 56.75, + 57.25, + 57.75, + 58.25, + 58.75, + 59.25, + 59.75, + 60.25, + 60.75, + 61.25, + 61.75, + 62.25, + 62.75, + 63.25, + 63.75, + 64.25, + 64.75, + 65.25, + 65.75, + 66.25, + 66.75, + 67.25, + 67.75, + 68.25, + 68.75, + 69.25, + 69.75, + 70.25, + 70.75, + 71.25, + 71.75, + 72.25, + 72.75, + 73.25, + 73.75, + 74.25, + 74.75, + 75.25, + 75.75, + 76.25, + 76.75, + 77.25, + 77.75, + 78.25, + 78.75, + 79.25, + 79.75, + 80.25, + 80.75, + 81.25, + 81.75, + 82.25, + 82.75, + 83.25, + 83.75, + 84.25, + 84.75, + 85.25, + 85.75, + 86.25, + 86.75, + 87.25, + 87.75, + 88.25, + 88.75, + 89.25, + 89.75, + 90.25, + 90.75, + 91.25, + 91.75, + 92.25, + 92.75, + 93.25, + 93.75, + 94.25, + 94.75, + 95.25, + 95.75, + 96.25, + 96.75, + 97.25, + 97.75, + 98.25, + 98.75, + 99.25, + 99.75, + 100.25, + 100.75, + 101.25, + 101.75, + 102.25, + 102.75, + 103.25, + 103.75, + 104.25, + 104.75, + 105.25, + 105.75, + 106.25, + 106.75, + 107.25, + 107.75, + 108.25, + 108.75, + 109.25, + 109.75, + 110.25, + 110.75, + 111.25, + 111.75, + 112.25, + 112.75, + 113.25, + 113.75, + 114.25, + 114.75, + 115.25, + 115.75, + 116.25, + 116.75, + 117.25, + 117.75, + 118.25, + 118.75, + 119.25, + 119.75, + 120.25, + 120.75, + 121.25, + 121.75, + 122.25, + 122.75, + 123.25, + 123.75, + 124.25, + 124.75, + 125.25, + 125.75, + 126.25, + 126.75, + 127.25, + 127.75, + 128.25, + 128.75, + 129.25, + 129.75, + 130.25, + 130.75, + 131.25, + 131.75, + 132.25, + 132.75, + 133.25, + 133.75, + 134.25, + 134.75, + 135.25, + 135.75, + 136.25, + 136.75, + 137.25, + 137.75, + 138.25, + 138.75, + 139.25, + 139.75, + 140.25, + 140.75, + 141.25, + 141.75, + 142.25, + 142.75, + 143.25, + 143.75, + 144.25, + 144.75, + 145.25, + 145.75, + 146.25, + 146.75, + 147.25, + 147.75, + 148.25, + 148.75, + 149.25, + 149.75, + 150.25, + 150.75, + 151.25, + 151.75, + 152.25, + 152.75, + 153.25, + 153.75, + 154.25 + ], + "x_data_unit": "millielectron_volt", + "y_data": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01851851860185184, + 0.0, + 0.018518518601851854, + 0.018518518601851854, + 0.05555555560555557, + 0.0, + 0.05555555560555549, + 0.018518518601851854, + 0.1666666668166667, + 0.09259259280925941, + 0.24074074082407382, + 0.1851851852185183, + 0.7037037032703714, + 0.537037037253703, + 0.37037037023703767, + 0.14814814801481466, + 0.11111111101111129, + 0.24074074062407383, + 0.1851851852185183, + 0.18518518541851883, + 0.2962962960296293, + 0.38888888883888956, + 0.37037037043703663, + 0.3518518518351848, + 0.3518518516351869, + 0.1851851852185183, + 0.11111111121111097, + 0.2777777782277775, + 0.425925926042592, + 0.314814814631483, + 0.333333333433333, + 0.12962962961296282, + 0.2037037040203701, + 0.22222222222222326, + 0.07407407420740732, + 0.49999999964999936, + 0.12962962961296282, + 0.3703703702370366, + 0.12962962961296357, + 0.12962962961296282, + 0.14814814801481466, + 0.11111111121111097, + 0.3888888888388884, + 0.3518518516351869, + 0.12962962961296282, + 0.2592592592259257, + 0.22222222222222196, + 0.1481481482148155, + 0.20370370382037012, + 0.48148148144815056, + 0.14814814821481376, + 0.3333333332333349, + 0.12962962961296204, + 0.314814814631483, + 0.35185185223518683, + 0.2222222220222206, + 0.18518518501851938, + 0.2222222220222206, + 0.3703703704370388, + 0.25925925942592715, + 0.2407407410240724, + 0.29629629662963103, + 0.35185185183518264, + 0.07407407400740776, + 0.27777777782777907, + 0.3703703702370344, + 0.314814814631483, + 0.5000000000499966, + 0.4444444442444466, + 0.20370370362037132, + 0.1851851850185172, + 0.3888888888388908, + 0.3703703704370388, + 0.1666666666166655, + 0.14814814801481552, + 0.12962962961296204, + 0.11111111141111163, + 0.18518518501851938, + 0.333333333233331, + 0.22222222222222326, + 0.14814814801481377, + 0.16666666661666746, + 0.11111111101111164, + 0.27777777782777585, + 0.1851851852185194, + 0.2037037036203689, + 0.2777777776277791, + 0.22222222222222326, + 0.1851851856185172, + 0.27777777782777907, + 0.5370370366537, + 0.46296296284629856, + 0.3888888890388908, + 0.462962962846293, + 0.4444444444444466, + 0.6111111110611142, + 0.42592592604258955, + 0.7407407402740777, + 0.4444444448444413, + 0.2037037038203713, + 0.5185185186518545, + 0.31481481503147923, + 0.4444444442444466, + 0.4444444444444466, + 0.25925925922592713, + 0.3148148146314755, + 0.5000000004500025, + 0.5185185188518544, + 0.29629629602963103, + 0.1481481482148155, + 0.22222222222221802, + 0.20370370362037132, + 0.0925925926092597, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.07407407440740775, + 0.29629629602963103, + 0.05555555560555581, + 0.09259259280925969, + 0.22222222222221802, + 0.22222222222222326, + 0.25925925902592717, + 0.18518518501851938, + 0.296296296429631, + 0.14814814801481202, + 0.07407407400740776, + 0.03703703700370388, + 0.037037037203703875, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.07407407420740775, + 0.037037037003703005, + 0.05555555560555581, + 0.05555555560555581, + 0.11111111101111164, + 0.07407407400740776, + 0.18518518501851938, + 0.185185185218515, + 0.18518518501851938, + 0.37037037023703884, + 0.12962962981296358, + 0.0925925926092597, + 0.0, + 0.11111111101111164, + 0.03703703700370388, + 0.07407407420740775, + 0.03703703700370388, + 0.0185185186018515, + 0.07407407400740776, + 0.018518518601851938, + 0.03703703700370388, + 0.018518518601851938, + 0.0185185186018515, + 0.07407407400740776, + 0.0, + 0.0, + 0.0, + 0.037037037003703005, + 0.03703703700370388, + 0.0, + 0.0, + 0.07407407420740775, + 0.14814814801481202, + 0.35185185183518686, + 0.27777777782777907, + 0.1851851852185194, + 0.14814814801481552, + 0.0555555556055545, + 0.07407407400740776, + 0.14814814801481552, + 0.05555555560555581, + 0.07407407400740776, + 0.07407407420740601, + 0.07407407420740775, + 0.03703703700370388, + 0.0, + 0.0, + 0.037037037003703005, + 0.1481481484148155, + 0.11111111121111163, + 0.3888888890388908, + 0.3333333334333349, + 0.27777777782777907, + 0.5185185186518423, + 0.5185185186518545, + 0.3518518520351869, + 0.7037037034703738, + 0.42592592584259464, + 0.6296296294629513, + 0.46296296284629856, + 0.2037037038203713, + 0.14814814801481552, + 0.4259259256425947, + 0.16666666661666352, + 0.07407407400740776, + 0.1481481482148155, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.6851851852685382, + 1.1111111111110905, + 0.9814814814981299, + 1.2962962961296671, + 1.5925925923592283, + 0.3333333336333427, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0185185186018515, + 0.0185185186018515, + 0.037037037003704754, + 0.037037037203703, + 0.11111111101111426, + 0.0185185186018515, + 0.0925925926092575, + 0.11111111121111425, + 0.111111111211109, + 0.2777777778277856, + 0.4444444442444361, + 0.4444444442444361, + 0.2037037036203761, + 0.31481481503147557, + 0.6851851846685382, + 0.3518518518351786, + 0.2777777778277725, + 0.2592592590259332, + 0.222222222422218, + 0.3518518516351951, + 0.148148148214812, + 0.3148148146314755, + 0.12962962961296665, + 0.222222222422218, + 0.2037037036203761, + 0.1296296296129605, + 0.12962962961296665, + 0.14814814841481203, + 0.07407407400740601, + 0.037037037003704754, + 0.074074074407406, + 0.0, + 0.0, + 0.0 + ], + "y_data_unit": "1 / millielectron_volt" +} \ No newline at end of file diff --git a/tests_and_analysis/test/data/spectrum1dcollection/gan_bands_from_text_file.json b/tests_and_analysis/test/data/spectrum1dcollection/gan_bands_from_text_file.json new file mode 100644 index 000000000..e6e3cddb2 --- /dev/null +++ b/tests_and_analysis/test/data/spectrum1dcollection/gan_bands_from_text_file.json @@ -0,0 +1,1723 @@ +{ + "__euphonic_class__": "Spectrum1DCollection", + "__euphonic_version__": "0.6.2+3.g379357f.dirty", + "x_data": [ + 0.0, + 0.025883087787901028, + 0.051766175575802056, + 0.07764926336370308, + 0.10353235115160411, + 0.12941543893950513, + 0.15529852672740616, + 0.1811816145153072, + 0.20706470230320825, + 0.23294779009110927, + 0.2588308778790103, + 0.2847139656669114, + 0.31059705345481237, + 0.3364801412427134, + 0.36236322903061446, + 0.3882463168185155, + 0.4141294046064165, + 0.44001249239431756, + 0.46589558018221855, + 0.49177866797011965, + 0.5176617557580206, + 0.5435448435459217, + 0.5694279313338227, + 0.5953110191217238, + 0.6211941069096247, + 0.6470771946975259, + 0.6729602824854268, + 0.698843370273328, + 0.7247264580612289, + 0.7506095458491301, + 0.7764926336370311, + 0.8023757214249321, + 0.8282588092128331, + 0.8541418970007343, + 0.8800249847886352, + 0.9059080725765363, + 0.9317911603644372, + 0.9576742481523384, + 0.9835573359402395, + 1.0094404237281407, + 1.0353235115160417, + 1.0612065993039428, + 1.0870896870918438, + 1.1129727748797449, + 1.138855862667646, + 1.1647389504555472, + 1.1906220382434483, + 1.2165051260313493, + 1.2423882138192504, + 1.2682713016071514, + 1.2941543893950527, + 1.3200374771829537, + 1.3459205649708548, + 1.3718036527587558, + 1.3976867405466569, + 1.4251399008859642, + 1.4525930612252715, + 1.4800462215645789, + 1.5074993819038864, + 1.5349525422431938, + 1.562405702582501, + 1.5898588629218084, + 1.6173120232611158, + 1.6447651836004231, + 1.6722183439397305, + 1.6996715042790378, + 1.7271246646183451, + 1.7545778249576525, + 1.7820309852969598, + 1.8094841456362671, + 1.8369373059755745, + 1.8643904663148818, + 1.891843626654189, + 2.7477484603024602, + 2.7733082992390568, + 2.7988681381756533, + 2.82442797711225, + 2.849987816048846, + 2.8755476549854424, + 2.901107493922039, + 2.9266673328586355, + 2.9522271717952315, + 2.977787010731828, + 3.0033468496684246, + 3.0289066886050207, + 3.054466527541617, + 3.0800263664782137, + 3.1055862054148102, + 3.1311460443514063, + 3.156705883288003, + 3.1822657222245994, + 3.207825561161196, + 3.233385400097792, + 3.2589452390343885, + 3.284505077970985, + 3.3100649169075815, + 3.3356247558441776, + 3.361184594780774, + 3.3867444337173707, + 3.412304272653967, + 3.4378641115905633, + 3.46342395052716, + 3.4889837894637563, + 3.514543628400353, + 3.540103467336949, + 3.5656633062735454, + 3.591223145210142, + 3.6167829841467385, + 3.6423428230833346, + 3.667902662019931, + 3.6934625009565276, + 3.7190223398931237, + 3.74458217882972, + 3.7701420177663167, + 3.795701856702913, + 3.8212616956395093, + 3.8468215345761054, + 3.8723813735127024, + 3.8979412124492985, + 3.923501051385895, + 3.949060890322491, + 3.974620729259088, + 4.000180568195684, + 4.025740407132281, + 4.051300246068877, + 4.076860085005474, + 4.10241992394207, + 4.127979762878667, + 4.153539601815263, + 4.179099440751859, + 4.204659279688455, + 4.230219118625052, + 4.25597299572816, + 4.2817268728312685, + 4.307480749934376, + 4.333234627037484, + 4.3589885041405925, + 4.384742381243701, + 4.410496258346809, + 4.436250135449916, + 4.462004012553025, + 4.487757889656133, + 4.513511766759241, + 4.539265643862349, + 4.565019520965457, + 4.590773398068565, + 4.6165272751716735, + 4.642281152274782, + 4.668035029377889, + 4.6937889064809974, + 4.719542783584106, + 4.745296660687214, + 4.771050537790322, + 4.79680441489343, + 4.822558291996538, + 4.848312169099646, + 4.8740660462027545, + 4.899819923305862, + 4.92557380040897, + 4.9513276775120785, + 4.977081554615187, + 5.002835431718295, + 5.028589308821402, + 5.054343185924511, + 5.080097063027619, + 5.105850940130727, + 5.131604817233835, + 5.157358694336943, + 5.183112571440051, + 5.2088664485431595, + 5.234620325646268, + 5.260374202749375, + 5.2861280798524835, + 5.311881956955592, + 5.3376358340587, + 5.363389711161807, + 5.389143588264916, + 5.414897465368024, + 5.440651342471132, + 5.466659599634686, + 5.49266785679824, + 5.518676113961795, + 5.544684371125348, + 5.570692628288903, + 5.5967008854524565, + 5.622709142616011, + 5.6487173997795646, + 5.674725656943119, + 5.700733914106673, + 5.726742171270228, + 5.752750428433782, + 5.778758685597335, + 5.804766942760889, + 5.830775199924444, + 5.856783457087998, + 5.882791714251551, + 5.908799971415106, + 5.93480822857866, + 5.960816485742214, + 5.986824742905768, + 6.012833000069323, + 6.0388412572328765, + 6.064849514396431, + 6.0908577715599845, + 6.116866028723539, + 6.142874285887093, + 6.168882543050647, + 6.194890800214201, + 6.220899057377756, + 6.24690731454131, + 6.272915571704863, + 6.298923828868417, + 6.324932086031972, + 6.350940343195526, + 6.376948600359079, + 6.402956857522634, + 6.428965114686188, + 6.455843705850547, + 6.482722297014906, + 6.509600888179264, + 6.536479479343623, + 6.563358070507982, + 6.590236661672341, + 6.617115252836699, + 6.643993844001058, + 6.670872435165417, + 6.697751026329776, + 6.724629617494134, + 6.751508208658493, + 6.778386799822852, + 6.805265390987211, + 6.832143982151569, + 6.8590225733159285, + 6.885901164480287, + 6.912779755644646, + 6.939658346809004, + 6.9665369379733635, + 6.993415529137723, + 7.020294120302081, + 7.04717271146644, + 7.0740513026307985, + 7.100929893795158, + 7.127808484959516 + ], + "x_data_unit": "1 / angstrom", + "y_data": [ + [ + 0.27246540966014005, + 0.8750878639121238, + 1.683840997239127, + 2.503246568483893, + 3.3213180549969517, + 4.134287350786531, + 4.93987291226799, + 5.736270483165658, + 6.5219036100723216, + 7.295345323992964, + 8.055290739672751, + 8.80054739536054, + 9.530032180174743, + 10.242770537664093, + 10.937896108252968, + 11.614649984450606, + 12.272379212108737, + 12.910534400584396, + 13.528666429320454, + 14.12642231038361, + 14.703540309257097, + 15.259844450765964, + 15.795238549120938, + 16.30969990396019, + 16.803272800083267, + 17.276061938948544, + 17.728225916335862, + 18.15997084411592, + 18.571544195963153, + 18.963228938133565, + 19.33533798800096, + 19.688209025663678, + 20.022199668198354, + 20.337683002495385, + 20.63504346136046, + 20.914673018870612, + 21.176967674869246, + 21.422324194913777, + 21.651137070796608, + 21.863795667727583, + 22.060681527113754, + 22.242165798282542, + 22.408606778108734, + 22.56034754396019, + 22.69771367227987, + 22.821011042097236, + 22.93052372944173, + 23.026512004668888, + 23.109210449810202, + 23.178826216958758, + 23.235537451227508, + 23.27949190284095, + 23.31080575241542, + 23.32956267149727, + 23.3358131370918, + 23.33390632309184, + 23.328093365949393, + 23.318101085787, + 23.303488445978076, + 23.28366696589746, + 23.25792743274719, + 23.225471261216807, + 23.185444651963376, + 23.136973657064086, + 23.079198362817653, + 23.011304624213903, + 22.932552099236354, + 22.84229769987348, + 22.74001396642547, + 22.625302252755734, + 22.49790095840943, + 22.357689340248513, + 22.204687666890393, + 22.204687667445345, + 22.050877799797448, + 21.886350144247153, + 21.711434524343918, + 21.526554250791534, + 21.332222797273246, + 21.129040970656547, + 20.91769450350588, + 20.698951724458077, + 20.473660680553802, + 20.24274482726523, + 20.00719620542396, + 19.76806493064818, + 19.526443867614553, + 19.2834475749621, + 19.040184994589524, + 18.797725905152575, + 18.5570618203237, + 18.319062719539136, + 18.084431666318565, + 17.853659904184884, + 17.626985338305573, + 17.40435735098226, + 17.18541063546952, + 16.969450182507376, + 16.755448776806865, + 16.54205744951787, + 16.32762839856793, + 16.110249042037694, + 15.887785201710624, + 15.657930983354813, + 15.418262747317412, + 15.16629463119385, + 14.899533350999869, + 14.615530407499584, + 14.311930295190589, + 13.986513793963516, + 13.637235871119515, + 13.262258102591241, + 12.859975819679278, + 12.429040396032608, + 11.968377212245235, + 11.477199881049147, + 10.955021296490887, + 10.401661999338158, + 9.817256243679072, + 9.20225602474218, + 8.557433210313622, + 7.883879846318167, + 7.1830067499995325, + 6.4565408035410785, + 5.70652225356618, + 4.918960178944108, + 4.1067176816070825, + 3.2925099986977107, + 2.477697904633889, + 1.665047723365991, + 0.865548694132166, + 0.27246540966014005, + 0.8836305811539976, + 1.6999190853688761, + 2.52358877918911, + 3.34125144792477, + 4.1477376264083325, + 4.939448175165937, + 5.713374572192669, + 6.466868145205399, + 7.197575320407246, + 7.903419866093574, + 8.58259942420177, + 9.233585527314208, + 9.855123142425814, + 10.446228268399434, + 11.006183118527902, + 11.534528850863154, + 12.031055993615466, + 12.495792783393199, + 12.928991650400151, + 13.33111407716565, + 13.702814042274875, + 14.044920246952124, + 14.358417314889941, + 14.644426156246602, + 14.904183695117442, + 15.139022174518512, + 15.3503482716177, + 15.539622275636178, + 15.708337598339282, + 15.858000899148724, + 15.990113110716544, + 16.10615164388772, + 16.20755403161643, + 16.295703238769455, + 16.37191481907454, + 16.437426043068285, + 16.493387054222623, + 16.540854037894395, + 16.58078431357245, + 16.61403318976108, + 16.641352357517228, + 16.66338954763214, + 16.68068914147629, + 16.693693409379925, + 16.70274405455421, + 16.70808376505812, + 16.70985751981412, + 16.722231621362575, + 16.759279026703116, + 16.82077535687163, + 16.906348217839355, + 17.01547975681528, + 17.147510697131693, + 17.301646173547404, + 17.476963666534793, + 17.672423228012487, + 17.88688002353854, + 18.119099004061702, + 18.36777128597702, + 18.63153158565432, + 18.90897584751633, + 19.198678043976518, + 19.499205027289868, + 19.80912828762089, + 20.127031521052473, + 20.4515130302008, + 20.78118215429564, + 21.11464913250974, + 21.450508015125216, + 21.787312420364398, + 22.12354406274881, + 22.45757403809595, + 22.787616857127556, + 23.1116772464151, + 23.427489951970838, + 23.732453520542997, + 24.023560884154957, + 24.29733346171831, + 24.549772635487454, + 24.776353838319285, + 24.972103169533455, + 25.13180820302494, + 25.250408144902426, + 25.32356207558269, + 25.348300164139285, + 25.341557427099996, + 25.321403911695903, + 25.28806377325178, + 25.24191078668674, + 25.18346846553992, + 25.113409922003896, + 25.032557169919823, + 24.941879500828524, + 24.842490503060404, + 24.735643249842422, + 24.622723159600795, + 24.50523803567905, + 24.384804829409685, + 24.26313274532037, + 24.142002424526684, + 24.023241104176623, + 23.908693856004962, + 23.80019124997015, + 23.69951405850206, + 23.60835589607437, + 23.528284955009298, + 23.460706224771805, + 23.406825740080958, + 23.367618466635726, + 23.343801382294863, + 23.3358131370918 + ], + [ + 0.27246540966057675, + 0.8753665033446447, + 1.684130268808029, + 2.5035378331161198, + 3.3216098867873534, + 4.134579282670512, + 4.940164712327492, + 5.73656199397039, + 6.52219469846869, + 7.29563586143639, + 8.055580593110792, + 8.80083642241964, + 9.53032022636877, + 10.243057434688511, + 10.938181672943001, + 11.614934018198154, + 12.272661500629487, + 12.910814713972467, + 13.528944522349805, + 14.12669792302641, + 14.703813167394404, + 15.26011426706826, + 15.795505024077453, + 16.309962727036314, + 16.8035316509859, + 17.276316488979802, + 17.728475829816304, + 18.160215779859392, + 18.57178380878664, + 18.963462880386615, + 19.33556591110079, + 19.688430581623543, + 20.022414511138162, + 20.33789079012517, + 20.635243856428488, + 20.91486569056932, + 21.17715230019329, + 21.422500459965455, + 21.651304672034918, + 21.8639543131577, + 22.060830937414586, + 22.242305707870294, + 22.408736936134925, + 22.560467715242847, + 22.69782363816678, + 22.821110601260465, + 22.930612698602467, + 23.026590219252082, + 23.109277764528223, + 23.17888250632359, + 23.235582609990853, + 23.27952584636183, + 23.310828416954816, + 23.329574014439387, + 23.335813137091804, + 23.363980811700596, + 23.44793873736674, + 23.586072852022223, + 23.775761276756, + 24.013468215636124, + 24.294860158980097, + 24.614932446779857, + 24.968134569700158, + 25.34848436998399, + 25.74966401128206, + 26.16509368299227, + 26.58798213025034, + 27.011356156988786, + 27.428074427191763, + 27.830834635235746, + 28.2121880086566, + 28.564581532147113, + 28.880455706864016, + 28.88046641902283, + 29.135244598625345, + 29.346379416110146, + 29.50895036421686, + 29.619070854647354, + 29.674259943381088, + 29.673724201426364, + 29.61845179448831, + 29.511064850514725, + 29.355454133791444, + 29.156289804009045, + 28.91852590985222, + 28.646990447310337, + 28.34610327937368, + 28.019720209629792, + 27.671076960543676, + 27.302800438203306, + 26.916958857007245, + 26.51513010535581, + 26.098475192040315, + 25.667809266033146, + 25.22366646019047, + 24.766357089117676, + 24.296017014163397, + 23.81264965711002, + 23.31616145748556, + 22.806391684410272, + 22.28313752139257, + 21.74617528825172, + 21.195278571935443, + 20.630233919912, + 20.05085461448386, + 19.456992901775706, + 18.848550904084394, + 18.22549030825863, + 17.587840805104197, + 16.935707163410793, + 16.269274762512584, + 15.588813381598248, + 14.894679051204994, + 14.187313808538628, + 13.467243257620293, + 12.73507191140015, + 11.991476380452289, + 11.237196568548587, + 10.47302513971119, + 9.699795639473631, + 8.918369797143436, + 8.129624730287723, + 7.334441069058665, + 6.533693537516783, + 5.728246586987278, + 4.93530572521598, + 4.145575458005914, + 3.340407168896963, + 2.5234952813342693, + 1.7001281012184521, + 0.88382907846883, + 0.27246540966057675, + 0.8837227674578488, + 1.7000168305691754, + 2.5236907033555465, + 3.3413584461582984, + 4.147850840672684, + 4.939568747115269, + 5.713503578536694, + 6.467006570389339, + 7.1977240409902254, + 7.903579640342963, + 8.582770884748061, + 9.233769175921035, + 9.855319346321174, + 10.44643725776654, + 11.006404984831496, + 11.534763545747307, + 12.031303328169228, + 12.496052427643564, + 12.929263132958479, + 13.331396785022235, + 13.703107220800486, + 14.045223000226995, + 14.358728606533699, + 14.644744810966673, + 14.904508401226353, + 15.139351487691446, + 15.35068062016677, + 15.53995596757074, + 15.708670830456176, + 15.858331768357163, + 15.990439627745598, + 16.106471749455608, + 16.207865615057038, + 16.296004159020494, + 16.372202927832102, + 16.43769920981407, + 16.493643192731263, + 16.541091133740363, + 16.581000452078595, + 16.614226583771718, + 16.641521374340464, + 16.663532734480114, + 16.680805248743102, + 16.693781411131777, + 16.702803165666992, + 16.708113454520166, + 16.709857519814214, + 16.74941016703083, + 16.867101243129405, + 17.060106384398345, + 17.32395831681284, + 17.652863284966358, + 18.040070132454314, + 18.47824319068001, + 18.9598001325457, + 19.47719057056469, + 20.02310555290496, + 20.590619227732745, + 21.173270849010525, + 21.765098449886032, + 22.360635999813272, + 22.95488481611884, + 23.54326830639373, + 24.12157736072961, + 24.68591223026209, + 25.232625694789412, + 25.75827182070529, + 26.259564677267093, + 26.73335200908432, + 27.176609968188913, + 27.586466323813845, + 27.960260499020297, + 28.295648266100887, + 28.590755445837814, + 28.844376963431483, + 29.05620465358375, + 29.22705133097319, + 29.359024954081832, + 29.455601302247736, + 29.52154903323464, + 29.56267356539925, + 29.585360518577446, + 29.59591954426959, + 29.599773569736737, + 29.60061962191349, + 29.56156957132683, + 29.447326653610613, + 29.265757452842852, + 29.027664235600344, + 28.74467537232735, + 28.427785144769935, + 28.08666193889423, + 27.72950078532604, + 27.36315541064481, + 26.99336879426022, + 26.62500868041688, + 26.26227039412876, + 25.908837506039458, + 25.568002623555255, + 25.24275426254743, + 24.93583606665593, + 24.649783837375036, + 24.386944871045255, + 24.149483310243635, + 23.93937468142635, + 23.75839247444404, + 23.6080894501905, + 23.48977625845018, + 23.404499832354855, + 23.353023836111, + 23.335813137091804 + ], + [ + 0.2724654096606354, + 1.3287347191596968, + 2.612095046265384, + 3.898475463845286, + 5.1779737562786154, + 6.446344941259295, + 7.700473379033892, + 8.937732802604257, + 10.155836679570726, + 11.352791871066453, + 12.526878858695742, + 13.676638945524429, + 14.800863129561977, + 15.89858154417976, + 16.96905358198168, + 18.011759032166356, + 19.026390423194375, + 20.012846526432956, + 20.97122674725103, + 21.90182594825972, + 22.805129125041102, + 23.6818052836475, + 24.532699841824503, + 25.358824882132637, + 26.161346616426517, + 26.941569471657278, + 27.700916273441692, + 28.440904085223803, + 29.16311535756145, + 29.869164155352006, + 30.560657362146475, + 31.23915091135444, + 31.906101265018034, + 32.56281255250691, + 33.21037999471369, + 33.849630475734685, + 34.4810613871508, + 35.104779166403866, + 35.720439290635426, + 36.327189884511455, + 36.92362157033648, + 37.50772674299729, + 38.076872089869205, + 38.627788867619564, + 39.15658611566622, + 39.658792478109966, + 40.12943237577635, + 40.56314157308543, + 40.954325314880336, + 41.29735879987737, + 41.58682466203029, + 41.81777564948103, + 41.98600376693152, + 42.0882913801327, + 42.12261710929493, + 42.10777296067744, + 42.06336593159071, + 41.9897723545017, + 41.887619772357354, + 41.75778758956546, + 41.60140831408295, + 41.41986970840081, + 41.21481823307049, + 40.988164197557836, + 40.742088994311054, + 40.479054616446014, + 40.20181522896175, + 39.91342967972265, + 39.61727219129802, + 39.31703563868308, + 39.016717307725216, + 38.72057058275285, + 38.43299828217675, + 38.43297495644636, + 38.17676834386485, + 37.93502143697071, + 37.71041059981278, + 37.50467558992019, + 37.31825389958653, + 37.15000857630902, + 36.99714692043338, + 36.85538310907382, + 36.719319589645885, + 36.582952151154124, + 36.44017964443595, + 36.28522519648796, + 36.11292547136624, + 35.91888881272815, + 35.69954800039799, + 35.45214011828641, + 35.17464223478885, + 34.86568414549274, + 34.52445225535217, + 34.15059322031235, + 33.74412230914239, + 33.30533917242063, + 32.834752349654345, + 32.33301304329936, + 31.800858201591446, + 31.239062642009852, + 30.648399741163647, + 30.029610080460838, + 29.38337735492381, + 28.710310817620083, + 28.010933538635864, + 27.285675798478824, + 26.534873002618394, + 25.75876758675854, + 24.957514471481215, + 24.13118971131398, + 23.279802060272345, + 22.403307239175884, + 21.50162473745666, + 20.574657013180143, + 19.622310969265325, + 18.644521580032347, + 17.641277516715597, + 16.61264856753486, + 15.55881456005332, + 14.480095365193769, + 13.376981394760048, + 12.250163815141484, + 11.100563538598555, + 9.9293580344365, + 8.738005387681218, + 7.5282664888688196, + 6.302230758945501, + 5.062365653391268, + 3.8116687865627092, + 2.554318707214866, + 1.3002924754732592, + 0.2724654096606354, + 1.3057192015951349, + 2.5667301858764713, + 3.8337685755845547, + 5.098190796074834, + 6.357055890534106, + 7.60850568972799, + 8.85110025624535, + 10.083653684148647, + 11.305175781950545, + 12.51484088168892, + 13.711963221971104, + 14.895973046707068, + 16.06639203967708, + 17.222808189102153, + 18.364850613515387, + 19.492164927152956, + 20.604389627997335, + 21.701133860489122, + 22.781956784077686, + 23.84634868600691, + 24.893713915465778, + 25.92335568299422, + 26.934462757726777, + 27.926098099433617, + 28.89718947724292, + 29.84652214883963, + 30.77273370079157, + 31.67431118154784, + 32.54959069324404, + 33.39675964627996, + 34.21386192041533, + 34.99880621504304, + 35.74937790435188, + 36.463254732690366, + 37.138026681254125, + 37.771220296551675, + 38.36032768004508, + 38.90284018377876, + 39.39628662937927, + 39.838275565821185, + 40.22654071475869, + 40.55898834595734, + 40.833744920543865, + 41.04920299143923, + 41.204063120639596, + 41.29736952034477, + 41.32853729048467, + 41.31831009754797, + 41.28773396886531, + 41.23712199741101, + 41.16698550438851, + 41.07801947193447, + 40.97108428881721, + 40.847185482834334, + 40.70745306470492, + 40.55312185485527, + 40.38551379317166, + 40.20602283588702, + 40.0161027002708, + 39.8172574734929, + 39.61103496957941, + 39.399022679427226, + 39.18284617060351, + 38.96416979554081, + 38.74469948551453, + 38.52618716128903, + 38.31043579309737, + 38.099303312764626, + 37.89470237231298, + 37.69859139801935, + 37.51295073641532, + 37.33973648825527, + 37.180804895764766, + 37.03780332241175, + 36.91203130845705, + 36.8042870397012, + 36.71472821022998, + 36.64278568543102, + 36.587166295080486, + 36.54596397967714, + 36.51687105651565, + 36.497455239924236, + 36.48545447871904, + 36.47904404119983, + 36.4770432397075, + 36.51447175611036, + 36.62384920557495, + 36.79730754436259, + 37.02404581423139, + 37.2924451563889, + 37.59153626082176, + 37.911699899550314, + 38.244824131830995, + 38.58418247512089, + 38.92421342052591, + 39.26029414798398, + 39.58854535094426, + 39.90567586900045, + 40.208864120086126, + 40.495669722374565, + 40.76396851669827, + 41.011905200242886, + 41.23785900763694, + 41.440418976906486, + 41.61836622366201, + 41.77066132423665, + 41.896435414247286, + 41.9949839834841, + 42.06576262584847, + 42.10838421161039, + 42.12261710929493 + ], + [ + 65.92892854668014, + 65.93784932720718, + 65.96456311470797, + 66.00892103413636, + 66.07067591256732, + 66.14948373081964, + 66.2449056908559, + 66.35641092929383, + 66.48337990959264, + 66.6251085235073, + 66.78081292594543, + 66.94963511646547, + 67.13064926569523, + 67.32286876661627, + 67.52525396991088, + 67.73672054055218, + 67.95614835080426, + 68.18239080406836, + 68.41428446576889, + 68.65065886275532, + 68.89034630230692, + 69.13219155628478, + 69.37506125549112, + 69.61785284379096, + 69.85950295066917, + 70.0989950540735, + 70.33536632190116, + 70.56771353950616, + 70.79519805129142, + 71.01704966597929, + 71.23256949677904, + 71.44113172873932, + 71.64218432555252, + 71.83524870656073, + 72.01991844140468, + 72.19585702447336, + 72.36279480396004, + 72.52052515088354, + 72.66889996192978, + 72.80782459647358, + 72.93725235275625, + 73.0571785910283, + 73.16763461264115, + 73.26868140370517, + 73.36040335015002, + 73.44290202793876, + 73.5162901679254, + 73.58068588951406, + 73.63620729099014, + 73.68296747726203, + 73.72107009787487, + 73.7506054596388, + 73.77164726914872, + 73.78425005095889, + 73.78844727733, + 73.78379847898651, + 73.7697638917539, + 73.74608362366848, + 73.71234000153794, + 73.66798031900296, + 73.61234774642591, + 73.54471948146923, + 73.46435098052554, + 73.37052489256678, + 73.26260312407261, + 73.14008030195384, + 73.00263677576308, + 72.85018921523555, + 72.68293681784992, + 72.50140114675136, + 72.30645767526043, + 72.0993572242871, + 71.88173564865362, + 71.88173565380022, + 71.67143093852013, + 71.4556639286893, + 71.23659820840177, + 71.01661610464828, + 70.79827657589541, + 70.584263926607, + 70.37732829783205, + 70.18021931005038, + 69.99561465867099, + 69.82604585465441, + 69.67382362744662, + 69.54096572822739, + 69.42912995558146, + 69.33955514958384, + 69.27301265476592, + 69.22977034597288, + 69.20957077038786, + 69.21162432619596, + 69.23461772575627, + 69.27673733372129, + 69.3357063784124, + 69.40883454681001, + 69.49307811350533, + 69.58510852947342, + 69.6813873006411, + 69.77824500103499, + 69.87196236631667, + 69.95885157399432, + 70.03533601102713, + 70.09802703603563, + 70.14379644488776, + 70.16984353318695, + 70.17375581006537, + 70.15356255166913, + 70.1077804900513, + 69.92573777815375, + 69.59661798900964, + 69.27708454002327, + 68.96815250311072, + 68.67076537527709, + 68.38579148001632, + 68.11402142796132, + 67.8561667487131, + 67.61285976894177, + 67.3846547678849, + 67.17203039275684, + 66.97539326616658, + 66.79508266837477, + 66.63137613193264, + 66.48449574743435, + 66.35461494877306, + 66.24186552582857, + 66.14634460269367, + 66.06812132053719, + 66.00724297562911, + 65.96374038410936, + 65.93763227463013, + 65.92892854668014, + 65.94443399428825, + 65.99068480316481, + 66.06688954004245, + 66.1717497470559, + 66.30349000163173, + 66.45989857908953, + 66.63837738627915, + 66.83599957334373, + 67.04957304683833, + 67.27570800602717, + 67.51088660473918, + 67.75153289796823, + 67.9940813553722, + 68.2350423996621, + 68.47106364150551, + 68.69898571852369, + 68.91589188968476, + 69.1191507752134, + 69.30645185595881, + 69.4758335477305, + 69.62570384101204, + 69.75485364283236, + 69.86246307566023, + 69.94810107984424, + 70.0117187342879, + 70.05363675829456, + 70.0745276896367, + 70.07539325364394, + 70.05753744893714, + 70.02253588041934, + 69.97220187184747, + 69.90854989078007, + 69.83375681941148, + 69.75012160668273, + 69.66002384047317, + 69.56588178345703, + 69.47011042167813, + 69.37508007991953, + 69.2830761609867, + 69.19626056527804, + 69.11663534050744, + 69.04600909721634, + 68.98596670199463, + 68.93784272574138, + 68.90269907799654, + 68.88130720024243, + 68.8741351217441, + 68.87667756241667, + 68.88436869355726, + 68.8973992673302, + 68.9160854494457, + 68.94086564494181, + 68.97229521303467, + 69.0110383792746, + 69.05785671707164, + 69.1135937361039, + 69.17915537690298, + 69.25548653188878, + 69.34354404963348, + 69.4442669882808, + 69.5585451297353, + 69.68718692314272, + 69.83088808120631, + 69.9902020045312, + 70.1655130653115, + 70.35701355638376, + 70.56468482192348, + 70.78828274821637, + 71.0273274192836, + 71.28109633695182, + 71.54862015910618, + 71.82867939205134, + 72.1197998135812, + 72.42024346289743, + 72.72799053649351, + 73.04070492343475, + 73.35567126047586, + 73.66968186867598, + 73.97883251352366, + 74.27814543065745, + 74.5608552499219, + 74.81704885989683, + 75.0312787910617, + 75.17988880463572, + 75.23430966914972, + 75.22900277460364, + 75.21316090191763, + 75.18701926662081, + 75.15096585669852, + 75.10553544508151, + 75.05140134508787, + 74.98936504503084, + 74.92034389438231, + 74.84535704763708, + 74.76550990247779, + 74.68197729503034, + 74.59598573593998, + 74.50879498575618, + 74.42167927593896, + 74.33590848220078, + 74.25272954976445, + 74.17334845575753, + 74.09891297315585, + 74.0304964746123, + 73.96908298471162, + 73.9155536574144, + 73.87067482349777, + 73.83508772232679, + 73.80930000466905, + 73.7936790694094, + 73.78844727733 + ], + [ + 65.92892854668014, + 65.93785048996257, + 65.9645654307796, + 66.00892448479016, + 66.07068047005882, + 66.14948935881122, + 66.2449123449558, + 66.35641855770254, + 66.48338845384072, + 66.62511791926556, + 66.78082310388872, + 66.94964600316972, + 67.1306607845482, + 67.3228808387236, + 67.52526651498007, + 67.73673347773949, + 67.95616159951211, + 68.18240428468299, + 68.41429810033095, + 68.65067257555914, + 68.89036002042626, + 69.13220521002529, + 69.37507477877206, + 69.61786617445983, + 69.85951603075459, + 70.09900782998193, + 70.3353787445643, + 70.5677255644849, + 70.79520963884326, + 71.01706078109423, + 71.23258010918973, + 71.44114181290952, + 71.64219386064747, + 71.83525767640197, + 72.01992683441111, + 72.1958648335892, + 72.36280202656978, + 72.52053178871273, + 72.66890602093001, + 72.80783008668897, + 72.93725728816794, + 73.05718298937195, + 73.16763849519106, + 73.2686847950166, + 73.36040627774777, + 73.44290452193536, + 73.51629226054649, + 73.58068761449772, + 73.63620868281807, + 73.68296857016944, + 73.72107092458567, + 73.75060604979741, + 73.77164764749197, + 73.7842502354062, + 73.78844727733002, + 73.80783339484296, + 73.86560981811442, + 73.96064012063121, + 74.09106103670473, + 74.25432716901055, + 74.44727076556848, + 74.66617399719021, + 74.90685077138937, + 75.16473496365252, + 75.4349720754353, + 75.71251178217814, + 75.99219964838213, + 76.26886746545915, + 76.537423136268, + 76.79294254017206, + 77.03076682375536, + 77.2466081713937, + 77.43666421294577, + 77.43684819865415, + 77.58782940813083, + 77.71164674397346, + 77.80685124480327, + 77.87259605160764, + 77.90860942585091, + 77.91512410610234, + 77.89277436953724, + 77.84247944421767, + 77.76533282086449, + 77.6625120973466, + 77.53521629124684, + 77.38463037213113, + 77.21191204114145, + 77.0181938524804, + 76.80459395431004, + 76.57223006881824, + 76.32223303704924, + 76.0557578294456, + 75.77399114245227, + 75.47815551916085, + 75.16951039800097, + 74.84935069512852, + 74.5190035530295, + 74.17982381520069, + 73.83318867002386, + 73.48049178258937, + 73.12313712231908, + 72.76253260680627, + 72.40008362110987, + 72.0371864354197, + 71.67522152899983, + 71.31554683027228, + 70.95949089734094, + 70.60834608593602, + 70.26336177877558, + 70.03545101660973, + 69.93616834338593, + 69.81009811663874, + 69.65798602247548, + 69.48115597230748, + 69.28149751556951, + 69.06144220801508, + 68.8239287754068, + 68.57235706322982, + 68.3105309601168, + 68.04259073005488, + 67.77293548610733, + 67.50613688092824, + 67.24684546516241, + 66.99969155566629, + 66.76918283695078, + 66.55960126214005, + 66.37490209240373, + 66.21861808530095, + 66.09377188604596, + 66.00279957238186, + 65.9474880451394, + 65.92892854668014, + 65.94443441536416, + 65.99068585372434, + 66.06689163189773, + 66.17175348554164, + 66.30349617108901, + 66.45990812407172, + 66.63839138893503, + 66.83601922751619, + 67.04959962948102, + 67.2757428465846, + 67.51093105315744, + 67.75158829200386, + 67.9941489878488, + 68.23512348628941, + 68.4711592898294, + 68.69909689852163, + 68.91601940646237, + 69.11929524420107, + 69.30661368095114, + 69.47601290206238, + 69.62590065212112, + 69.75506758041999, + 69.86269354363094, + 69.9483472121752, + 70.01197939495405, + 70.05391054534782, + 70.07481294350892, + 70.075688069709, + 70.05783969432659, + 70.02284321503635, + 69.97251177346497, + 69.90885968403941, + 69.83406370845938, + 69.75042271109663, + 69.6603162340319, + 69.566162535216, + 69.47037663871329, + 69.3753289510124, + 69.28330500044366, + 69.19646685601276, + 69.11681677547324, + 69.0461636182591, + 68.9860925352114, + 68.93793841247619, + 68.90276350068535, + 68.88133960243107, + 68.87413512174413, + 68.89867661428899, + 68.9719310430907, + 69.0927985772831, + 69.25947930685122, + 69.46952098502312, + 69.71988204056944, + 70.00700663436481, + 70.32690824494605, + 70.67525829243276, + 71.0474765570169, + 71.43882053016735, + 71.84447127448472, + 72.25961380278223, + 72.67951038291886, + 73.09956551693752, + 73.51538163042163, + 73.92280474910588, + 74.31795964920248, + 74.69727416635438, + 75.05749256567283, + 75.39567815758924, + 75.70920576120866, + 75.99574527291321, + 76.25323863961448, + 76.4798741478369, + 76.67406431074076, + 76.83443687037428, + 76.95985239743209, + 77.04946613726652, + 77.10285533699009, + 77.12023638394872, + 77.10280279238046, + 77.05323922439818, + 76.97653746278776, + 76.88138717311078, + 76.78250694299777, + 76.70319446261493, + 76.67188296717853, + 76.65868380751354, + 76.61949140580184, + 76.55548128924447, + 76.4684904460383, + 76.3608648749211, + 76.23529455991151, + 76.09466148430869, + 75.94191565559098, + 75.77998358537174, + 75.61170641872411, + 75.43980146787922, + 75.2668403067211, + 75.09523752449702, + 74.92724571269842, + 74.7649536915966, + 74.61028613185962, + 74.46500354739264, + 74.33070217180362, + 74.20881355244735, + 74.10060386928393, + 74.00717306395971, + 73.9294538862304, + 73.86821095656786, + 73.82403992265752, + 73.79736676387589, + 73.78844727733002 + ], + [ + 65.92892854668017, + 65.98854260284081, + 66.16648842966387, + 66.46010538919558, + 66.8650517173226, + 67.37543675500544, + 67.98399349191993, + 68.68228067399788, + 69.46090289512966, + 70.30973738554016, + 71.21815742680852, + 72.17524417405828, + 73.16998082994057, + 74.19142530265549, + 75.22885946842301, + 76.27191480688029, + 77.31067542416469, + 78.33576032475104, + 79.33838728414854, + 80.31042087788377, + 81.24440721194897, + 82.13359774570566, + 82.97196435892693, + 83.75420753590481, + 84.47575925398226, + 85.13278189285154, + 85.7221642367367, + 86.24151542959983, + 86.68915756438363, + 87.064117438324, + 87.36611788259528, + 87.59556896946687, + 87.75355930591884, + 87.84184753015607, + 87.8628540259676, + 87.81965274679231, + 87.715962881691, + 87.55613988163388, + 87.34516507663561, + 87.08863273111251, + 86.79273288683032, + 86.4642277176072, + 86.11041837202448, + 85.73909844591573, + 85.35848939339735, + 84.97715251709751, + 84.60387193371011, + 84.24750344600564, + 83.9167859826239, + 83.62011556577579, + 83.36528678676501, + 83.15921321085766, + 83.00764505141727, + 82.91490824640037, + 82.8836917951984, + 82.88174369007452, + 82.87593393334922, + 82.86636693469012, + 82.85321916147397, + 82.83674282997524, + 82.8172710826594, + 82.79522461300097, + 82.77111960866739, + 82.74557671415154, + 82.71933042527952, + 82.69323787037024, + 82.66828525399414, + 82.64558931023782, + 82.62638998235087, + 82.61202943781127, + 82.60391196250232, + 82.60344014491386, + 82.61192615829155, + 82.61176080024191, + 82.62866669811235, + 82.65496331630953, + 82.69100659406831, + 82.7368056800541, + 82.79201500844364, + 82.8559627375591, + 82.92770592528703, + 83.00609581401528, + 83.08983590159866, + 83.17752049917725, + 83.26764916419627, + 83.35861943934619, + 83.4487047811012, + 83.53602611011164, + 83.61852476489874, + 83.69394278700109, + 83.7598142500378, + 83.81346930334453, + 83.85205099231595, + 83.8725438098638, + 83.87181228423891, + 83.84664762581164, + 83.79382043497338, + 83.71013761923257, + 83.5925019017413, + 83.43797256803484, + 83.24382635358387, + 83.00761759825276, + 82.72723697295302, + 82.40096821473634, + 82.02754239023916, + 81.60618924728423, + 81.13668521493472, + 80.6193975776082, + 80.05532428254588, + 79.44612874486576, + 78.79416889309577, + 78.10251955326038, + 77.37498710527709, + 76.61611516800573, + 75.8311798889602, + 75.0261732468528, + 74.20777264174521, + 73.38329497801072, + 72.56063347635128, + 71.7481756254125, + 70.9547010461052, + 70.18925863378581, + 69.46102319372586, + 68.77913289935864, + 68.15251025172338, + 67.58967072967083, + 67.09852487321014, + 66.68618097278947, + 66.35875665285305, + 66.12120824389949, + 65.97718677039671, + 65.92892854668017, + 65.97458315494558, + 66.11086007312292, + 66.33571921047503, + 66.64582795426813, + 67.03665831920932, + 67.50261508302343, + 68.03718799745289, + 68.63312039812836, + 69.28258642353117, + 69.9773695209691, + 70.70903583577962, + 71.46909728819391, + 72.24916047763439, + 73.04105887431467, + 73.83696695502746, + 74.62949594571, + 75.41177161689808, + 76.17749513891779, + 76.92098836213856, + 77.637225076382, + 78.32184985966887, + 78.97118608586868, + 79.58223455505265, + 80.15266406497753, + 80.68079507638035, + 81.16557745212423, + 81.60656307947096, + 82.00387402110765, + 82.35816668700394, + 82.67059237759042, + 82.94275442096662, + 83.1766620155908, + 83.3746807995737, + 83.53948010487562, + 83.67397682835265, + 83.78127587269724, + 83.86460719081252, + 83.92725961797039, + 83.97251190419873, + 84.0035616640346, + 84.0234533297508, + 84.03500660031135, + 84.04074727863504, + 84.0428427277764, + 84.04304438922968, + 84.04263983497678, + 84.0424166281769, + 84.04495501005806, + 84.0524603919815, + 84.0646052148617, + 84.08084940239989, + 84.10044941094415, + 84.12247136400912, + 84.14580859031861, + 84.16920379963592, + 84.19127596357953, + 84.21055174198636, + 84.22550104188822, + 84.23457605183683, + 84.23625289216749, + 84.22907488686324, + 84.21169640916919, + 84.18292628360115, + 84.1417698332473, + 84.08746882545184, + 84.01953876441497, + 83.9378031694399, + 83.84242461289355, + 83.7339323039057, + 83.61324579816588, + 83.48169386771443, + 83.34102653687866, + 83.1934166721668, + 83.04144534590915, + 82.88806288739849, + 82.73651616825529, + 82.5902341524674, + 82.45267039088768, + 82.32711406987819, + 82.21649776040834, + 82.12324222415579, + 82.0491763601674, + 81.99554915145524, + 81.96311784219884, + 81.95226877195564, + 81.95828763129262, + 81.97604645672777, + 82.00468999642007, + 82.04290942203883, + 82.08908643567601, + 82.1414468226307, + 82.19819804057963, + 82.25763613067964, + 82.31821781148064, + 82.37860090810742, + 82.43765974271047, + 82.49448273621086, + 82.54835854493669, + 82.59875558517224, + 82.64529836022243, + 82.687742839223, + 82.72595229019312, + 82.75987439945959, + 82.78952014789472, + 82.8149446972858, + 82.83623041699333, + 82.85347211560784, + 82.86676451025167, + 82.87619195198292, + 82.88182042005239, + 82.8836917951984 + ] + ], + "y_data_unit": "millielectron_volt" +} diff --git a/tests_and_analysis/test/data/spectrum1dcollection/methane_pdos_from_text_file_fmt.json b/tests_and_analysis/test/data/spectrum1dcollection/methane_pdos_from_text_file_fmt.json new file mode 100644 index 000000000..bdae6a016 --- /dev/null +++ b/tests_and_analysis/test/data/spectrum1dcollection/methane_pdos_from_text_file_fmt.json @@ -0,0 +1,1240 @@ +{ + "__euphonic_class__": "Spectrum1DCollection", + "__euphonic_version__": "0.6.2+3.g379357f.dirty", + "metadata": { + "desc": "Methane PDOS", + "line_data": [ + { + "label": "C1" + }, + { + "label": "H2" + }, + { + "label": "H3" + }, + { + "label": "H4" + }, + { + "label": "H5" + } + ] + }, + "x_data": [ + -0.03, + -0.0279, + -0.0257, + -0.0236, + -0.0215, + -0.0193, + -0.0172, + -0.0151, + -0.013, + -0.0108, + -0.0087, + -0.0066, + -0.0044, + -0.0023, + -0.0002, + 0.002, + 0.0041, + 0.0062, + 0.0084, + 0.0105, + 0.0126, + 0.0148, + 0.0169, + 0.019, + 0.0211, + 0.0233, + 0.0254, + 0.0275, + 0.0297, + 0.0318, + 0.0339, + 0.0361, + 0.0382, + 0.0403, + 0.0425, + 0.0446, + 0.0467, + 0.0488, + 0.051, + 0.0531, + 0.0552, + 0.0574, + 0.0595, + 0.0616, + 0.0638, + 0.0659, + 0.068, + 0.0702, + 0.0723, + 0.0744, + 0.0766, + 0.0787, + 0.0808, + 0.0829, + 0.0851, + 0.0872, + 0.0893, + 0.0915, + 0.0936, + 0.0957, + 0.0979, + 0.1, + 0.1021, + 0.1043, + 0.1064, + 0.1085, + 0.1106, + 0.1128, + 0.1149, + 0.117, + 0.1192, + 0.1213, + 0.1234, + 0.1256, + 0.1277, + 0.1298, + 0.132, + 0.1341, + 0.1362, + 0.1383, + 0.1405, + 0.1426, + 0.1447, + 0.1469, + 0.149, + 0.1511, + 0.1533, + 0.1554, + 0.1575, + 0.1597, + 0.1618, + 0.1639, + 0.1661, + 0.1682, + 0.1703, + 0.1724, + 0.1746, + 0.1767, + 0.1788, + 0.181, + 0.1831, + 0.1852, + 0.1874, + 0.1895, + 0.1916, + 0.1938, + 0.1959, + 0.198, + 0.2001, + 0.2023, + 0.2044, + 0.2065, + 0.2087, + 0.2108, + 0.2129, + 0.2151, + 0.2172, + 0.2193, + 0.2215, + 0.2236, + 0.2257, + 0.2279, + 0.23, + 0.2321, + 0.2342, + 0.2364, + 0.2385, + 0.2406, + 0.2428, + 0.2449, + 0.247, + 0.2492, + 0.2513, + 0.2534, + 0.2556, + 0.2577, + 0.2598, + 0.2619, + 0.2641, + 0.2662, + 0.2683, + 0.2705, + 0.2726, + 0.2747, + 0.2769, + 0.279, + 0.2811, + 0.2833, + 0.2854, + 0.2875, + 0.2897, + 0.2918, + 0.2939, + 0.296, + 0.2982, + 0.3003, + 0.3024, + 0.3046, + 0.3067, + 0.3088, + 0.311, + 0.3131, + 0.3152, + 0.3174, + 0.3195, + 0.3216, + 0.3237, + 0.3259, + 0.328, + 0.3301, + 0.3323, + 0.3344, + 0.3365, + 0.3387, + 0.3408, + 0.3429, + 0.3451, + 0.3472, + 0.3493, + 0.3514, + 0.3536, + 0.3557, + 0.3578, + 0.36, + 0.3621, + 0.3642, + 0.3664, + 0.3685, + 0.3706, + 0.3728, + 0.3749, + 0.377, + 0.3792, + 0.3813, + 0.3834, + 0.3855, + 0.3877, + 0.3898, + 0.3919, + 0.3941 + ], + "x_data_unit": "electron_volt", + "y_data": [ + [ + 0.06, + 0.11, + 0.19, + 0.32, + 0.51, + 0.79, + 1.17, + 1.66, + 2.26, + 2.94, + 3.7, + 4.52, + 5.38, + 6.35, + 7.52, + 9.07, + 11.25, + 14.33, + 18.6, + 24.24, + 31.27, + 39.49, + 48.42, + 57.37, + 65.47, + 71.81, + 75.65, + 76.49, + 74.2, + 69.06, + 61.67, + 52.84, + 43.5, + 34.45, + 26.35, + 19.62, + 14.44, + 10.81, + 8.55, + 7.43, + 7.15, + 7.43, + 8.02, + 8.66, + 9.2, + 9.5, + 9.48, + 9.12, + 8.46, + 7.56, + 6.5, + 5.38, + 4.28, + 3.28, + 2.41, + 1.71, + 1.16, + 0.76, + 0.47, + 0.29, + 0.17, + 0.11, + 0.08, + 0.09, + 0.14, + 0.24, + 0.4, + 0.67, + 1.07, + 1.63, + 2.39, + 3.35, + 4.52, + 5.86, + 7.28, + 8.71, + 10.01, + 11.07, + 11.79, + 12.1, + 11.96, + 11.41, + 10.49, + 9.31, + 7.98, + 6.6, + 5.27, + 4.07, + 3.04, + 2.21, + 1.59, + 1.15, + 0.86, + 0.7, + 0.62, + 0.6, + 0.61, + 0.63, + 0.64, + 0.63, + 0.59, + 0.54, + 0.47, + 0.39, + 0.31, + 0.23, + 0.17, + 0.12, + 0.08, + 0.05, + 0.03, + 0.02, + 0.01, + 0.01, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.01, + 0.02, + 0.03, + 0.04, + 0.06, + 0.08, + 0.1, + 0.13, + 0.18, + 0.23, + 0.32, + 0.45, + 0.65, + 0.95, + 1.38, + 1.96, + 2.72, + 3.64, + 4.69, + 5.82, + 6.95, + 7.97, + 8.8, + 9.36, + 9.59, + 9.47, + 9.04, + 8.34, + 7.44, + 6.42, + 5.36, + 4.33, + 3.39, + 2.56, + 1.87, + 1.32, + 0.89, + 0.58, + 0.37, + 0.22, + 0.13, + 0.07, + 0.04 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.01, + 0.01, + 0.02, + 0.02, + 0.03, + 0.03, + 0.04, + 0.05, + 0.07, + 0.09, + 0.13, + 0.18, + 0.27, + 0.39, + 0.54, + 0.75, + 0.99, + 1.25, + 1.53, + 1.78, + 2.0, + 2.15, + 2.21, + 2.2, + 2.11, + 1.99, + 1.86, + 1.8, + 1.85, + 2.09, + 2.55, + 3.28, + 4.29, + 5.55, + 7.02, + 8.6, + 10.17, + 11.59, + 12.73, + 13.45, + 13.68, + 13.4, + 12.64, + 11.47, + 10.01, + 8.4, + 6.78, + 5.25, + 3.91, + 2.8, + 1.92, + 1.26, + 0.79, + 0.48, + 0.28, + 0.16, + 0.09, + 0.05, + 0.04, + 0.05, + 0.08, + 0.15, + 0.26, + 0.43, + 0.7, + 1.1, + 1.64, + 2.37, + 3.28, + 4.36, + 5.57, + 6.83, + 8.05, + 9.11, + 9.91, + 10.36, + 10.43, + 10.14, + 9.59, + 8.94, + 8.42, + 8.3, + 8.85, + 10.35, + 13.01, + 16.94, + 22.1, + 28.24, + 34.94, + 41.57, + 47.4, + 51.72, + 53.98, + 53.85, + 51.35, + 46.8, + 40.76, + 33.93, + 26.99, + 20.51, + 14.9, + 10.35, + 6.86, + 4.35, + 2.64, + 1.53, + 0.85, + 0.45, + 0.23, + 0.11, + 0.05, + 0.02, + 0.01, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.02, + 0.04, + 0.07, + 0.13, + 0.23, + 0.38, + 0.6, + 0.92, + 1.33, + 1.84, + 2.44, + 3.08, + 3.73, + 4.31, + 4.77, + 5.04, + 5.11, + 4.98, + 4.7, + 4.36, + 4.07, + 3.98, + 4.24, + 5.01, + 6.42, + 8.56, + 11.43, + 14.95, + 18.91, + 22.98, + 26.77, + 29.83, + 31.79, + 32.38, + 31.53, + 29.34, + 26.09, + 22.17, + 18.01, + 13.98, + 10.37, + 7.35, + 4.98, + 3.22, + 1.99, + 1.18, + 0.67, + 0.36 + ], + [ + 0.08, + 0.14, + 0.26, + 0.43, + 0.7, + 1.08, + 1.6, + 2.26, + 3.05, + 3.94, + 4.87, + 5.78, + 6.57, + 7.21, + 7.65, + 7.93, + 8.09, + 8.26, + 8.53, + 9.0, + 9.74, + 10.71, + 11.83, + 12.96, + 13.93, + 14.55, + 14.7, + 14.32, + 13.41, + 12.08, + 10.47, + 8.74, + 7.08, + 5.64, + 4.52, + 3.81, + 3.56, + 3.8, + 4.5, + 5.66, + 7.22, + 9.08, + 11.11, + 13.15, + 15.01, + 16.49, + 17.43, + 17.71, + 17.28, + 16.19, + 14.55, + 12.55, + 10.38, + 8.22, + 6.24, + 4.54, + 3.16, + 2.11, + 1.34, + 0.82, + 0.49, + 0.29, + 0.2, + 0.19, + 0.25, + 0.41, + 0.7, + 1.17, + 1.88, + 2.91, + 4.32, + 6.16, + 8.47, + 11.2, + 14.28, + 17.55, + 20.83, + 23.87, + 26.42, + 28.26, + 29.2, + 29.16, + 28.12, + 26.19, + 23.55, + 20.45, + 17.17, + 14.01, + 11.19, + 8.91, + 7.26, + 6.27, + 5.9, + 6.05, + 6.57, + 7.28, + 8.0, + 8.57, + 8.86, + 8.79, + 8.35, + 7.6, + 6.61, + 5.49, + 4.36, + 3.31, + 2.4, + 1.67, + 1.11, + 0.7, + 0.42, + 0.25, + 0.14, + 0.07, + 0.04, + 0.02, + 0.01, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.02, + 0.05, + 0.09, + 0.17, + 0.32, + 0.55, + 0.91, + 1.45, + 2.2, + 3.19, + 4.42, + 5.86, + 7.44, + 9.03, + 10.5, + 11.72, + 12.61, + 13.14, + 13.38, + 13.45, + 13.57, + 13.93, + 14.72, + 16.0, + 17.74, + 19.75, + 21.76, + 23.44, + 24.5, + 24.71, + 23.96, + 22.32, + 19.94, + 17.1, + 14.06, + 11.11, + 8.43, + 6.15, + 4.32, + 2.92, + 1.91, + 1.2, + 0.73, + 0.43, + 0.25, + 0.14, + 0.07, + 0.04, + 0.02 + ], + [ + 0.23, + 0.43, + 0.75, + 1.27, + 2.06, + 3.18, + 4.7, + 6.63, + 8.94, + 11.52, + 14.18, + 16.7, + 18.8, + 20.25, + 20.88, + 20.64, + 19.61, + 17.99, + 16.03, + 14.02, + 12.22, + 10.79, + 9.81, + 9.25, + 8.99, + 8.89, + 8.8, + 8.58, + 8.16, + 7.54, + 6.77, + 5.94, + 5.18, + 4.63, + 4.39, + 4.58, + 5.25, + 6.41, + 8.01, + 9.92, + 11.97, + 13.93, + 15.56, + 16.65, + 17.05, + 16.69, + 15.62, + 13.98, + 11.96, + 9.79, + 7.66, + 5.73, + 4.1, + 2.81, + 1.84, + 1.15, + 0.69, + 0.4, + 0.22, + 0.12, + 0.07, + 0.06, + 0.08, + 0.14, + 0.26, + 0.47, + 0.82, + 1.39, + 2.25, + 3.48, + 5.18, + 7.38, + 10.09, + 13.22, + 16.62, + 20.05, + 23.21, + 25.77, + 27.45, + 28.05, + 27.49, + 25.85, + 23.32, + 20.19, + 16.77, + 13.4, + 10.33, + 7.75, + 5.76, + 4.39, + 3.62, + 3.37, + 3.56, + 4.08, + 4.8, + 5.6, + 6.35, + 6.93, + 7.25, + 7.26, + 6.96, + 6.37, + 5.57, + 4.66, + 3.72, + 2.84, + 2.07, + 1.45, + 0.96, + 0.61, + 0.37, + 0.22, + 0.12, + 0.06, + 0.03, + 0.02, + 0.01, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.02, + 0.04, + 0.08, + 0.15, + 0.27, + 0.47, + 0.78, + 1.23, + 1.87, + 2.71, + 3.76, + 4.98, + 6.32, + 7.67, + 8.91, + 9.95, + 10.7, + 11.15, + 11.36, + 11.47, + 11.66, + 12.14, + 13.09, + 14.59, + 16.61, + 19.0, + 21.49, + 23.75, + 25.43, + 26.25, + 26.05, + 24.83, + 22.7, + 19.91, + 16.77, + 13.56, + 10.53, + 7.87, + 5.66, + 3.92, + 2.62, + 1.69, + 1.05, + 0.63, + 0.37, + 0.21, + 0.11, + 0.06, + 0.03 + ], + [ + 0.08, + 0.14, + 0.26, + 0.43, + 0.7, + 1.08, + 1.6, + 2.26, + 3.05, + 3.95, + 4.88, + 5.78, + 6.58, + 7.22, + 7.66, + 7.93, + 8.1, + 8.26, + 8.53, + 9.01, + 9.74, + 10.71, + 11.83, + 12.96, + 13.92, + 14.55, + 14.7, + 14.31, + 13.41, + 12.08, + 10.47, + 8.74, + 7.08, + 5.64, + 4.52, + 3.81, + 3.57, + 3.8, + 4.51, + 5.66, + 7.22, + 9.08, + 11.11, + 13.15, + 15.01, + 16.49, + 17.43, + 17.7, + 17.27, + 16.18, + 14.55, + 12.54, + 10.37, + 8.22, + 6.24, + 4.54, + 3.16, + 2.1, + 1.34, + 0.82, + 0.49, + 0.29, + 0.2, + 0.19, + 0.25, + 0.41, + 0.7, + 1.17, + 1.88, + 2.91, + 4.31, + 6.16, + 8.46, + 11.2, + 14.27, + 17.55, + 20.83, + 23.87, + 26.42, + 28.26, + 29.2, + 29.16, + 28.12, + 26.19, + 23.55, + 20.45, + 17.17, + 14.01, + 11.19, + 8.91, + 7.26, + 6.27, + 5.91, + 6.06, + 6.57, + 7.28, + 8.0, + 8.57, + 8.86, + 8.79, + 8.36, + 7.6, + 6.61, + 5.49, + 4.36, + 3.31, + 2.41, + 1.67, + 1.11, + 0.7, + 0.42, + 0.25, + 0.14, + 0.07, + 0.04, + 0.02, + 0.01, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.01, + 0.02, + 0.05, + 0.09, + 0.17, + 0.32, + 0.55, + 0.91, + 1.45, + 2.2, + 3.19, + 4.42, + 5.86, + 7.44, + 9.02, + 10.5, + 11.72, + 12.61, + 13.14, + 13.37, + 13.45, + 13.56, + 13.93, + 14.72, + 16.0, + 17.74, + 19.75, + 21.76, + 23.44, + 24.5, + 24.71, + 23.97, + 22.32, + 19.95, + 17.1, + 14.07, + 11.11, + 8.43, + 6.15, + 4.32, + 2.93, + 1.91, + 1.21, + 0.74, + 0.43, + 0.25, + 0.14, + 0.07, + 0.04, + 0.02 + ] + ], + "y_data_unit": "dimensionless" +} \ No newline at end of file diff --git a/tests_and_analysis/test/data/spectrum1dcollection/quartz_666_coh_pdos_from_text_file_fmt.json b/tests_and_analysis/test/data/spectrum1dcollection/quartz_666_coh_pdos_from_text_file_fmt.json new file mode 100644 index 000000000..4441b7405 --- /dev/null +++ b/tests_and_analysis/test/data/spectrum1dcollection/quartz_666_coh_pdos_from_text_file_fmt.json @@ -0,0 +1,3159 @@ +{ + "__euphonic_class__": "Spectrum1DCollection", + "__euphonic_version__": "0.6.2+3.g379357f.dirty", + "metadata": { + "line_data": [ + { + "index": 0, + "species": "O" + }, + { + "index": 1, + "species": "O" + }, + { + "index": 2, + "species": "O" + }, + { + "index": 3, + "species": "O" + }, + { + "index": 4, + "species": "O" + }, + { + "index": 5, + "species": "O" + }, + { + "index": 6, + "species": "Si" + }, + { + "index": 7, + "species": "Si" + }, + { + "index": 8, + "species": "Si" + } + ], + "weighting": "coherent" + }, + "x_data": [ + 0.25, + 0.75, + 1.25, + 1.75, + 2.25, + 2.75, + 3.25, + 3.75, + 4.25, + 4.75, + 5.25, + 5.75, + 6.25, + 6.75, + 7.25, + 7.75, + 8.25, + 8.75, + 9.25, + 9.75, + 10.25, + 10.75, + 11.25, + 11.75, + 12.25, + 12.75, + 13.25, + 13.75, + 14.25, + 14.75, + 15.25, + 15.75, + 16.25, + 16.75, + 17.25, + 17.75, + 18.25, + 18.75, + 19.25, + 19.75, + 20.25, + 20.75, + 21.25, + 21.75, + 22.25, + 22.75, + 23.25, + 23.75, + 24.25, + 24.75, + 25.25, + 25.75, + 26.25, + 26.75, + 27.25, + 27.75, + 28.25, + 28.75, + 29.25, + 29.75, + 30.25, + 30.75, + 31.25, + 31.75, + 32.25, + 32.75, + 33.25, + 33.75, + 34.25, + 34.75, + 35.25, + 35.75, + 36.25, + 36.75, + 37.25, + 37.75, + 38.25, + 38.75, + 39.25, + 39.75, + 40.25, + 40.75, + 41.25, + 41.75, + 42.25, + 42.75, + 43.25, + 43.75, + 44.25, + 44.75, + 45.25, + 45.75, + 46.25, + 46.75, + 47.25, + 47.75, + 48.25, + 48.75, + 49.25, + 49.75, + 50.25, + 50.75, + 51.25, + 51.75, + 52.25, + 52.75, + 53.25, + 53.75, + 54.25, + 54.75, + 55.25, + 55.75, + 56.25, + 56.75, + 57.25, + 57.75, + 58.25, + 58.75, + 59.25, + 59.75, + 60.25, + 60.75, + 61.25, + 61.75, + 62.25, + 62.75, + 63.25, + 63.75, + 64.25, + 64.75, + 65.25, + 65.75, + 66.25, + 66.75, + 67.25, + 67.75, + 68.25, + 68.75, + 69.25, + 69.75, + 70.25, + 70.75, + 71.25, + 71.75, + 72.25, + 72.75, + 73.25, + 73.75, + 74.25, + 74.75, + 75.25, + 75.75, + 76.25, + 76.75, + 77.25, + 77.75, + 78.25, + 78.75, + 79.25, + 79.75, + 80.25, + 80.75, + 81.25, + 81.75, + 82.25, + 82.75, + 83.25, + 83.75, + 84.25, + 84.75, + 85.25, + 85.75, + 86.25, + 86.75, + 87.25, + 87.75, + 88.25, + 88.75, + 89.25, + 89.75, + 90.25, + 90.75, + 91.25, + 91.75, + 92.25, + 92.75, + 93.25, + 93.75, + 94.25, + 94.75, + 95.25, + 95.75, + 96.25, + 96.75, + 97.25, + 97.75, + 98.25, + 98.75, + 99.25, + 99.75, + 100.25, + 100.75, + 101.25, + 101.75, + 102.25, + 102.75, + 103.25, + 103.75, + 104.25, + 104.75, + 105.25, + 105.75, + 106.25, + 106.75, + 107.25, + 107.75, + 108.25, + 108.75, + 109.25, + 109.75, + 110.25, + 110.75, + 111.25, + 111.75, + 112.25, + 112.75, + 113.25, + 113.75, + 114.25, + 114.75, + 115.25, + 115.75, + 116.25, + 116.75, + 117.25, + 117.75, + 118.25, + 118.75, + 119.25, + 119.75, + 120.25, + 120.75, + 121.25, + 121.75, + 122.25, + 122.75, + 123.25, + 123.75, + 124.25, + 124.75, + 125.25, + 125.75, + 126.25, + 126.75, + 127.25, + 127.75, + 128.25, + 128.75, + 129.25, + 129.75, + 130.25, + 130.75, + 131.25, + 131.75, + 132.25, + 132.75, + 133.25, + 133.75, + 134.25, + 134.75, + 135.25, + 135.75, + 136.25, + 136.75, + 137.25, + 137.75, + 138.25, + 138.75, + 139.25, + 139.75, + 140.25, + 140.75, + 141.25, + 141.75, + 142.25, + 142.75, + 143.25, + 143.75, + 144.25, + 144.75, + 145.25, + 145.75, + 146.25, + 146.75, + 147.25, + 147.75, + 148.25, + 148.75, + 149.25, + 149.75, + 150.25, + 150.75, + 151.25, + 151.75, + 152.25, + 152.75, + 153.25, + 153.75, + 154.25 + ], + "x_data_unit": "millielectron_volt", + "y_data": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 6.51, + 0.0, + 9.53, + 10.67, + 28.31, + 0.0, + 27.61, + 4.36, + 87.47, + 48.72, + 140.98, + 115.96, + 506.62, + 298.1, + 248.16, + 68.4, + 78.31, + 144.81, + 115.68, + 133.46, + 177.73, + 223.27, + 205.98, + 298.44, + 241.36, + 98.12, + 82.34, + 228.13, + 336.62, + 226.82, + 215.66, + 101.74, + 153.17, + 134.3, + 45.67, + 332.86, + 52.08, + 227.3, + 62.27, + 91.48, + 67.16, + 78.23, + 238.16, + 234.65, + 85.42, + 187.67, + 124.08, + 97.0, + 132.94, + 276.24, + 117.62, + 206.56, + 71.74, + 234.52, + 252.29, + 111.9, + 136.64, + 185.84, + 194.8, + 158.97, + 197.81, + 205.05, + 243.14, + 64.22, + 188.33, + 220.69, + 174.64, + 292.01, + 366.41, + 130.4, + 84.38, + 289.12, + 247.45, + 99.51, + 64.31, + 82.46, + 67.22, + 133.49, + 168.87, + 141.48, + 105.53, + 73.25, + 81.72, + 234.51, + 122.34, + 97.98, + 157.47, + 131.15, + 145.93, + 158.35, + 361.97, + 284.46, + 324.87, + 358.77, + 319.86, + 441.72, + 253.34, + 498.68, + 372.5, + 141.1, + 330.87, + 178.35, + 304.8, + 314.98, + 213.76, + 253.92, + 384.3, + 422.78, + 224.29, + 67.2, + 160.48, + 104.59, + 71.88, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 30.7, + 237.09, + 27.98, + 63.68, + 120.97, + 122.26, + 136.83, + 93.35, + 189.7, + 98.24, + 22.26, + 7.01, + 22.7, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 41.86, + 9.01, + 23.38, + 27.73, + 71.66, + 44.2, + 39.24, + 78.23, + 117.55, + 113.39, + 33.71, + 55.86, + 0.0, + 30.1, + 5.29, + 41.81, + 13.77, + 5.77, + 15.59, + 9.43, + 10.5, + 4.42, + 6.54, + 26.46, + 0.0, + 0.0, + 0.0, + 3.47, + 13.16, + 0.0, + 0.0, + 19.89, + 47.33, + 99.62, + 82.71, + 43.89, + 59.74, + 23.92, + 31.96, + 41.3, + 29.48, + 18.41, + 15.83, + 15.74, + 3.43, + 0.0, + 0.0, + 3.23, + 23.27, + 12.69, + 70.41, + 42.12, + 38.67, + 75.05, + 109.03, + 33.78, + 132.54, + 64.45, + 111.01, + 89.83, + 42.87, + 30.47, + 86.64, + 37.49, + 9.41, + 35.02, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 454.41, + 788.21, + 683.77, + 867.52, + 1131.55, + 222.66, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 17.11, + 15.5, + 29.99, + 31.32, + 93.15, + 18.16, + 86.05, + 74.85, + 68.74, + 256.99, + 361.66, + 316.88, + 171.59, + 233.29, + 444.23, + 232.68, + 209.42, + 185.76, + 154.02, + 155.22, + 100.73, + 155.8, + 84.94, + 105.72, + 182.18, + 78.86, + 102.13, + 62.47, + 3.74, + 4.35, + 43.85, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 11.5, + 0.0, + 9.69, + 6.71, + 22.56, + 0.0, + 24.59, + 16.12, + 111.91, + 41.71, + 124.15, + 106.64, + 412.42, + 356.63, + 203.62, + 68.58, + 51.83, + 133.54, + 111.1, + 94.8, + 162.36, + 215.92, + 288.88, + 257.18, + 280.34, + 139.58, + 70.12, + 211.9, + 300.95, + 230.35, + 208.66, + 108.56, + 139.41, + 139.9, + 16.23, + 352.85, + 115.05, + 216.17, + 43.71, + 86.53, + 114.32, + 79.4, + 280.88, + 246.27, + 99.46, + 167.27, + 123.95, + 86.97, + 119.86, + 391.67, + 70.08, + 170.69, + 70.04, + 236.19, + 259.5, + 118.38, + 112.47, + 104.8, + 248.87, + 181.38, + 139.61, + 197.71, + 294.92, + 44.62, + 156.68, + 230.26, + 266.4, + 302.35, + 286.55, + 168.57, + 99.13, + 222.3, + 222.34, + 69.93, + 77.08, + 85.79, + 77.17, + 80.08, + 245.51, + 233.57, + 90.73, + 102.2, + 39.63, + 150.04, + 117.79, + 113.61, + 291.88, + 157.96, + 100.29, + 183.28, + 413.35, + 302.88, + 223.52, + 368.72, + 342.87, + 422.06, + 307.85, + 594.23, + 344.33, + 108.6, + 327.98, + 161.18, + 341.52, + 351.81, + 184.77, + 218.17, + 372.1, + 346.94, + 178.19, + 140.09, + 101.38, + 155.89, + 63.18, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 61.71, + 143.99, + 28.77, + 51.69, + 136.28, + 105.04, + 173.6, + 109.03, + 153.12, + 60.92, + 37.17, + 29.16, + 17.27, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 28.77, + 20.12, + 35.4, + 29.82, + 53.96, + 14.51, + 99.57, + 95.57, + 30.49, + 173.95, + 51.79, + 16.12, + 0.0, + 62.89, + 16.19, + 20.89, + 21.39, + 4.15, + 30.2, + 4.4, + 16.7, + 5.38, + 6.28, + 31.63, + 0.0, + 0.0, + 0.0, + 13.07, + 9.42, + 0.0, + 0.0, + 29.23, + 44.93, + 124.41, + 93.13, + 68.17, + 35.22, + 12.1, + 15.27, + 60.3, + 19.1, + 15.58, + 8.97, + 18.58, + 7.31, + 0.0, + 0.0, + 13.16, + 17.25, + 12.96, + 53.08, + 53.52, + 34.41, + 83.6, + 77.17, + 80.83, + 102.42, + 98.22, + 112.54, + 87.55, + 34.05, + 28.33, + 85.74, + 25.06, + 8.3, + 24.72, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 452.99, + 751.72, + 620.77, + 811.01, + 1093.38, + 233.68, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 15.56, + 16.38, + 29.61, + 31.08, + 86.72, + 14.74, + 65.56, + 99.14, + 92.12, + 192.42, + 312.16, + 352.3, + 152.17, + 163.2, + 526.71, + 239.8, + 202.32, + 170.85, + 153.78, + 226.89, + 101.77, + 261.42, + 81.49, + 132.0, + 106.39, + 80.11, + 104.36, + 75.92, + 64.95, + 57.63, + 32.3, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 9.18, + 0.0, + 7.73, + 9.33, + 28.0, + 0.0, + 28.99, + 10.13, + 68.77, + 63.56, + 122.64, + 122.46, + 428.45, + 310.4, + 219.1, + 111.97, + 45.88, + 132.31, + 91.94, + 106.37, + 155.39, + 202.65, + 237.61, + 263.02, + 242.97, + 138.39, + 52.88, + 170.04, + 255.49, + 232.19, + 249.68, + 92.16, + 156.58, + 139.62, + 69.62, + 312.26, + 83.72, + 198.27, + 80.83, + 92.7, + 91.04, + 77.76, + 305.32, + 289.55, + 75.39, + 170.49, + 179.14, + 105.26, + 131.68, + 250.11, + 104.69, + 234.23, + 129.16, + 184.67, + 228.68, + 157.99, + 121.43, + 169.36, + 260.12, + 189.13, + 127.12, + 203.23, + 175.37, + 38.27, + 223.34, + 240.01, + 254.98, + 342.15, + 253.46, + 140.61, + 164.53, + 238.48, + 234.45, + 119.52, + 144.95, + 87.51, + 75.23, + 141.85, + 203.98, + 107.72, + 127.12, + 128.84, + 87.91, + 189.43, + 135.6, + 168.4, + 121.93, + 160.83, + 116.25, + 190.52, + 301.23, + 370.45, + 332.6, + 288.49, + 298.73, + 361.62, + 357.13, + 465.7, + 298.22, + 183.22, + 376.67, + 210.1, + 327.44, + 286.95, + 178.32, + 239.01, + 359.0, + 350.81, + 188.49, + 109.53, + 150.05, + 133.64, + 51.28, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 39.71, + 161.0, + 42.75, + 53.83, + 106.51, + 130.61, + 128.8, + 105.13, + 182.47, + 78.26, + 56.12, + 18.82, + 18.27, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 34.53, + 20.4, + 22.61, + 19.37, + 27.37, + 40.97, + 106.15, + 72.23, + 93.66, + 170.05, + 77.58, + 38.86, + 0.0, + 47.14, + 23.74, + 24.4, + 5.72, + 10.15, + 30.46, + 5.72, + 7.42, + 7.88, + 4.97, + 17.56, + 0.0, + 0.0, + 0.0, + 15.56, + 8.28, + 0.0, + 0.0, + 24.81, + 52.15, + 96.75, + 82.73, + 67.4, + 49.68, + 22.92, + 27.32, + 23.13, + 16.25, + 29.81, + 22.65, + 13.1, + 12.32, + 0.0, + 0.0, + 1.66, + 16.17, + 17.64, + 53.43, + 44.38, + 43.13, + 73.89, + 77.17, + 81.27, + 117.4, + 60.82, + 94.99, + 96.08, + 38.04, + 23.2, + 89.0, + 40.87, + 26.24, + 24.82, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 452.92, + 617.08, + 657.05, + 893.71, + 1068.11, + 229.6, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 15.46, + 16.23, + 34.59, + 29.45, + 92.26, + 11.93, + 69.49, + 87.63, + 93.76, + 191.4, + 335.02, + 327.57, + 156.87, + 278.91, + 449.17, + 351.47, + 158.15, + 129.79, + 179.62, + 227.03, + 166.53, + 134.63, + 116.48, + 158.28, + 112.95, + 76.43, + 42.13, + 132.78, + 56.77, + 0.63, + 56.89, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 11.5, + 0.0, + 9.69, + 6.71, + 27.16, + 0.0, + 34.14, + 16.12, + 74.98, + 57.87, + 164.99, + 92.54, + 416.34, + 347.39, + 225.79, + 96.22, + 105.49, + 193.89, + 100.54, + 126.99, + 202.66, + 266.6, + 185.95, + 207.72, + 211.87, + 150.22, + 43.32, + 183.68, + 320.73, + 178.32, + 275.23, + 70.39, + 120.87, + 115.81, + 53.92, + 310.11, + 126.21, + 240.18, + 126.67, + 68.11, + 109.84, + 73.19, + 199.9, + 219.07, + 77.87, + 123.59, + 127.46, + 99.8, + 134.87, + 300.1, + 84.34, + 274.13, + 64.47, + 293.4, + 213.8, + 171.1, + 89.25, + 159.17, + 211.1, + 152.99, + 189.73, + 146.68, + 282.42, + 58.26, + 179.86, + 230.25, + 191.08, + 352.25, + 283.37, + 101.27, + 60.82, + 292.89, + 252.37, + 158.48, + 161.88, + 100.62, + 57.32, + 183.81, + 215.06, + 134.27, + 95.35, + 125.35, + 57.33, + 146.61, + 106.4, + 119.43, + 183.18, + 164.36, + 99.37, + 199.47, + 352.13, + 349.48, + 244.54, + 323.69, + 305.82, + 417.19, + 327.45, + 497.48, + 287.57, + 161.32, + 381.07, + 180.36, + 275.59, + 341.13, + 180.07, + 223.45, + 366.2, + 411.66, + 240.98, + 101.64, + 146.28, + 115.58, + 70.25, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 61.71, + 153.25, + 31.34, + 48.91, + 138.17, + 115.45, + 169.54, + 115.07, + 134.95, + 89.07, + 36.32, + 17.75, + 17.27, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 38.97, + 16.27, + 15.94, + 22.4, + 58.3, + 29.5, + 100.54, + 91.13, + 38.53, + 164.46, + 70.7, + 25.27, + 0.0, + 56.03, + 19.9, + 25.71, + 13.12, + 4.15, + 20.41, + 4.4, + 9.62, + 5.38, + 6.28, + 15.57, + 0.0, + 0.0, + 0.0, + 15.27, + 14.71, + 0.0, + 0.0, + 12.23, + 52.33, + 114.45, + 88.79, + 50.96, + 53.96, + 14.64, + 25.08, + 48.07, + 17.14, + 27.26, + 22.63, + 9.28, + 7.63, + 0.0, + 0.0, + 4.32, + 21.93, + 15.65, + 45.51, + 47.44, + 50.42, + 93.25, + 63.48, + 70.02, + 118.62, + 70.65, + 105.59, + 93.12, + 30.75, + 24.06, + 85.71, + 34.77, + 28.72, + 25.38, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 454.69, + 746.43, + 683.55, + 910.45, + 1067.36, + 217.4, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 15.56, + 16.38, + 33.89, + 31.08, + 90.26, + 14.74, + 85.03, + 87.17, + 57.75, + 240.8, + 342.95, + 358.95, + 100.68, + 198.44, + 479.69, + 262.91, + 198.49, + 175.24, + 144.53, + 244.03, + 52.74, + 253.22, + 62.07, + 132.57, + 140.5, + 106.03, + 83.27, + 64.5, + 20.71, + 17.37, + 32.3, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 9.18, + 0.0, + 7.73, + 9.33, + 22.06, + 0.0, + 35.57, + 10.13, + 111.1, + 48.92, + 133.28, + 118.8, + 424.86, + 289.11, + 295.56, + 135.27, + 73.08, + 146.63, + 93.39, + 134.15, + 203.62, + 294.72, + 272.38, + 168.5, + 269.93, + 96.51, + 117.28, + 194.8, + 317.16, + 214.35, + 221.72, + 105.35, + 128.07, + 156.67, + 42.92, + 233.47, + 97.88, + 265.43, + 87.63, + 68.85, + 93.49, + 81.18, + 237.9, + 214.58, + 79.31, + 173.87, + 115.65, + 96.27, + 129.15, + 338.06, + 92.67, + 196.74, + 82.43, + 176.63, + 223.23, + 95.47, + 127.12, + 196.31, + 226.31, + 118.14, + 173.76, + 249.55, + 172.35, + 57.03, + 208.78, + 205.19, + 221.44, + 321.67, + 313.46, + 136.46, + 120.69, + 248.0, + 183.26, + 167.38, + 65.21, + 58.8, + 71.95, + 108.23, + 228.73, + 154.52, + 87.62, + 77.71, + 39.0, + 206.53, + 154.52, + 152.75, + 204.73, + 103.6, + 159.29, + 157.71, + 424.39, + 274.47, + 252.86, + 345.2, + 324.57, + 497.12, + 280.11, + 595.33, + 308.56, + 145.89, + 278.68, + 223.61, + 294.5, + 314.39, + 225.82, + 248.85, + 355.88, + 381.45, + 226.42, + 65.91, + 192.26, + 125.69, + 70.17, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 39.71, + 208.08, + 16.41, + 60.02, + 127.63, + 138.58, + 121.7, + 98.17, + 166.95, + 75.62, + 19.99, + 26.57, + 18.27, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 28.73, + 23.79, + 26.99, + 33.71, + 63.32, + 37.64, + 46.13, + 71.96, + 88.85, + 128.94, + 31.85, + 45.95, + 0.0, + 35.03, + 7.84, + 28.76, + 16.08, + 10.15, + 24.9, + 5.72, + 11.4, + 7.88, + 4.97, + 30.81, + 0.0, + 0.0, + 0.0, + 18.93, + 9.6, + 0.0, + 0.0, + 32.79, + 49.97, + 105.24, + 84.67, + 72.35, + 48.11, + 25.67, + 21.38, + 34.38, + 16.28, + 32.24, + 16.54, + 12.29, + 8.47, + 0.0, + 0.0, + 7.08, + 20.83, + 14.94, + 57.74, + 49.57, + 35.34, + 86.22, + 116.1, + 37.58, + 134.0, + 74.4, + 120.7, + 84.9, + 27.66, + 41.38, + 69.67, + 26.36, + 9.02, + 23.54, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 456.73, + 865.9, + 643.93, + 849.79, + 1073.42, + 226.21, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 15.46, + 16.23, + 30.44, + 29.45, + 94.63, + 11.93, + 72.42, + 88.31, + 110.31, + 206.46, + 328.61, + 294.32, + 138.82, + 215.06, + 494.61, + 194.58, + 147.94, + 232.32, + 114.28, + 246.05, + 84.18, + 180.13, + 100.65, + 148.51, + 121.41, + 109.24, + 50.03, + 103.01, + 51.55, + 15.07, + 56.89, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 6.51, + 0.0, + 9.53, + 10.67, + 38.05, + 0.0, + 17.01, + 4.36, + 87.48, + 62.62, + 128.42, + 95.9, + 397.21, + 386.34, + 183.38, + 80.92, + 63.86, + 193.13, + 128.07, + 74.77, + 157.4, + 216.0, + 274.59, + 238.48, + 280.43, + 96.14, + 45.98, + 191.59, + 279.94, + 205.72, + 173.68, + 51.04, + 164.25, + 172.51, + 49.12, + 363.48, + 22.89, + 272.52, + 121.75, + 76.31, + 81.4, + 66.0, + 285.17, + 269.57, + 62.64, + 187.97, + 190.36, + 90.66, + 134.99, + 298.52, + 130.1, + 189.13, + 94.49, + 146.99, + 283.93, + 150.48, + 95.48, + 94.76, + 252.79, + 171.6, + 156.46, + 182.18, + 240.11, + 33.13, + 164.03, + 272.78, + 189.9, + 359.93, + 298.48, + 128.41, + 156.98, + 285.67, + 268.33, + 68.69, + 75.47, + 90.07, + 88.62, + 76.82, + 258.73, + 158.12, + 83.26, + 161.56, + 145.9, + 191.22, + 111.36, + 132.18, + 150.96, + 163.35, + 122.39, + 219.27, + 369.11, + 329.87, + 287.41, + 321.86, + 318.69, + 418.6, + 272.16, + 537.49, + 334.95, + 151.14, + 337.21, + 242.21, + 297.28, + 322.14, + 181.68, + 190.88, + 345.86, + 346.32, + 190.69, + 126.71, + 133.67, + 180.03, + 44.56, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 30.7, + 154.32, + 39.55, + 42.79, + 117.51, + 129.15, + 134.38, + 90.21, + 154.27, + 73.86, + 58.99, + 17.52, + 22.7, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 33.35, + 14.37, + 33.29, + 23.19, + 28.43, + 31.88, + 89.03, + 77.65, + 100.99, + 165.81, + 61.14, + 38.85, + 0.0, + 44.05, + 14.92, + 31.92, + 11.2, + 5.77, + 30.62, + 9.43, + 16.86, + 4.42, + 6.54, + 29.27, + 0.0, + 0.0, + 0.0, + 6.18, + 14.61, + 0.0, + 0.0, + 25.77, + 56.08, + 136.32, + 101.3, + 56.96, + 39.01, + 10.56, + 17.73, + 51.99, + 15.77, + 18.09, + 8.42, + 24.8, + 8.07, + 0.0, + 0.0, + 11.19, + 13.87, + 10.98, + 44.69, + 49.58, + 39.9, + 95.82, + 90.04, + 67.44, + 132.06, + 75.85, + 95.55, + 71.77, + 45.79, + 23.87, + 74.05, + 28.97, + 6.59, + 34.43, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 460.26, + 674.06, + 637.11, + 869.18, + 1009.52, + 235.56, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 17.11, + 15.5, + 29.87, + 31.32, + 87.43, + 18.16, + 63.3, + 85.62, + 91.16, + 176.32, + 323.02, + 290.9, + 154.54, + 266.28, + 488.61, + 182.86, + 219.5, + 154.39, + 168.65, + 319.14, + 92.88, + 266.97, + 61.07, + 186.1, + 115.34, + 40.06, + 102.6, + 108.69, + 73.21, + 38.71, + 43.85, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 4.61, + 0.0, + 4.28, + 4.18, + 11.03, + 0.0, + 12.91, + 4.34, + 38.23, + 13.91, + 43.81, + 33.74, + 108.02, + 85.43, + 54.07, + 21.47, + 18.02, + 29.27, + 33.84, + 32.99, + 54.08, + 57.08, + 42.65, + 45.52, + 37.4, + 30.66, + 22.96, + 27.23, + 44.96, + 34.62, + 43.81, + 13.13, + 17.14, + 39.86, + 6.27, + 74.31, + 23.12, + 62.66, + 16.59, + 17.14, + 26.54, + 13.98, + 43.07, + 30.57, + 28.22, + 30.52, + 20.48, + 16.38, + 25.31, + 61.43, + 19.09, + 51.5, + 16.76, + 40.7, + 41.01, + 38.45, + 28.29, + 29.29, + 56.01, + 37.69, + 30.87, + 32.63, + 43.37, + 9.19, + 36.45, + 58.03, + 36.48, + 68.09, + 54.75, + 24.26, + 20.67, + 46.73, + 47.63, + 21.15, + 21.12, + 16.75, + 15.56, + 29.0, + 40.96, + 20.73, + 19.03, + 17.7, + 10.59, + 33.61, + 24.23, + 24.78, + 30.0, + 30.35, + 23.02, + 27.52, + 64.33, + 48.41, + 30.12, + 46.66, + 43.07, + 66.75, + 55.76, + 63.62, + 39.9, + 15.96, + 79.23, + 48.37, + 50.2, + 42.55, + 18.61, + 25.9, + 45.11, + 48.66, + 33.03, + 16.14, + 29.83, + 26.63, + 10.62, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 7.94, + 42.72, + 13.99, + 12.48, + 35.39, + 47.29, + 38.77, + 42.82, + 55.83, + 15.69, + 23.63, + 11.18, + 6.76, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 15.82, + 15.12, + 21.08, + 8.51, + 11.13, + 15.62, + 65.23, + 40.35, + 57.51, + 122.1, + 44.55, + 24.72, + 0.0, + 30.92, + 16.63, + 20.01, + 3.74, + 7.07, + 36.39, + 7.96, + 8.87, + 6.47, + 6.71, + 15.94, + 0.0, + 0.0, + 0.0, + 8.35, + 15.04, + 0.0, + 0.0, + 14.24, + 43.86, + 100.32, + 78.84, + 50.2, + 54.5, + 19.89, + 27.42, + 61.6, + 21.53, + 23.54, + 29.09, + 24.01, + 11.11, + 0.0, + 0.0, + 15.47, + 72.13, + 48.5, + 176.59, + 146.47, + 118.04, + 217.72, + 227.11, + 129.46, + 285.27, + 186.65, + 275.2, + 187.74, + 77.51, + 66.46, + 170.73, + 62.56, + 25.55, + 56.81, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 86.96, + 148.04, + 124.78, + 160.66, + 194.92, + 38.55, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.13, + 0.18, + 0.79, + 1.16, + 3.75, + 0.64, + 3.4, + 7.33, + 9.24, + 17.56, + 32.6, + 33.86, + 22.95, + 32.57, + 63.53, + 36.4, + 32.28, + 32.6, + 24.51, + 38.77, + 23.52, + 41.51, + 16.68, + 29.24, + 33.52, + 21.17, + 20.04, + 21.95, + 9.44, + 5.98, + 11.78, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 4.61, + 0.0, + 4.28, + 4.18, + 12.68, + 0.0, + 12.38, + 4.34, + 27.92, + 17.08, + 49.13, + 30.72, + 112.79, + 76.96, + 57.77, + 23.48, + 16.95, + 36.28, + 30.38, + 28.71, + 48.91, + 68.1, + 47.63, + 41.07, + 21.96, + 23.9, + 11.87, + 32.73, + 41.28, + 38.15, + 34.79, + 15.57, + 22.75, + 27.97, + 12.07, + 63.57, + 26.17, + 45.46, + 14.36, + 19.09, + 20.38, + 12.73, + 53.62, + 46.53, + 13.97, + 29.32, + 43.02, + 24.17, + 27.33, + 78.27, + 15.73, + 44.48, + 18.52, + 35.17, + 41.21, + 37.4, + 24.29, + 23.37, + 58.75, + 37.06, + 26.9, + 32.1, + 50.15, + 11.27, + 31.23, + 57.16, + 32.92, + 67.65, + 47.34, + 29.87, + 27.23, + 51.83, + 54.06, + 18.12, + 19.17, + 14.99, + 14.3, + 26.84, + 50.62, + 33.23, + 13.21, + 19.85, + 23.76, + 31.09, + 14.89, + 25.96, + 46.29, + 31.84, + 18.54, + 39.15, + 63.65, + 61.72, + 34.49, + 43.86, + 48.88, + 58.13, + 35.17, + 80.47, + 38.47, + 16.79, + 70.11, + 35.09, + 50.89, + 41.28, + 21.37, + 29.57, + 46.17, + 45.88, + 29.08, + 16.67, + 26.09, + 25.46, + 12.74, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 7.94, + 70.42, + 7.63, + 19.01, + 42.89, + 45.11, + 46.31, + 31.44, + 61.31, + 43.7, + 8.09, + 8.44, + 6.76, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 17.62, + 4.17, + 9.05, + 15.7, + 38.08, + 33.64, + 20.25, + 40.25, + 74.37, + 69.64, + 20.52, + 42.09, + 0.0, + 19.43, + 2.56, + 25.35, + 11.54, + 7.07, + 13.29, + 7.96, + 10.09, + 6.47, + 6.71, + 31.6, + 0.0, + 0.0, + 0.0, + 9.32, + 13.67, + 0.0, + 0.0, + 26.43, + 48.02, + 144.95, + 108.98, + 65.83, + 38.02, + 6.58, + 17.46, + 59.74, + 11.6, + 21.93, + 27.95, + 31.69, + 17.02, + 0.0, + 0.0, + 17.17, + 59.59, + 50.02, + 152.14, + 145.54, + 122.83, + 221.26, + 182.26, + 174.85, + 278.57, + 178.97, + 252.92, + 190.1, + 82.17, + 52.03, + 174.91, + 69.46, + 39.22, + 57.81, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 87.27, + 132.75, + 122.43, + 161.9, + 192.33, + 39.38, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.13, + 0.18, + 1.03, + 1.16, + 4.92, + 0.64, + 5.66, + 5.84, + 6.72, + 21.87, + 35.4, + 45.36, + 18.14, + 29.83, + 78.47, + 40.11, + 34.23, + 35.87, + 19.78, + 44.73, + 16.25, + 39.8, + 20.1, + 30.02, + 25.53, + 17.23, + 19.17, + 23.47, + 13.14, + 7.61, + 11.78, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 3.5, + 0.0, + 4.31, + 4.65, + 13.62, + 0.0, + 11.51, + 2.06, + 33.2, + 17.66, + 41.25, + 31.25, + 111.7, + 87.16, + 58.92, + 20.13, + 14.58, + 30.83, + 34.87, + 28.71, + 45.65, + 61.46, + 54.35, + 38.79, + 38.79, + 21.75, + 16.62, + 24.89, + 43.47, + 37.88, + 44.04, + 17.15, + 23.24, + 24.89, + 15.12, + 78.68, + 5.71, + 49.75, + 16.77, + 22.8, + 19.34, + 11.98, + 52.64, + 36.54, + 17.98, + 45.73, + 28.68, + 20.25, + 33.45, + 62.96, + 19.14, + 47.97, + 15.49, + 39.25, + 34.99, + 32.44, + 34.37, + 25.08, + 50.65, + 42.07, + 26.91, + 47.45, + 39.16, + 7.75, + 34.39, + 48.71, + 38.13, + 61.8, + 58.85, + 25.47, + 37.85, + 42.28, + 59.57, + 18.8, + 16.75, + 21.1, + 14.15, + 18.91, + 37.99, + 18.12, + 24.61, + 24.77, + 5.58, + 38.15, + 28.73, + 35.1, + 28.94, + 24.0, + 27.6, + 39.02, + 53.38, + 47.38, + 50.22, + 39.31, + 37.32, + 72.86, + 42.53, + 69.99, + 40.52, + 21.96, + 58.67, + 53.96, + 48.39, + 39.36, + 20.89, + 29.97, + 44.25, + 47.24, + 31.23, + 17.77, + 29.43, + 24.7, + 11.35, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 21.43, + 35.93, + 9.69, + 17.9, + 46.97, + 34.6, + 63.0, + 33.49, + 54.12, + 30.54, + 15.33, + 3.49, + 9.7, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 20.77, + 7.58, + 9.68, + 16.0, + 33.95, + 7.15, + 60.21, + 63.32, + 16.89, + 112.66, + 39.73, + 11.7, + 0.0, + 40.89, + 12.35, + 18.38, + 18.18, + 2.74, + 20.27, + 1.27, + 17.07, + 5.33, + 4.79, + 22.66, + 0.0, + 0.0, + 0.0, + 18.36, + 8.1, + 0.0, + 0.0, + 31.45, + 48.48, + 100.39, + 85.35, + 64.87, + 52.8, + 27.25, + 28.99, + 31.71, + 19.36, + 27.62, + 29.54, + 31.25, + 15.24, + 0.0, + 0.0, + 12.65, + 63.8, + 48.16, + 176.53, + 138.69, + 117.17, + 212.95, + 235.24, + 130.41, + 306.99, + 161.97, + 256.61, + 183.91, + 90.71, + 60.14, + 168.43, + 68.71, + 23.78, + 65.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 87.19, + 139.3, + 123.54, + 162.41, + 193.21, + 38.76, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.29, + 0.18, + 0.46, + 1.31, + 4.19, + 1.18, + 5.1, + 6.02, + 5.81, + 20.9, + 34.22, + 41.2, + 18.44, + 28.61, + 75.45, + 39.86, + 31.25, + 26.19, + 32.1, + 46.25, + 14.39, + 39.7, + 15.63, + 32.18, + 28.4, + 18.66, + 19.66, + 23.72, + 12.79, + 4.59, + 13.22, + 0.0, + 0.0, + 0.0 + ] + ], + "y_data_unit": "millibarn / millielectron_volt" +} \ No newline at end of file diff --git a/tests_and_analysis/test/euphonic_test/test_spectrum1d.py b/tests_and_analysis/test/euphonic_test/test_spectrum1d.py index 53c1568fc..e5044aad2 100644 --- a/tests_and_analysis/test/euphonic_test/test_spectrum1d.py +++ b/tests_and_analysis/test/euphonic_test/test_spectrum1d.py @@ -9,7 +9,9 @@ from euphonic.spectra import Spectrum1D from tests_and_analysis.test.utils import ( get_data_path, get_castep_path, check_unit_conversion, - check_json_metadata, check_property_setters) + check_json_metadata, check_property_setters, get_spectrum_from_text, + check_spectrum_text_header) + class ExpectedSpectrum1D: def __init__(self, spectrum1d_json_file: str): @@ -75,16 +77,16 @@ def get_spectrum1d_dir(): return os.path.join(get_data_path(), 'spectrum1d') -def get_json_file(json_filename): +def get_full_path(json_filename): return os.path.join(get_spectrum1d_dir(), json_filename) def get_spectrum1d(json_filename): - return Spectrum1D.from_json_file(get_json_file(json_filename)) + return Spectrum1D.from_json_file(get_full_path(json_filename)) def get_expected_spectrum1d(json_filename): - return ExpectedSpectrum1D(get_json_file(json_filename)) + return ExpectedSpectrum1D(get_full_path(json_filename)) def check_spectrum1d(actual_spectrum1d, expected_spectrum1d): @@ -137,7 +139,7 @@ def create_from_json(self, request): json_file = request.param expected_spec1d = get_expected_spectrum1d(json_file) spec1d = Spectrum1D.from_json_file( - get_json_file(json_file)) + get_full_path(json_file)) return spec1d, expected_spec1d @pytest.fixture(params=[ @@ -213,6 +215,25 @@ def test_faulty_object_creation(self, inject_faulty_elements): @pytest.mark.unit class TestSpectrum1DSerialisation: + # Note that when writing .text there must be the same number of + # x_data and y_data points so bin centres will be used, this and + # using fmt may mean the output spectrum is slightly different. + # x_tick_labels will also be lost + @pytest.mark.parametrize('in_json, out_json', [ + ('quartz_666_dos.json', 'quartz_666_dos_from_text.json'), + ('methane_pdos_index_1.json', 'methane_pdos_index_1.json')]) + def test_serialise_to_text_file(self, in_json, out_json, tmpdir): + spec1d = get_spectrum1d(in_json) + # Serialise + output_file = str(tmpdir.join('tmp.test')) + spec1d.to_text_file(output_file) + # Deserialise + deserialised_spec1d = get_spectrum_from_text( + output_file, is_collection=False) + expected_deserialised_spec1d = get_spectrum1d(out_json) + check_spectrum_text_header(output_file) + check_spectrum1d(deserialised_spec1d, expected_deserialised_spec1d) + @pytest.mark.parametrize('spec1d', [ get_spectrum1d('quartz_666_dos.json'), get_spectrum1d('xsq_spectrum1d.json'), @@ -224,22 +245,17 @@ def test_serialise_to_json_file(self, spec1d, tmpdir): deserialised_spec1d = Spectrum1D.from_json_file(output_file) check_spectrum1d(spec1d, deserialised_spec1d) - @pytest.fixture(params=[ + @pytest.mark.parametrize('json_file', [ 'quartz_666_dos.json', 'xsq_spectrum1d.json', 'xsq_bin_edges_spectrum1d.json']) - def serialise_to_dict(self, request): - json_file = request.param + def test_serialise_to_dict(self, json_file): spec1d = get_spectrum1d(json_file) expected_spec1d = get_expected_spectrum1d(json_file) # Convert to dict, then back to object to test spec1d_dict = spec1d.to_dict() spec1d_from_dict = Spectrum1D.from_dict(spec1d_dict) - return spec1d_from_dict, expected_spec1d - - def test_serialise_to_dict(self, serialise_to_dict): - spec1d, expected_spec1d = serialise_to_dict - check_spectrum1d(spec1d, expected_spec1d) + check_spectrum1d(spec1d_from_dict, expected_spec1d) @pytest.mark.unit diff --git a/tests_and_analysis/test/euphonic_test/test_spectrum1dcollection.py b/tests_and_analysis/test/euphonic_test/test_spectrum1dcollection.py index c88138be0..1ee31ff91 100644 --- a/tests_and_analysis/test/euphonic_test/test_spectrum1dcollection.py +++ b/tests_and_analysis/test/euphonic_test/test_spectrum1dcollection.py @@ -7,11 +7,13 @@ from euphonic import ureg from euphonic.spectra import Spectrum1DCollection -from tests_and_analysis.test.utils import get_data_path, get_castep_path - -from .test_spectrum1d import (get_spectrum1d, get_expected_spectrum1d, - check_spectrum1d, check_unit_conversion, - check_property_setters) +from tests_and_analysis.test.utils import ( + get_data_path, get_castep_path, get_spectrum_from_text, + check_spectrum_text_header) +from tests_and_analysis.test.euphonic_test.test_spectrum1d import ( + get_spectrum1d, get_expected_spectrum1d, + check_spectrum1d, check_unit_conversion, + check_property_setters) class ExpectedSpectrum1DCollection: @@ -78,16 +80,16 @@ def get_spectrum_dir(): return os.path.join(get_data_path(), 'spectrum1dcollection') -def get_json_file(json_filename): - return os.path.join(get_spectrum_dir(), json_filename) +def get_full_path(filename): + return os.path.join(get_spectrum_dir(), filename) def get_spectrum1dcollection(json_filename): - return Spectrum1DCollection.from_json_file(get_json_file(json_filename)) + return Spectrum1DCollection.from_json_file(get_full_path(json_filename)) def get_expected_spectrum1dcollection(json_filename): - return ExpectedSpectrum1DCollection(get_json_file(json_filename)) + return ExpectedSpectrum1DCollection(get_full_path(json_filename)) def check_spectrum1dcollection(actual_spectrum, expected_spectrum): @@ -135,7 +137,7 @@ def create_from_json(self, request): json_file = request.param expected_spectrum = get_expected_spectrum1dcollection(json_file) spectrum = Spectrum1DCollection.from_json_file( - get_json_file(json_file)) + get_full_path(json_file)) return spectrum, expected_spectrum @pytest.fixture(params=[ @@ -271,38 +273,52 @@ def test_faulty_create_from_sequence(self, input_spectra, expected_error): @pytest.mark.unit class TestSpectrum1DCollectionSerialisation: - @pytest.fixture(params=[ + # Note that when writing .text there must be the same number of + # x_data and y_data points so bin centres will be used, this and + # using fmt may mean the output spectrum is slightly different. + # x_tick_labels will also be lost + @pytest.mark.parametrize('in_json, out_json, kwargs', [ + ('quartz_666_coh_pdos.json', + 'quartz_666_coh_pdos_from_text_file_fmt.json', + {'fmt': '%.2f'}), + ('gan_bands.json', 'gan_bands_from_text_file.json', {}), + ('methane_pdos.json', 'methane_pdos_from_text_file_fmt.json', + {'fmt': ['%.4f'] + ['%.2f']*5})]) + def test_serialise_to_text_file(self, in_json, out_json, kwargs, tmpdir): + spectrum = get_spectrum1dcollection(in_json) + # Serialise + output_file = str(tmpdir.join('tmp.test')) + spectrum.to_text_file(output_file, **kwargs) + # Deserialise + deserialised_spectrum = get_spectrum_from_text( + output_file, is_collection=True) + expected_deserialised_spectrum = get_spectrum1dcollection(out_json) + check_spectrum_text_header(output_file) + check_spectrum1dcollection( + expected_deserialised_spectrum, deserialised_spectrum) + + @pytest.mark.parametrize('spectrum', [ get_spectrum1dcollection('gan_bands.json'), get_spectrum1dcollection('methane_pdos.json')]) - def serialise_to_json_file(self, request, tmpdir): - spectrum = request.param + def test_serialise_to_json_file(self, spectrum, tmpdir): # Serialise output_file = str(tmpdir.join('tmp.test')) spectrum.to_json_file(output_file) # Deserialise deserialised_spectrum = (Spectrum1DCollection .from_json_file(output_file)) - return spectrum, deserialised_spectrum - - def test_serialise_to_file(self, serialise_to_json_file): - spectrum, deserialised_spectrum = serialise_to_json_file check_spectrum1dcollection(spectrum, deserialised_spectrum) - @pytest.fixture(params=[ + @pytest.mark.parametrize('json_file', [ 'gan_bands.json', 'methane_pdos.json']) - def serialise_to_dict(self, request): - json_file = request.param + def test_serialise_to_dict(self, json_file): spectrum = get_spectrum1dcollection(json_file) expected_spectrum = get_expected_spectrum1dcollection(json_file) # Convert to dict, then back to object to test spectrum_dict = spectrum.to_dict() spectrum_from_dict = Spectrum1DCollection.from_dict(spectrum_dict) - return spectrum_from_dict, expected_spectrum - - def test_serialise_to_dict(self, serialise_to_dict): - spectrum, expected_spectrum = serialise_to_dict - check_spectrum1dcollection(spectrum, expected_spectrum) + check_spectrum1dcollection(spectrum_from_dict, expected_spectrum) @pytest.mark.unit diff --git a/tests_and_analysis/test/utils.py b/tests_and_analysis/test/utils.py index 316f374ba..b338a1996 100644 --- a/tests_and_analysis/test/utils.py +++ b/tests_and_analysis/test/utils.py @@ -5,7 +5,8 @@ import numpy as np import numpy.testing as npt -from euphonic import ureg, __version__ +from euphonic import ureg, __version__, Spectrum1D, Spectrum1DCollection + def get_data_path() -> str: """ @@ -17,6 +18,7 @@ def get_data_path() -> str: """ return os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") + def get_phonopy_path(material: str, filename: str) -> str: """ Get the path to a Phonopy data file @@ -27,6 +29,7 @@ def get_phonopy_path(material: str, filename: str) -> str: """ return os.path.join(get_data_path(), 'phonopy_files', material, filename) + def get_castep_path(material: str, filename: str) -> str: """ Get the path to a CASTEP data file @@ -37,6 +40,7 @@ def get_castep_path(material: str, filename: str) -> str: """ return os.path.join(get_data_path(), 'castep_files', material, filename) + def get_test_qpts(qpts_option: Optional[str] = 'default') -> np.ndarray: """ Returns 'standard' sets of qpoints for testing @@ -97,12 +101,14 @@ def check_frequencies_at_qpts(qpts, freqs, expected_freqs, atol, rtol, qpts, freqs, expected_freqs, atol, rtol, gamma_atol, gamma_operator=np.less, gamma_idx_limit=3) + def check_structure_factors_at_qpts(qpts, freqs, expected_freqs, atol, rtol, gamma_atol=None): check_mode_values_at_qpts( qpts, freqs, expected_freqs, atol, rtol, gamma_atol, gamma_operator=np.greater, gamma_idx_limit=1) + def check_mode_values_at_qpts(qpts, values, expected_values, atol, rtol, gamma_atol=None, gamma_operator=np.less, gamma_idx_limit=None): @@ -183,6 +189,7 @@ def check_unit_conversion(obj: object, attr: str, unit: str) -> None: npt.assert_allclose(getattr(obj, attr).magnitude, original_attr_value.to(unit).magnitude) + def check_property_setters(obj: object, attr: str, unit: str, scale: float) -> None: """ @@ -206,6 +213,7 @@ def check_property_setters(obj: object, attr: str, unit: str, assert set_attr.units == new_attr.units npt.assert_allclose(set_attr.magnitude, new_attr.magnitude) + def check_json_metadata(json_file: str, class_name: str) -> None: """ Utility function to check that .json file metadata has been output @@ -225,6 +233,7 @@ def check_json_metadata(json_file: str, class_name: str) -> None: assert data['__euphonic_class__'] == class_name assert data['__euphonic_version__'] == __version__ + def sum_at_degenerate_modes(values_to_sum, frequencies, TOL=0.05): """ For degenerate frequency modes, eigenvectors are an arbitrary @@ -261,3 +270,74 @@ def sum_at_degenerate_modes(values_to_sum, frequencies, TOL=0.05): value_sum[i, :len(unique_index), j] = np.bincount( unique_modes, values_to_sum[i, :, j]) return value_sum.squeeze() + + +def get_spectrum_from_text(text_filename, is_collection=True): + """ + Reads a Spectrum1DCollection or Spectrum1D from a text file, + for testing to_text_file method. The text file + should consist of a header, followed by data columns. + The first column is x_data, subsequent columns are + each y_data spectrum. + + Header example: + # Generated by Euphonic 0.6.2 + # x_data in (millielectron_volt) + # y_data in (millibarn / millielectron_volt) + # Common metadata: {"weighting": "coherent"} + # Column 1: x_data + # Column 2: y_data[0] {"index": 0, "species": "O"} + # Column 3: y_data[1] {"index": 1, "species": "O"} + # Column 4: y_data[2] {"index": 2, "species": "Si"} + """ + metadata = {} + data = np.loadtxt(text_filename) + x_data = data[:, 0] + y_data = data[:, 1:] + with open(text_filename, 'r') as fp: + fp.readline() # Skip 'Generated by Euphonic...' line + line = fp.readline() # 'x_data in...' line + x_data_unit = line[line.index('('):] + line = fp.readline() # 'y_data in...' line + y_data_unit = line[line.index('('):] + line = fp.readline() # 'Common metadata...' line + metadata.update(json.loads(line[line.index('{'):])) + fp.readline() # Skip 'Column 1: x_data' line + for idx in range(len(y_data[0])): + line = fp.readline() # 'Column i + 2: y_data[i]...' line + line_data = json.loads(line[line.index('{'):]) + if line_data: + if not 'line_data' in metadata: + metadata['line_data'] = [ + {} for i in range(len(y_data[0]))] + metadata['line_data'][idx] = line_data + if is_collection: + cls = Spectrum1DCollection + y_data = y_data.transpose() + else: + cls = Spectrum1D + y_data = y_data.squeeze() + return cls(x_data*ureg(x_data_unit), + y_data*ureg(y_data_unit), + metadata=metadata) + + +def check_spectrum_text_header(text_filename): + """ + Checks parts of the header that aren't required to + create a spectrum object, but are important for human + readability + """ + with open(text_filename, 'r') as fp: + line = fp.readline() + assert '# Generated by Euphonic ' in line + version = line.split()[-1] + assert version == __version__ + assert '# x_data in (' in fp.readline() + assert '# y_data in (' in fp.readline() + assert '# Common metadata: {' in fp.readline() + assert '# Column 1: x_data' in fp.readline() + for idx, line in enumerate(fp): + if idx > 0 and line[0] != '#': # Ensure at least 1 y_data line + break + assert f'# Column {idx + 2}: y_data[{idx}] {{' in line