From dfdf0d8649b544f656179ce60c9b987a743c68e8 Mon Sep 17 00:00:00 2001 From: Georgi Georgiev Date: Thu, 16 Jan 2025 10:36:29 +0200 Subject: [PATCH 1/2] Support for TSV file format --- .../io/experimental/lightnovo_tsv.py | 21 + src/ramanchada2/io/experimental/read_txt.py | 6 + .../spectrum/creators/from_local_file.py | 7 +- .../spectrum/creators/from_stream.py | 5 +- .../polystyrene_aritficially_worsened.tsv | 2298 +++++++++++++++++ tests/spectrum/creators/test_from_stream.py | 2 +- 6 files changed, 2333 insertions(+), 6 deletions(-) create mode 100644 src/ramanchada2/io/experimental/lightnovo_tsv.py create mode 100644 tests/data/experimental/LightNovo/polystyrene_aritficially_worsened.tsv diff --git a/src/ramanchada2/io/experimental/lightnovo_tsv.py b/src/ramanchada2/io/experimental/lightnovo_tsv.py new file mode 100644 index 00000000..35b7b28b --- /dev/null +++ b/src/ramanchada2/io/experimental/lightnovo_tsv.py @@ -0,0 +1,21 @@ +from typing import Dict, List, Tuple + +import pandas + + +def lightnovo_tsv(lines: List[str]) -> Tuple[pandas.DataFrame, Dict]: + for i, ll in enumerate(lines): + if not ll.startswith(('DeviceSN', 'LaserWavelength_nm', 'Exposure_ms', + 'GainMultiplier', 'LaserCurrent_mA', 'LaserPower_mW', + 'RepetitionCount', 'Tags')): + start_spe = i + break + else: + raise ValueError('The input is not lightnovo tsv format') + meta = dict([i.split('\t', 1) for i in lines[:start_spe]]) + spe_lines = [ll.strip().split('\t') for ll in lines[start_spe:]] + + data = pandas.DataFrame.from_records(data=spe_lines, columns=['Position', 'Amplitude'] + ).apply(pandas.to_numeric, errors='coerce' + ).dropna(axis=0) + return data, meta diff --git a/src/ramanchada2/io/experimental/read_txt.py b/src/ramanchada2/io/experimental/read_txt.py index 8166042d..6af276fe 100644 --- a/src/ramanchada2/io/experimental/read_txt.py +++ b/src/ramanchada2/io/experimental/read_txt.py @@ -5,6 +5,7 @@ from .bw_format import bw_format from .neegala_format import neegala_format +from .lightnovo_tsv import lightnovo_tsv from .rruf_format import rruf_format """ There are 4 types of TXT data files that can be distinguished by their first line: @@ -35,6 +36,11 @@ def read_txt(data_in: TextIO) -> Tuple[NDArray, NDArray, Dict]: intensities = data['Processed_Data'].to_numpy() meta['@axes'] = ['Raman_Shift'] meta['@signal'] = 'Processed_Data' + elif lines[0].startswith('DeviceSN\t'): + data, meta = lightnovo_tsv(lines) + positions = data['Position'].to_numpy() + intensities = data['Amplitude'].to_numpy() + meta['@signal'] = 'DarkSubtracted' else: # assume two column spectrum meta = dict() if lines[0].startswith('#'): diff --git a/src/ramanchada2/spectrum/creators/from_local_file.py b/src/ramanchada2/spectrum/creators/from_local_file.py index 4b200c0e..cc8d84ea 100644 --- a/src/ramanchada2/spectrum/creators/from_local_file.py +++ b/src/ramanchada2/spectrum/creators/from_local_file.py @@ -21,7 +21,8 @@ def from_local_file( in_file_name: str, filetype: Union[None, Literal['spc', 'sp', 'spa', '0', '1', '2', 'wdf', 'ngs', 'jdx', 'dx', - 'txt', 'txtr', 'csv', 'prn', 'rruf', 'spe', 'cha']] = None, + 'txt', 'txtr', 'tsv', 'csv', 'prn', + 'rruf', 'spe', 'cha']] = None, backend: Union[None, Literal['native', 'rc1_parser']] = None, custom_meta: Dict = {}): """ @@ -32,7 +33,7 @@ def from_local_file( Path to a local file containing a spectrum. filetype: Specify the filetype. Filetype can be any of: `spc`, `sp`, `spa`, `0`, `1`, `2`, `wdf`, `ngs`, `jdx`, `dx`, - `txt`, `txtr`, `csv`, `prn`, `rruf`, `spe` (Princeton Instruments) or `None`. + `txt`, `txtr`, `tsv`, `csv`, `prn`, `rruf`, `spe` (Princeton Instruments) or `None`. `None` used to determine by extension of the file. backend: `native`, `rc1_parser` or `None`. `None` means both. @@ -50,7 +51,7 @@ def load_native(): ft = filetype if ft in {'cha'}: return from_chada(filename=in_file_name) - elif ft in {'txt', 'txtr', 'prn', 'rruf'}: + elif ft in {'txt', 'txtr', 'prn', 'rruf', 'tsv'}: with open(in_file_name) as fp: x, y, meta = read_txt(fp) elif ft in {'csv'}: diff --git a/src/ramanchada2/spectrum/creators/from_stream.py b/src/ramanchada2/spectrum/creators/from_stream.py index 129557d3..0ad909d2 100644 --- a/src/ramanchada2/spectrum/creators/from_stream.py +++ b/src/ramanchada2/spectrum/creators/from_stream.py @@ -20,12 +20,13 @@ def from_stream(in_stream: Union[io.TextIOBase, io.BytesIO, io.BufferedReader], filetype: Union[None, Literal['spc', 'sp', 'spa', '0', '1', '2', 'wdf', 'ngs', 'jdx', 'dx', - 'txt', 'txtr', 'csv', 'prn', 'rruf', 'spe']], + 'txt', 'txtr', 'tsv', 'csv', 'prn', + 'rruf', 'spe']], filename: Optional[str] = None, backend: Union[None, Literal['native', 'rc1_parser']] = None, ): def load_native(): - if filetype in {'txt', 'txtr', 'prn', 'rruf'}: + if filetype in {'txt', 'txtr', 'tsv', 'prn', 'rruf'}: if isinstance(in_stream, io.TextIOBase): fp = in_stream else: diff --git a/tests/data/experimental/LightNovo/polystyrene_aritficially_worsened.tsv b/tests/data/experimental/LightNovo/polystyrene_aritficially_worsened.tsv new file mode 100644 index 00000000..5867167f --- /dev/null +++ b/tests/data/experimental/LightNovo/polystyrene_aritficially_worsened.tsv @@ -0,0 +1,2298 @@ +DeviceSN 11111 +LaserWavelength_nm 785 +Exposure_ms 111 +GainMultiplier 1 +LaserCurrent_mA 1111 +LaserPower_mW 11.1111111 +RepetitionCount 5 +Tags +100 4.53 +101 4.48 +102 4.41 +103 4.38 +104 4.37 +105 4.36 +106 4.35 +107 4.33 +108 4.30 +109 4.31 +110 4.37 +111 4.46 +112 4.55 +113 4.65 +114 4.76 +115 4.88 +116 5.03 +117 5.13 +118 5.14 +119 5.13 +120 5.11 +121 5.06 +122 4.95 +123 4.82 +124 4.64 +125 4.41 +126 4.20 +127 4.04 +128 3.89 +129 3.76 +130 3.62 +131 3.49 +132 3.37 +133 3.26 +134 3.17 +135 3.09 +136 3.03 +137 2.98 +138 2.92 +139 2.88 +140 2.83 +141 2.77 +142 2.69 +143 2.61 +144 2.57 +145 2.55 +146 2.53 +147 2.50 +148 2.46 +149 2.43 +150 2.39 +151 2.33 +152 2.29 +153 2.28 +154 2.28 +155 2.27 +156 2.23 +157 2.19 +158 2.16 +159 2.16 +160 2.16 +161 2.15 +162 2.11 +163 2.06 +164 2.03 +165 2.01 +166 1.99 +167 1.98 +168 1.96 +169 1.95 +170 1.93 +171 1.90 +172 1.87 +173 1.86 +174 1.86 +175 1.85 +176 1.83 +177 1.80 +178 1.78 +179 1.77 +180 1.76 +181 1.75 +182 1.74 +183 1.71 +184 1.70 +185 1.69 +186 1.67 +187 1.67 +188 1.66 +189 1.66 +190 1.66 +191 1.67 +192 1.67 +193 1.67 +194 1.68 +195 1.68 +196 1.68 +197 1.67 +198 1.67 +199 1.67 +200 1.69 +201 1.71 +202 1.73 +203 1.75 +204 1.78 +205 1.83 +206 1.88 +207 1.91 +208 1.92 +209 1.94 +210 1.95 +211 1.98 +212 2.00 +213 2.01 +214 2.03 +215 2.04 +216 2.05 +217 2.07 +218 2.08 +219 2.09 +220 2.09 +221 2.09 +222 2.08 +223 2.06 +224 2.05 +225 2.02 +226 1.98 +227 1.94 +228 1.87 +229 1.79 +230 1.73 +231 1.67 +232 1.62 +233 1.55 +234 1.47 +235 1.39 +236 1.32 +237 1.25 +238 1.18 +239 1.11 +240 1.02 +241 0.96 +242 0.91 +243 0.87 +244 0.82 +245 0.78 +246 0.73 +247 0.69 +248 0.66 +249 0.63 +250 0.61 +251 0.60 +252 0.58 +253 0.56 +254 0.53 +255 0.51 +256 0.51 +257 0.50 +258 0.50 +259 0.49 +260 0.48 +261 0.47 +262 0.46 +263 0.45 +264 0.45 +265 0.44 +266 0.44 +267 0.43 +268 0.42 +269 0.42 +270 0.41 +271 0.40 +272 0.39 +273 0.39 +274 0.39 +275 0.39 +276 0.38 +277 0.38 +278 0.38 +279 0.37 +280 0.36 +281 0.36 +282 0.35 +283 0.35 +284 0.34 +285 0.33 +286 0.32 +287 0.31 +288 0.30 +289 0.30 +290 0.29 +291 0.28 +292 0.28 +293 0.27 +294 0.27 +295 0.26 +296 0.25 +297 0.24 +298 0.24 +299 0.24 +300 0.24 +301 0.24 +302 0.24 +303 0.24 +304 0.23 +305 0.23 +306 0.23 +307 0.23 +308 0.22 +309 0.22 +310 0.22 +311 0.23 +312 0.23 +313 0.23 +314 0.23 +315 0.23 +316 0.22 +317 0.22 +318 0.23 +319 0.24 +320 0.24 +321 0.24 +322 0.23 +323 0.23 +324 0.23 +325 0.23 +326 0.23 +327 0.24 +328 0.25 +329 0.25 +330 0.25 +331 0.24 +332 0.24 +333 0.23 +334 0.23 +335 0.22 +336 0.21 +337 0.21 +338 0.22 +339 0.23 +340 0.24 +341 0.24 +342 0.24 +343 0.24 +344 0.23 +345 0.22 +346 0.22 +347 0.22 +348 0.22 +349 0.22 +350 0.22 +351 0.22 +352 0.21 +353 0.21 +354 0.20 +355 0.20 +356 0.19 +357 0.20 +358 0.20 +359 0.20 +360 0.20 +361 0.20 +362 0.21 +363 0.21 +364 0.22 +365 0.22 +366 0.22 +367 0.23 +368 0.23 +369 0.24 +370 0.24 +371 0.24 +372 0.24 +373 0.24 +374 0.25 +375 0.26 +376 0.27 +377 0.29 +378 0.30 +379 0.31 +380 0.31 +381 0.32 +382 0.33 +383 0.33 +384 0.34 +385 0.35 +386 0.36 +387 0.37 +388 0.38 +389 0.39 +390 0.40 +391 0.41 +392 0.41 +393 0.42 +394 0.42 +395 0.43 +396 0.44 +397 0.46 +398 0.47 +399 0.49 +400 0.50 +401 0.52 +402 0.54 +403 0.55 +404 0.55 +405 0.56 +406 0.56 +407 0.57 +408 0.57 +409 0.56 +410 0.52 +411 0.50 +412 0.49 +413 0.49 +414 0.48 +415 0.46 +416 0.43 +417 0.42 +418 0.41 +419 0.40 +420 0.38 +421 0.36 +422 0.35 +423 0.33 +424 0.32 +425 0.32 +426 0.31 +427 0.31 +428 0.30 +429 0.30 +430 0.29 +431 0.28 +432 0.28 +433 0.27 +434 0.26 +435 0.26 +436 0.26 +437 0.25 +438 0.24 +439 0.24 +440 0.24 +441 0.23 +442 0.23 +443 0.23 +444 0.23 +445 0.23 +446 0.23 +447 0.22 +448 0.22 +449 0.21 +450 0.20 +451 0.18 +452 0.17 +453 0.17 +454 0.16 +455 0.16 +456 0.15 +457 0.15 +458 0.14 +459 0.14 +460 0.14 +461 0.13 +462 0.13 +463 0.12 +464 0.12 +465 0.12 +466 0.12 +467 0.12 +468 0.12 +469 0.12 +470 0.12 +471 0.12 +472 0.11 +473 0.10 +474 0.10 +475 0.10 +476 0.10 +477 0.10 +478 0.09 +479 0.09 +480 0.10 +481 0.11 +482 0.11 +483 0.11 +484 0.10 +485 0.10 +486 0.09 +487 0.09 +488 0.09 +489 0.08 +490 0.08 +491 0.08 +492 0.08 +493 0.08 +494 0.08 +495 0.08 +496 0.08 +497 0.08 +498 0.08 +499 0.08 +500 0.09 +501 0.09 +502 0.09 +503 0.10 +504 0.10 +505 0.10 +506 0.09 +507 0.09 +508 0.10 +509 0.10 +510 0.11 +511 0.11 +512 0.12 +513 0.12 +514 0.12 +515 0.12 +516 0.12 +517 0.13 +518 0.13 +519 0.14 +520 0.14 +521 0.14 +522 0.15 +523 0.15 +524 0.16 +525 0.17 +526 0.18 +527 0.19 +528 0.19 +529 0.20 +530 0.20 +531 0.21 +532 0.23 +533 0.24 +534 0.24 +535 0.24 +536 0.25 +537 0.26 +538 0.26 +539 0.27 +540 0.27 +541 0.28 +542 0.28 +543 0.27 +544 0.27 +545 0.28 +546 0.28 +547 0.27 +548 0.27 +549 0.27 +550 0.27 +551 0.26 +552 0.26 +553 0.25 +554 0.25 +555 0.24 +556 0.25 +557 0.25 +558 0.24 +559 0.23 +560 0.23 +561 0.23 +562 0.23 +563 0.23 +564 0.22 +565 0.22 +566 0.22 +567 0.22 +568 0.22 +569 0.22 +570 0.21 +571 0.21 +572 0.19 +573 0.18 +574 0.18 +575 0.18 +576 0.18 +577 0.18 +578 0.18 +579 0.18 +580 0.18 +581 0.17 +582 0.17 +583 0.16 +584 0.15 +585 0.15 +586 0.15 +587 0.15 +588 0.14 +589 0.14 +590 0.14 +591 0.15 +592 0.15 +593 0.15 +594 0.15 +595 0.15 +596 0.14 +597 0.14 +598 0.15 +599 0.16 +600 0.16 +601 0.16 +602 0.15 +603 0.15 +604 0.16 +605 0.16 +606 0.18 +607 0.21 +608 0.23 +609 0.25 +610 0.29 +611 0.33 +612 0.40 +613 0.48 +614 0.58 +615 0.72 +616 0.92 +617 1.20 +618 1.49 +619 1.87 +620 2.15 +621 2.15 +622 2.06 +623 1.92 +624 1.57 +625 1.11 +626 0.83 +627 0.63 +628 0.50 +629 0.42 +630 0.36 +631 0.32 +632 0.28 +633 0.26 +634 0.24 +635 0.23 +636 0.22 +637 0.21 +638 0.20 +639 0.19 +640 0.19 +641 0.20 +642 0.19 +643 0.19 +644 0.18 +645 0.16 +646 0.13 +647 0.12 +648 0.11 +649 0.10 +650 0.09 +651 0.09 +652 0.09 +653 0.09 +654 0.09 +655 0.08 +656 0.07 +657 0.07 +658 0.06 +659 0.06 +660 0.06 +661 0.05 +662 0.05 +663 0.05 +664 0.05 +665 0.05 +666 0.05 +667 0.05 +668 0.05 +669 0.05 +670 0.05 +671 0.05 +672 0.05 +673 0.04 +674 0.03 +675 0.02 +676 0.03 +677 0.04 +678 0.04 +679 0.04 +680 0.04 +681 0.04 +682 0.04 +683 0.05 +684 0.05 +685 0.05 +686 0.05 +687 0.05 +688 0.05 +689 0.06 +690 0.07 +691 0.07 +692 0.07 +693 0.07 +694 0.08 +695 0.09 +696 0.10 +697 0.11 +698 0.12 +699 0.14 +700 0.16 +701 0.18 +702 0.18 +703 0.18 +704 0.18 +705 0.18 +706 0.18 +707 0.17 +708 0.16 +709 0.15 +710 0.16 +711 0.16 +712 0.16 +713 0.15 +714 0.15 +715 0.14 +716 0.14 +717 0.14 +718 0.14 +719 0.14 +720 0.14 +721 0.14 +722 0.14 +723 0.15 +724 0.15 +725 0.15 +726 0.15 +727 0.15 +728 0.17 +729 0.19 +730 0.20 +731 0.23 +732 0.25 +733 0.27 +734 0.30 +735 0.34 +736 0.38 +737 0.42 +738 0.45 +739 0.48 +740 0.51 +741 0.55 +742 0.58 +743 0.58 +744 0.59 +745 0.60 +746 0.63 +747 0.65 +748 0.68 +749 0.71 +750 0.73 +751 0.74 +752 0.76 +753 0.79 +754 0.83 +755 0.86 +756 0.89 +757 0.91 +758 0.90 +759 0.88 +760 0.87 +761 0.86 +762 0.86 +763 0.85 +764 0.85 +765 0.84 +766 0.82 +767 0.80 +768 0.78 +769 0.76 +770 0.74 +771 0.73 +772 0.72 +773 0.72 +774 0.72 +775 0.73 +776 0.73 +777 0.74 +778 0.76 +779 0.79 +780 0.83 +781 0.88 +782 0.93 +783 0.99 +784 1.06 +785 1.13 +786 1.21 +787 1.29 +788 1.37 +789 1.44 +790 1.50 +791 1.55 +792 1.60 +793 1.63 +794 1.65 +795 1.66 +796 1.64 +797 1.61 +798 1.57 +799 1.50 +800 1.41 +801 1.33 +802 1.24 +803 1.16 +804 1.05 +805 0.96 +806 0.89 +807 0.84 +808 0.79 +809 0.74 +810 0.69 +811 0.64 +812 0.60 +813 0.56 +814 0.52 +815 0.49 +816 0.46 +817 0.42 +818 0.39 +819 0.37 +820 0.35 +821 0.33 +822 0.31 +823 0.30 +824 0.30 +825 0.31 +826 0.31 +827 0.29 +828 0.28 +829 0.29 +830 0.29 +831 0.30 +832 0.33 +833 0.35 +834 0.37 +835 0.39 +836 0.41 +837 0.43 +838 0.45 +839 0.46 +840 0.48 +841 0.48 +842 0.47 +843 0.46 +844 0.45 +845 0.44 +846 0.43 +847 0.40 +848 0.37 +849 0.36 +850 0.35 +851 0.34 +852 0.33 +853 0.32 +854 0.31 +855 0.30 +856 0.30 +857 0.30 +858 0.31 +859 0.32 +860 0.34 +861 0.34 +862 0.34 +863 0.33 +864 0.33 +865 0.33 +866 0.33 +867 0.32 +868 0.31 +869 0.32 +870 0.32 +871 0.32 +872 0.33 +873 0.33 +874 0.33 +875 0.32 +876 0.32 +877 0.32 +878 0.32 +879 0.31 +880 0.31 +881 0.31 +882 0.31 +883 0.31 +884 0.31 +885 0.31 +886 0.31 +887 0.31 +888 0.31 +889 0.32 +890 0.34 +891 0.34 +892 0.34 +893 0.35 +894 0.36 +895 0.37 +896 0.38 +897 0.41 +898 0.42 +899 0.44 +900 0.46 +901 0.47 +902 0.49 +903 0.49 +904 0.51 +905 0.51 +906 0.50 +907 0.48 +908 0.47 +909 0.44 +910 0.42 +911 0.40 +912 0.38 +913 0.36 +914 0.32 +915 0.30 +916 0.29 +917 0.27 +918 0.27 +919 0.26 +920 0.25 +921 0.24 +922 0.22 +923 0.22 +924 0.23 +925 0.23 +926 0.22 +927 0.22 +928 0.22 +929 0.22 +930 0.21 +931 0.21 +932 0.21 +933 0.21 +934 0.22 +935 0.22 +936 0.22 +937 0.22 +938 0.23 +939 0.25 +940 0.26 +941 0.26 +942 0.26 +943 0.25 +944 0.25 +945 0.25 +946 0.25 +947 0.26 +948 0.25 +949 0.25 +950 0.26 +951 0.27 +952 0.28 +953 0.28 +954 0.28 +955 0.29 +956 0.30 +957 0.31 +958 0.31 +959 0.32 +960 0.34 +961 0.36 +962 0.37 +963 0.38 +964 0.39 +965 0.39 +966 0.39 +967 0.40 +968 0.40 +969 0.41 +970 0.41 +971 0.42 +972 0.43 +973 0.45 +974 0.48 +975 0.51 +976 0.55 +977 0.59 +978 0.63 +979 0.68 +980 0.75 +981 0.81 +982 0.89 +983 0.98 +984 1.11 +985 1.29 +986 1.47 +987 1.67 +988 1.89 +989 2.15 +990 2.43 +991 2.74 +992 3.07 +993 3.52 +994 4.26 +995 5.30 +996 6.73 +997 8.76 +998 11.0 +999 14.3 +1000 16.4 +1001 16.4 +1002 16.3 +1003 15.6 +1004 12.5 +1005 9.32 +1006 6.88 +1007 4.83 +1008 3.54 +1009 2.60 +1010 2.01 +1011 1.63 +1012 1.36 +1013 1.16 +1014 1.02 +1015 0.95 +1016 0.92 +1017 0.91 +1018 0.94 +1019 0.99 +1020 1.06 +1021 1.16 +1022 1.31 +1023 1.56 +1024 1.90 +1025 2.29 +1026 2.74 +1027 3.20 +1028 3.69 +1029 4.05 +1030 4.30 +1031 4.45 +1032 4.40 +1033 4.14 +1034 3.82 +1035 3.36 +1036 2.87 +1037 2.44 +1038 2.06 +1039 1.76 +1040 1.53 +1041 1.35 +1042 1.20 +1043 1.08 +1044 0.99 +1045 0.92 +1046 0.87 +1047 0.82 +1048 0.78 +1049 0.75 +1050 0.72 +1051 0.70 +1052 0.69 +1053 0.68 +1054 0.67 +1055 0.66 +1056 0.66 +1057 0.68 +1058 0.68 +1059 0.69 +1060 0.69 +1061 0.71 +1062 0.73 +1063 0.74 +1064 0.75 +1065 0.76 +1066 0.77 +1067 0.77 +1068 0.78 +1069 0.79 +1070 0.79 +1071 0.80 +1072 0.80 +1073 0.77 +1074 0.75 +1075 0.75 +1076 0.75 +1077 0.74 +1078 0.72 +1079 0.70 +1080 0.70 +1081 0.71 +1082 0.70 +1083 0.69 +1084 0.69 +1085 0.67 +1086 0.67 +1087 0.67 +1088 0.67 +1089 0.67 +1090 0.68 +1091 0.68 +1092 0.68 +1093 0.67 +1094 0.68 +1095 0.68 +1096 0.68 +1097 0.67 +1098 0.67 +1099 0.66 +1100 0.64 +1101 0.62 +1102 0.60 +1103 0.56 +1104 0.52 +1105 0.48 +1106 0.45 +1107 0.42 +1108 0.39 +1109 0.37 +1110 0.35 +1111 0.34 +1112 0.33 +1113 0.31 +1114 0.29 +1115 0.28 +1116 0.27 +1117 0.26 +1118 0.25 +1119 0.24 +1120 0.22 +1121 0.20 +1122 0.19 +1123 0.19 +1124 0.19 +1125 0.18 +1126 0.17 +1127 0.17 +1128 0.17 +1129 0.17 +1130 0.18 +1131 0.19 +1132 0.18 +1133 0.18 +1134 0.19 +1135 0.22 +1136 0.23 +1137 0.24 +1138 0.26 +1139 0.29 +1140 0.33 +1141 0.36 +1142 0.41 +1143 0.45 +1144 0.51 +1145 0.57 +1146 0.65 +1147 0.73 +1148 0.84 +1149 0.96 +1150 1.12 +1151 1.31 +1152 1.49 +1153 1.68 +1154 1.77 +1155 1.77 +1156 1.76 +1157 1.70 +1158 1.53 +1159 1.38 +1160 1.24 +1161 1.12 +1162 1.05 +1163 0.99 +1164 0.94 +1165 0.90 +1166 0.89 +1167 0.92 +1168 0.94 +1169 0.97 +1170 1.01 +1171 1.05 +1172 1.11 +1173 1.18 +1174 1.30 +1175 1.44 +1176 1.63 +1177 1.84 +1178 2.06 +1179 2.28 +1180 2.43 +1181 2.56 +1182 2.60 +1183 2.54 +1184 2.47 +1185 2.39 +1186 2.30 +1187 2.25 +1188 2.20 +1189 2.18 +1190 2.19 +1191 2.21 +1192 2.24 +1193 2.29 +1194 2.34 +1195 2.39 +1196 2.42 +1197 2.45 +1198 2.46 +1199 2.46 +1200 2.45 +1201 2.42 +1202 2.34 +1203 2.27 +1204 2.18 +1205 2.07 +1206 1.93 +1207 1.78 +1208 1.64 +1209 1.50 +1210 1.39 +1211 1.29 +1212 1.20 +1213 1.13 +1214 1.06 +1215 0.99 +1216 0.93 +1217 0.89 +1218 0.86 +1219 0.84 +1220 0.82 +1221 0.81 +1222 0.79 +1223 0.78 +1224 0.77 +1225 0.77 +1226 0.76 +1227 0.74 +1228 0.72 +1229 0.70 +1230 0.68 +1231 0.65 +1232 0.62 +1233 0.60 +1234 0.58 +1235 0.57 +1236 0.55 +1237 0.53 +1238 0.51 +1239 0.49 +1240 0.48 +1241 0.47 +1242 0.46 +1243 0.44 +1244 0.44 +1245 0.43 +1246 0.43 +1247 0.41 +1248 0.40 +1249 0.39 +1250 0.39 +1251 0.39 +1252 0.38 +1253 0.38 +1254 0.36 +1255 0.35 +1256 0.34 +1257 0.33 +1258 0.32 +1259 0.32 +1260 0.31 +1261 0.32 +1262 0.32 +1263 0.32 +1264 0.31 +1265 0.31 +1266 0.32 +1267 0.32 +1268 0.31 +1269 0.30 +1270 0.31 +1271 0.31 +1272 0.31 +1273 0.31 +1274 0.31 +1275 0.32 +1276 0.32 +1277 0.32 +1278 0.32 +1279 0.31 +1280 0.31 +1281 0.32 +1282 0.34 +1283 0.34 +1284 0.34 +1285 0.34 +1286 0.34 +1287 0.35 +1288 0.37 +1289 0.38 +1290 0.39 +1291 0.40 +1292 0.42 +1293 0.44 +1294 0.45 +1295 0.46 +1296 0.47 +1297 0.48 +1298 0.49 +1299 0.50 +1300 0.51 +1301 0.52 +1302 0.55 +1303 0.55 +1304 0.56 +1305 0.56 +1306 0.57 +1307 0.58 +1308 0.59 +1309 0.60 +1310 0.60 +1311 0.60 +1312 0.61 +1313 0.62 +1314 0.63 +1315 0.64 +1316 0.65 +1317 0.69 +1318 0.73 +1319 0.74 +1320 0.75 +1321 0.77 +1322 0.79 +1323 0.80 +1324 0.81 +1325 0.81 +1326 0.81 +1327 0.81 +1328 0.81 +1329 0.80 +1330 0.80 +1331 0.78 +1332 0.76 +1333 0.73 +1334 0.71 +1335 0.67 +1336 0.64 +1337 0.60 +1338 0.56 +1339 0.53 +1340 0.51 +1341 0.48 +1342 0.46 +1343 0.45 +1344 0.44 +1345 0.44 +1346 0.42 +1347 0.41 +1348 0.40 +1349 0.40 +1350 0.39 +1351 0.37 +1352 0.36 +1353 0.36 +1354 0.36 +1355 0.36 +1356 0.36 +1357 0.36 +1358 0.37 +1359 0.37 +1360 0.38 +1361 0.38 +1362 0.36 +1363 0.36 +1364 0.37 +1365 0.38 +1366 0.37 +1367 0.37 +1368 0.36 +1369 0.36 +1370 0.36 +1371 0.35 +1372 0.35 +1373 0.34 +1374 0.33 +1375 0.31 +1376 0.29 +1377 0.26 +1378 0.24 +1379 0.23 +1380 0.22 +1381 0.21 +1382 0.19 +1383 0.17 +1384 0.14 +1385 0.14 +1386 0.14 +1387 0.14 +1388 0.13 +1389 0.12 +1390 0.11 +1391 0.10 +1392 0.10 +1393 0.10 +1394 0.10 +1395 0.09 +1396 0.09 +1397 0.10 +1398 0.10 +1399 0.11 +1400 0.11 +1401 0.12 +1402 0.13 +1403 0.13 +1404 0.14 +1405 0.14 +1406 0.15 +1407 0.15 +1408 0.15 +1409 0.14 +1410 0.14 +1411 0.14 +1412 0.13 +1413 0.13 +1414 0.13 +1415 0.12 +1416 0.12 +1417 0.12 +1418 0.11 +1419 0.10 +1420 0.10 +1421 0.11 +1422 0.12 +1423 0.11 +1424 0.11 +1425 0.12 +1426 0.13 +1427 0.13 +1428 0.14 +1429 0.15 +1430 0.17 +1431 0.20 +1432 0.23 +1433 0.26 +1434 0.30 +1435 0.34 +1436 0.38 +1437 0.42 +1438 0.47 +1439 0.52 +1440 0.57 +1441 0.62 +1442 0.66 +1443 0.71 +1444 0.75 +1445 0.80 +1446 0.84 +1447 0.88 +1448 0.89 +1449 0.90 +1450 0.90 +1451 0.89 +1452 0.85 +1453 0.81 +1454 0.73 +1455 0.65 +1456 0.55 +1457 0.46 +1458 0.38 +1459 0.31 +1460 0.26 +1461 0.21 +1462 0.18 +1463 0.16 +1464 0.14 +1465 0.13 +1466 0.12 +1467 0.11 +1468 0.11 +1469 0.09 +1470 0.09 +1471 0.08 +1472 0.08 +1473 0.07 +1474 0.07 +1475 0.06 +1476 0.06 +1477 0.06 +1478 0.06 +1479 0.05 +1480 0.05 +1481 0.05 +1482 0.06 +1483 0.06 +1484 0.06 +1485 0.07 +1486 0.07 +1487 0.08 +1488 0.08 +1489 0.08 +1490 0.08 +1491 0.09 +1492 0.11 +1493 0.13 +1494 0.12 +1495 0.11 +1496 0.10 +1497 0.09 +1498 0.08 +1499 0.06 +1500 0.05 +1501 0.04 +1502 0.04 +1503 0.04 +1504 0.04 +1505 0.04 +1506 0.04 +1507 0.04 +1508 0.05 +1509 0.05 +1510 0.05 +1511 0.05 +1512 0.05 +1513 0.05 +1514 0.04 +1515 0.04 +1516 0.05 +1517 0.05 +1518 0.04 +1519 0.04 +1520 0.03 +1521 0.03 +1522 0.04 +1523 0.05 +1524 0.05 +1525 0.06 +1526 0.05 +1527 0.04 +1528 0.05 +1529 0.05 +1530 0.05 +1531 0.05 +1532 0.05 +1533 0.05 +1534 0.05 +1535 0.05 +1536 0.05 +1537 0.05 +1538 0.06 +1539 0.06 +1540 0.06 +1541 0.05 +1542 0.05 +1543 0.05 +1544 0.05 +1545 0.06 +1546 0.07 +1547 0.07 +1548 0.07 +1549 0.07 +1550 0.07 +1551 0.07 +1552 0.07 +1553 0.07 +1554 0.07 +1555 0.07 +1556 0.08 +1557 0.08 +1558 0.09 +1559 0.09 +1560 0.10 +1561 0.10 +1562 0.10 +1563 0.11 +1564 0.12 +1565 0.13 +1566 0.14 +1567 0.16 +1568 0.17 +1569 0.19 +1570 0.21 +1571 0.22 +1572 0.25 +1573 0.29 +1574 0.33 +1575 0.37 +1576 0.43 +1577 0.51 +1578 0.62 +1579 0.75 +1580 0.89 +1581 1.07 +1582 1.20 +1583 1.25 +1584 1.28 +1585 1.21 +1586 1.06 +1587 0.93 +1588 0.81 +1589 0.77 +1590 0.75 +1591 0.75 +1592 0.79 +1593 0.86 +1594 0.98 +1595 1.12 +1596 1.30 +1597 1.52 +1598 1.79 +1599 2.08 +1600 2.40 +1601 2.61 +1602 2.73 +1603 2.78 +1604 2.64 +1605 2.43 +1606 2.15 +1607 1.83 +1608 1.56 +1609 1.31 +1610 1.11 +1611 0.94 +1612 0.79 +1613 0.67 +1614 0.58 +1615 0.50 +1616 0.44 +1617 0.40 +1618 0.36 +1619 0.33 +1620 0.30 +1621 0.27 +1622 0.26 +1623 0.26 +1624 0.26 +1625 0.28 +1626 0.29 +1627 0.32 +1628 0.34 +1629 0.36 +1630 0.37 +1631 0.37 +1632 0.38 +1633 0.35 +1634 0.30 +1635 0.24 +1636 0.19 +1637 0.16 +1638 0.13 +1639 0.12 +1640 0.11 +1641 0.10 +1642 0.08 +1643 0.07 +1644 0.06 +1645 0.05 +1646 0.04 +1647 0.05 +1648 0.06 +1649 0.06 +1650 0.05 +1651 0.04 +1652 0.04 +1653 0.03 +1654 0.03 +1655 0.03 +1656 0.04 +1657 0.04 +1658 0.04 +1659 0.04 +1660 0.05 +1661 0.05 +1662 0.04 +1663 0.03 +1664 0.02 +1665 0.02 +1666 0.02 +1667 0.03 +1668 0.03 +1669 0.03 +1670 0.03 +1671 0.02 +1672 0.03 +1673 0.04 +1674 0.04 +1675 0.03 +1676 0.03 +1677 0.03 +1678 0.03 +1679 0.03 +1680 0.03 +1681 0.03 +1682 0.03 +1683 0.03 +1684 0.02 +1685 0.02 +1686 0.02 +1687 0.03 +1688 0.03 +1689 0.02 +1690 0.02 +1691 0.03 +1692 0.03 +1693 0.03 +1694 0.03 +1695 0.03 +1696 0.03 +1697 0.02 +1698 0.02 +1699 0.02 +1700 0.02 +1701 0.02 +1702 0.02 +1703 0.02 +1704 0.02 +1705 0.02 +1706 0.02 +1707 0.01 +1708 0.01 +1709 0.01 +1710 0.01 +1711 0.01 +1712 0.02 +1713 0.01 +1714 0.01 +1715 0.01 +1716 0.01 +1717 0.01 +1718 0.01 +1719 0.00 +1720 0.00 +1721 0.00 +1722 0.00 +1723 0.01 +1724 0.01 +1725 0.00 +1726 0.00 +1727 0.00 +1728 0.00 +1729 0.00 +1730 0.01 +1731 0.01 +1732 0.01 +1733 0.01 +1734 0.01 +1735 0.00 +1736 0.00 +1737 0.01 +1738 0.02 +1739 0.02 +1740 0.01 +1741 0.01 +1742 0.01 +1743 0.02 +1744 0.02 +1745 0.01 +1746 0.01 +1747 0.00 +1748 0.00 +1749 0.01 +1750 0.02 +1751 0.01 +1752 0.00 +1753 0.00 +1754 0.01 +1755 0.01 +1756 0.01 +1757 0.01 +1758 0.00 +1759 0.00 +1760 0.00 +1761 0.00 +1762 0.01 +1763 0.01 +1764 0.01 +1765 0.00 +1766 0.00 +1767 0.00 +1768 0.00 +1769 0.00 +1770 0.00 +1771 0.00 +1772 0.00 +1773 0.00 +1774 0.00 +1775 0.00 +1776 0.00 +1777 0.01 +1778 0.02 +1779 0.02 +1780 0.02 +1781 0.01 +1782 0.00 +1783 0.00 +1784 0.00 +1785 0.00 +1786 0.00 +1787 0.01 +1788 0.01 +1789 0.01 +1790 0.00 +1791 0.00 +1792 0.01 +1793 0.01 +1794 0.01 +1795 0.01 +1796 0.00 +1797 0.00 +1798 0.00 +1799 0.01 +1800 0.01 +1801 0.01 +1802 0.01 +1803 0.01 +1804 0.01 +1805 0.02 +1806 0.02 +1807 0.02 +1808 0.01 +1809 0.01 +1810 0.01 +1811 0.01 +1812 0.01 +1813 0.00 +1814 0.01 +1815 0.01 +1816 0.01 +1817 0.01 +1818 0.01 +1819 0.01 +1820 0.01 +1821 0.01 +1822 0.01 +1823 0.01 +1824 0.01 +1825 0.01 +1826 0.00 +1827 0.00 +1828 0.00 +1829 0.01 +1830 0.01 +1831 0.00 +1832 0.00 +1833 0.01 +1834 0.01 +1835 0.00 +1836 0.00 +1837 0.00 +1838 0.00 +1839 0.00 +1840 0.00 +1841 0.00 +1842 0.00 +1843 0.00 +1844 0.00 +1845 0.00 +1846 0.00 +1847 0.00 +1848 0.00 +1849 0.00 +1850 -0.0 +1851 -0.0 +1852 -0.0 +1853 0.00 +1854 0.00 +1855 0.00 +1856 0.00 +1857 0.00 +1858 0.00 +1859 0.00 +1860 0.00 +1861 -0.0 +1862 -0.0 +1863 -1.1e-06 +1864 0.00 +1865 0.00 +1866 0.00 +1867 0.00 +1868 0.00 +1869 0.00 +1870 0.00 +1871 0.00 +1872 0.00 +1873 0.00 +1874 0.00 +1875 0.00 +1876 0.00 +1877 0.00 +1878 -0.0 +1879 -0.0 +1880 -0.0 +1881 -0.0 +1882 -0.0 +1883 0.00 +1884 0.00 +1885 0.00 +1886 0.00 +1887 0.00 +1888 0.00 +1889 0.00 +1890 0.00 +1891 0.00 +1892 0.00 +1893 0.01 +1894 0.01 +1895 0.00 +1896 0.00 +1897 0.00 +1898 0.00 +1899 0.00 +1900 0.00 +1901 0.00 +1902 -0.0 +1903 0.00 +1904 0.00 +1905 0.00 +1906 0.00 +1907 0.00 +1908 0.00 +1909 0.00 +1910 0.00 +1911 0.01 +1912 0.01 +1913 0.01 +1914 0.00 +1915 -0.0 +1916 0.00 +1917 0.00 +1918 0.00 +1919 0.00 +1920 0.00 +1921 0.00 +1922 0.00 +1923 0.00 +1924 0.00 +1925 0.00 +1926 0.00 +1927 0.00 +1928 0.01 +1929 0.01 +1930 0.00 +1931 0.00 +1932 0.00 +1933 0.00 +1934 0.00 +1935 0.01 +1936 0.01 +1937 0.00 +1938 0.00 +1939 0.00 +1940 0.00 +1941 0.00 +1942 0.00 +1943 0.00 +1944 -0.0 +1945 0.00 +1946 0.00 +1947 0.01 +1948 0.01 +1949 0.00 +1950 0.00 +1951 0.00 +1952 0.00 +1953 0.00 +1954 0.00 +1955 0.01 +1956 0.00 +1957 0.00 +1958 0.01 +1959 0.01 +1960 0.00 +1961 0.00 +1962 0.00 +1963 0.00 +1964 0.00 +1965 0.00 +1966 0.00 +1967 0.00 +1968 0.00 +1969 0.00 +1970 0.00 +1971 0.00 +1972 0.00 +1973 0.00 +1974 -0.0 +1975 -0.0 +1976 7.63e-05 +1977 0.00 +1978 0.00 +1979 0.00 +1980 -8.5e-05 +1981 0.00 +1982 0.00 +1983 0.00 +1984 0.00 +1985 -0.0 +1986 -0.0 +1987 0.00 +1988 0.00 +1989 7.63e-05 +1990 -0.0 +1991 -0.0 +1992 -0.0 +1993 0.00 +1994 0.00 +1995 0.00 +1996 0.00 +1997 0.00 +1998 9.46e-05 +1999 -0.0 +2000 -0.0 +2001 0.00 +2002 0.00 +2003 0.00 +2004 -0.0 +2005 -0.0 +2006 -0.0 +2007 0.00 +2008 0.01 +2009 0.01 +2010 0.00 +2011 0.00 +2012 -0.0 +2013 0.00 +2014 0.00 +2015 -0.0 +2016 0.00 +2017 0.00 +2018 0.00 +2019 0.00 +2020 0.00 +2021 0.00 +2022 -0.0 +2023 -0.0 +2024 0.00 +2025 0.00 +2026 0.00 +2027 0.00 +2028 0.00 +2029 0.00 +2030 0.00 +2031 0.00 +2032 0.00 +2033 0.00 +2034 0.00 +2035 -0.0 +2036 0.00 +2037 -0.0 +2038 -0.0 +2039 0.00 +2040 0.00 +2041 0.00 +2042 0.00 +2043 0.00 +2044 -0.0 +2045 -0.0 +2046 -0.0 +2047 4.85e-06 +2048 -0.0 +2049 -0.0 +2050 0.00 +2051 0.00 +2052 0.00 +2053 0.00 +2054 0.00 +2055 -0.0 +2056 -0.0 +2057 -0.0 +2058 -0.0 +2059 -0.0 +2060 -0.0 +2061 -0.0 +2062 0.00 +2063 2.26e-05 +2064 -0.0 +2065 4.39e-05 +2066 0.00 +2067 0.00 +2068 0.00 +2069 0.00 +2070 0.00 +2071 0.01 +2072 0.01 +2073 -0.0 +2074 0.00 +2075 0.00 +2076 0.00 +2077 -0.0 +2078 -0.0 +2079 -0.0 +2080 0.00 +2081 0.00 +2082 0.00 +2083 0.00 +2084 0.00 +2085 0.00 +2086 0.00 +2087 0.00 +2088 0.00 +2089 0.00 +2090 0.00 +2091 0.00 +2092 0.00 +2093 -0.0 +2094 -0.0 +2095 -0.0 +2096 -0.0 +2097 0.00 +2098 0.00 +2099 0.00 +2100 -0.0 +2101 -0.0 +2102 -0.0 +2103 -0.0 +2104 0.00 +2105 0.00 +2106 0.00 +2107 -0.0 +2108 -0.0 +2109 0.00 +2110 0.01 +2111 0.00 +2112 -0.0 +2113 -0.0 +2114 -0.0 +2115 0.00 +2116 0.00 +2117 3.18e-06 +2118 -0.0 +2119 -0.0 +2120 0.00 +2121 0.00 +2122 0.00 +2123 0.00 +2124 -0.0 +2125 -0.0 +2126 0.00 +2127 0.00 +2128 0.01 +2129 0.00 +2130 -0.0 +2131 -0.0 +2132 -0.0 +2133 0.00 +2134 0.00 +2135 0.00 +2136 -0.0 +2137 -0.0 +2138 0.00 +2139 0.00 +2140 -0.0 +2141 -0.0 +2142 -0.0 +2143 0.00 +2144 0.00 +2145 0.00 +2146 0.00 +2147 0.00 +2148 0.00 +2149 -0.0 +2150 -0.0 +2151 0.00 +2152 0.00 +2153 -0.0 +2154 -0.0 +2155 -0.0 +2156 0.00 +2157 0.00 +2158 0.00 +2159 0.00 +2160 0.00 +2161 0.00 +2162 0.00 +2163 -0.0 +2164 -0.0 +2165 -0.0 +2166 -0.0 +2167 0.00 +2168 0.00 +2169 0.00 +2170 0.00 +2171 -0.0 +2172 -0.0 +2173 -5.0e-05 +2174 -0.0 +2175 -0.0 +2176 -0.0 +2177 0.00 +2178 0.00 +2179 0.00 +2180 -0.0 +2181 -0.0 +2182 0.00 +2183 0.00 +2184 -0.0 +2185 -0.0 +2186 -0.0 +2187 -0.0 +2188 8.84e-05 +2189 0.00 +2190 0.00 +2191 0.00 +2192 -0.0 +2193 -0.0 +2194 0.00 +2195 0.00 +2196 0.00 +2197 0.00 +2198 -0.0 +2199 -0.0 +2200 -5.6e-06 +2201 -0.0 +2202 -0.0 +2203 0.00 +2204 0.00 +2205 0.00 +2206 0.00 +2207 -0.0 +2208 -0.0 +2209 -0.0 +2210 -0.0 +2211 -0.0 +2212 0.00 +2213 0.00 +2214 0.00 +2215 0.00 +2216 0.00 +2217 0.00 +2218 0.00 +2219 0.00 +2220 0.00 +2221 0.00 +2222 0.00 +2223 0.00 +2224 0.00 +2225 0.00 +2226 0.00 +2227 0.00 +2228 -0.0 +2229 -0.0 +2230 -0.0 +2231 -0.0 +2232 -0.0 +2233 -0.0 +2234 -0.0 +2235 -4.4e-05 +2236 0.00 +2237 0.00 +2238 0.00 +2239 -0.0 +2240 0.00 +2241 0.00 +2242 0.00 +2243 0.00 +2244 -0.0 +2245 -0.0 +2246 0.00 +2247 0.00 +2248 0.00 +2249 -0.0 +2250 -0.0 +2251 -0.0 +2252 -0.0 +2253 -0.0 +2254 -0.0 +2255 -0.0 +2256 -0.0 +2257 0.00 +2258 0.00 +2259 0.00 +2260 0.00 +2261 0.00 +2262 -0.0 +2263 -0.0 +2264 0.00 +2265 0.00 +2266 -6.9e-05 +2267 -0.0 +2268 -0.0 +2269 0.00 +2270 0.00 +2271 0.00 +2272 0.00 +2273 0.00 +2274 0.00 +2275 0.00 +2276 0.00 +2277 0.00 +2278 0.00 +2279 0.00 +2280 0.00 +2281 -0.0 +2282 -0.0 +2283 -0.0 +2284 -0.0 +2285 -0.0 +2286 -0.0 +2287 -0.0 +2288 -0.0 +2289 -0.0 +2290 0.00 +2291 0.00 +2292 -0.0 +2293 0.00 +2294 0.00 +2295 -0.0 +2296 -0.0 +2297 -0.0 +2298 -0.0 +2299 -0.0 +2300 -0.0 +2301 -0.0 +2302 -0.0 +2303 -0.0 +2304 -0.0 +2305 -0.0 +2306 -0.0 +2307 -0.0 +2308 -0.0 +2309 0.01 +2310 0.01 +2311 -0.0 +2312 0.00 +2313 0.00 +2314 0.00 +2315 -0.0 +2316 -0.0 +2317 -0.0 +2318 -0.0 +2319 0.00 +2320 0.00 +2321 0.00 +2322 0.00 +2323 0.00 +2324 0.00 +2325 -0.0 +2326 -0.0 +2327 -0.0 +2328 0.00 +2329 0.00 +2330 -0.0 +2331 -0.0 +2332 -0.0 +2333 0.00 +2334 0.00 +2335 -0.0 +2336 -0.0 +2337 -0.0 +2338 0.00 +2339 0.00 +2340 0.00 +2341 0.00 +2342 0.00 +2343 0.00 +2344 -0.0 +2345 -0.0 +2346 0.00 +2347 0.00 +2348 0.00 +2349 0.00 +2350 0.00 +2351 0.00 +2352 0.00 +2353 0.00 +2354 0.00 +2355 0.00 +2356 0.01 +2357 0.00 +2358 0.00 +2359 -0.0 +2360 -0.0 +2361 0.00 +2362 0.00 +2363 -0.0 +2364 0.00 +2365 0.01 +2366 0.00 +2367 0.00 +2368 0.00 +2369 0.00 +2370 -3.4e-05 +2371 -0.0 +2372 0.00 +2373 0.00 +2374 0.00 +2375 0.00 +2376 0.00 +2377 0.00 +2378 0.00 +2379 0.00 +2380 0.00 +2381 0.00 +2382 9.06e-05 +2383 0.00 +2384 0.00 +2385 0.00 +2386 0.00 +2387 -0.0 +2388 -2.9e-05 +2389 -0.0 diff --git a/tests/spectrum/creators/test_from_stream.py b/tests/spectrum/creators/test_from_stream.py index 0d7cb411..1b23d493 100644 --- a/tests/spectrum/creators/test_from_stream.py +++ b/tests/spectrum/creators/test_from_stream.py @@ -11,7 +11,7 @@ def test_from_stream(experimental_filename): print('skip', ft) return print(ft) - if ft not in {'spe'}: + if ft not in {'spe', 'tsv'}: with open(experimental_filename, 'rb') as fp: spe = rc2.spectrum.from_stream(fp, filetype=ft, backend='rc1_parser') assert len(spe.x) > 10 From 57d0cf607a307b974f90f220aa775cf46641778b Mon Sep 17 00:00:00 2001 From: Georgi Georgiev Date: Thu, 16 Jan 2025 12:33:45 +0200 Subject: [PATCH 2/2] no darksubtracted --- src/ramanchada2/io/experimental/read_txt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ramanchada2/io/experimental/read_txt.py b/src/ramanchada2/io/experimental/read_txt.py index 6af276fe..bae671a3 100644 --- a/src/ramanchada2/io/experimental/read_txt.py +++ b/src/ramanchada2/io/experimental/read_txt.py @@ -40,7 +40,8 @@ def read_txt(data_in: TextIO) -> Tuple[NDArray, NDArray, Dict]: data, meta = lightnovo_tsv(lines) positions = data['Position'].to_numpy() intensities = data['Amplitude'].to_numpy() - meta['@signal'] = 'DarkSubtracted' + meta['@axes'] = [''] + meta['@signal'] = '' else: # assume two column spectrum meta = dict() if lines[0].startswith('#'):