Loading drtsans/dataobjects.py +6 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,7 @@ def save_iqmod( sep=" ", float_format="%.6E", skip_nan=True, header_type=HeaderType.PANDAS.value, header_type=HeaderType.MANTID_ASCII.value, ): r""" Write the ~drtsans.dataobjects.IQmod object into an ASCII file. Loading @@ -577,6 +577,11 @@ def save_iqmod( Format string for floating point numbers. skip_nan: bool If true, any data point where intensity is NAN will not be written to file header: text Determine the header type to make 1D data compatible with panda or Mantid possible values: HeaderType.MANTID_ASCII.value HeaderType.PANDAS.value """ if header_type == HeaderType.MANTID_ASCII.value: from drtsans.save_ascii import save_ascii_binned_1D Loading tests/unit/new/drtsans/test_dataobjects.py +2 −2 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ def test_save_load_iqmod_pandas(): iq = IQmod([1, 2, 3, np.nan], [4, 5, 6, 0], [7, 8, 9, 0]) filename = tempfile.NamedTemporaryFile("wb", suffix=".dat").name # Save save_iqmod(iq, filename) save_iqmod(iq, filename, header_type="Pandas") # Load iq_other = load_iqmod(filename) # Verify Loading Loading @@ -283,7 +283,7 @@ def test_save_load_iqmod_dq(): filename = tempfile.NamedTemporaryFile("wb", suffix=".dat").name # Save save_iqmod(iq, filename) save_iqmod(iq, filename, header_type="Pandas") # Load iq_other = load_iqmod(filename) # Verify Loading Loading
drtsans/dataobjects.py +6 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,7 @@ def save_iqmod( sep=" ", float_format="%.6E", skip_nan=True, header_type=HeaderType.PANDAS.value, header_type=HeaderType.MANTID_ASCII.value, ): r""" Write the ~drtsans.dataobjects.IQmod object into an ASCII file. Loading @@ -577,6 +577,11 @@ def save_iqmod( Format string for floating point numbers. skip_nan: bool If true, any data point where intensity is NAN will not be written to file header: text Determine the header type to make 1D data compatible with panda or Mantid possible values: HeaderType.MANTID_ASCII.value HeaderType.PANDAS.value """ if header_type == HeaderType.MANTID_ASCII.value: from drtsans.save_ascii import save_ascii_binned_1D Loading
tests/unit/new/drtsans/test_dataobjects.py +2 −2 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ def test_save_load_iqmod_pandas(): iq = IQmod([1, 2, 3, np.nan], [4, 5, 6, 0], [7, 8, 9, 0]) filename = tempfile.NamedTemporaryFile("wb", suffix=".dat").name # Save save_iqmod(iq, filename) save_iqmod(iq, filename, header_type="Pandas") # Load iq_other = load_iqmod(filename) # Verify Loading Loading @@ -283,7 +283,7 @@ def test_save_load_iqmod_dq(): filename = tempfile.NamedTemporaryFile("wb", suffix=".dat").name # Save save_iqmod(iq, filename) save_iqmod(iq, filename, header_type="Pandas") # Load iq_other = load_iqmod(filename) # Verify Loading