Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to retrieve inherited object data implementation in nce.py #30

Merged
merged 10 commits into from
Jul 26, 2023

Conversation

Omnistic
Copy link
Contributor

@Omnistic Omnistic commented Jul 24, 2023

Proposed change

Type of change

  • Example (a notebook demonstrating how to use ZOSPy for a specific application)
  • Bugfix (non-breaking change which fixes an issue)
  • New analysis (a wrapper around an OpticStudio analysis)
  • New feature (other than an analysis)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • Python version: 3.10.9
  • OpticStudio version: 2023 R1.03

Related issues

Checklist

  • I have followed the contribution guidelines
  • The code has been linted, formatted and tested locally using tox.
  • Local tests pass. Please fix any problems before opening a PR. If this is not possible, specify what doesn't work and why you can't fix it.
  • I added new tests for any features contributed, or updated existing tests.
  • I updated CHANGELOG.md with my changes (except for refactorings and changes in the documentation).

If you contributed an analysis:

  • I did not use AttrDicts for the analysis result data (please use dataclasses instead).

If you contributed an example:

  • I contributed my example as a Jupyter notebook.

Copy link
Collaborator

@crnh crnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to my comments, please resolve the issues pointed out by the checks. Most of them can be fixed automatically using tox (see the contribution guidelines for more information).

The 2nd, 3rd and 4th items of the PR checklist apply for this PR (but I can imagine you are still working on those, since this PR was submitted only recently).

zospy/functions/nce.py Outdated Show resolved Hide resolved
zospy/functions/nce.py Outdated Show resolved Hide resolved
zospy/functions/nce.py Outdated Show resolved Hide resolved
@Omnistic
Copy link
Contributor Author

Hi @crnh,

Regarding the tox stuff, could you give me more details on how to use it? At the moment, I only know how to make pull requests by modifying the files through GitHub UI on my fork in my browser. I'm pretty sure its very archaic, but that's all I know. I did install tox, but I don't even know how to use my own fork to connect the ZOSAPI.

Take care,

David

@crnh
Copy link
Collaborator

crnh commented Jul 24, 2023

Hi @Omnistic,

Sure! In order to run the unit tests etc., you need to clone the repository to your local file system. You can find instructions for that when you click the green "code" button in your fork. Many editors (e.g. VS Code) also offer an option to clone a git repository, which is even easier.

Once the repository has been cloned to your PC, you can run the tox command in the repository folder. tox should then automatically detect the tox.ini file and setup a virtual environment with all dependencies needed for testing. More information can be found here. By default a standalone connection is used.

Feel free to ask us any questions if anything is unclear!

@Omnistic
Copy link
Contributor Author

Omnistic commented Jul 26, 2023

Hi @crnh,

The short story is that tox failed, but is quite cryptic for me to read.

The long story is that I cloned my fork of the repository, from which I made the pull request, using Sourcetree. I then opened a CMD.exe prompt from Anaconda Navigator (Windows) from an environment, in which I installed tox (that environment also has ZOSPy, I hope its not a problem). From that command prompt, I navigated to my local cloned repository and executed tox.

There's a lot of text, perhaps the relevant part is this one:

36 failed, 113 passed, 33 skipped in 666.55s (0:11:06)

There seem to be a lot of UnicodeDecodeError when I browse through the text. Can you advise on what to do next?

Sorry I'm a bit clueless at this point.

Take care,

David

@crnh
Copy link
Collaborator

crnh commented Jul 26, 2023

Hi,

Thanks for the update! Sounds like it was a good idea to run the unit tests, as some of them are failing. I do not expect this to be related to your contribution. Can you please share the full tox output (either by pasting it here or by using a pastebin)? Then I can check what's causing this issue.

@crnh
Copy link
Collaborator

crnh commented Jul 26, 2023

Regarding your setup: installing tox in an environment with ZOSPy installed should be fine, as tox creates its own environment in which it runs the tests.

@Omnistic
Copy link
Contributor Author

Omnistic commented Jul 26, 2023

Show test output
(Refractometer) E:\Local_ZOSPy_For_PR>tox
format: commands[0]> isort .
Skipped 2 files
format: commands[1]> black .
All done! ✨ 🍰 ✨
131 files left unchanged.
format: OK ✔ in 2.75 seconds
lint: commands[0]> ruff zospy
lint: OK ✔ in 0.09 seconds
py39-standalone-legacy-zpcoreonly: skipped because could not find python interpreter with spec(s): py39
py39-standalone-legacy-zpcoreonly: SKIP ⚠ in 0.41 seconds
py39-standalone: skipped because could not find python interpreter with spec(s): py39
py39-standalone: SKIP ⚠ in 0.02 seconds
.pkg: _optional_hooks> python "C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\site-packages\pyproject_api\_backend.py" True flit_core.buildapi
.pkg: get_requires_for_build_sdist> python "C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\site-packages\pyproject_api\_backend.py" True flit_core.buildapi
.pkg: build_sdist> python "C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\site-packages\pyproject_api\_backend.py" True flit_core.buildapi
py310-standalone-legacy-zpcoreonly: install_package> python -I -m pip install --force-reinstall --no-deps E:\Local_ZOSPy_For_PR\.tox\.tmp\package\5\zospy-1.1.0.tar.gz
py310-standalone-legacy-zpcoreonly: commands[0]> pytest tests/test_zpcore.py --legacy-connection-setup
================================================= test session starts =================================================
platform win32 -- Python 3.10.9, pytest-7.4.0, pluggy-1.2.0
cachedir: .tox\py310-standalone-legacy-zpcoreonly\.pytest_cache
rootdir: E:\Local_ZOSPy_For_PR
configfile: pyproject.toml
collected 14 items

tests\test_zpcore.py sss..........s                                                                              [100%]

=========================================== 10 passed, 4 skipped in 46.23s ============================================
py310-standalone-legacy-zpcoreonly: OK ✔ in 52.94 seconds
py310-standalone: install_package> python -I -m pip install --force-reinstall --no-deps E:\Local_ZOSPy_For_PR\.tox\.tmp\package\6\zospy-1.1.0.tar.gz
py310-standalone: commands[0]> pytest tests
================================================= test session starts =================================================
platform win32 -- Python 3.10.9, pytest-7.4.0, pluggy-1.2.0
cachedir: .tox\py310-standalone\.pytest_cache
rootdir: E:\Local_ZOSPy_For_PR
configfile: pyproject.toml
collected 182 items

tests\test_zpcore.py sss..........s                                                                              [  7%]
tests\analyses\test_base.py .........                                                                            [ 12%]
tests\analyses\test_mtf.py ....ss.......                                                                         [ 19%]
tests\analyses\test_polarization.py FssssFFFFFsssssFFFFF..                                                       [ 31%]
tests\analyses\test_psf.py ..s.                                                                                  [ 34%]
tests\analyses\test_raysandspots.py FFsssFFF..sssFFF                                                             [ 42%]
tests\analyses\test_reports.py FFFFsFF.sFFFFFsF                                                                  [ 51%]
tests\analyses\test_surface.py ..ssssss......                                                                    [ 59%]
tests\analyses\test_viewers.py .....                                                                             [ 62%]
tests\analyses\test_wavefront.py FFssFF                                                                          [ 65%]
tests\api\test_constants.py .......                                                                              [ 69%]
tests\functions\test_lde.py .......                                                                              [ 73%]
tests\functions\test_nce.py .......                                                                              [ 76%]
tests\utils\test_pyutils.py .........................................F                                           [100%]

====================================================== FAILURES =======================================================
____________________________ TestPolarizationPupilMap.test_can_run_polarization_pupil_map _____________________________

self = <tests.analyses.test_polarization.TestPolarizationPupilMap object at 0x000001B76A124A60>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E70D360>

    def test_can_run_polarization_pupil_map(self, polarized_system):
>       result = polarization_pupil_map(polarized_system)

tests\analyses\test_polarization.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:179: in polarization_pupil_map
    df = pd.read_csv(
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:912: in read_csv
    return _read(filepath_or_buffer, kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:577: in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1407: in __init__
    self._engine = self._make_engine(f, self.engine)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1679: in _make_engine
    return mapping[engine](f, **self.options)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py:93: in __init__
    self._reader = parsers.TextReader(src, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pandas.errors.EmptyDataError: No columns to parse from file

pandas\_libs\parsers.pyx:557: EmptyDataError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________ TestPolarizationPupilMap.test_polarization_pupil_map_matches_reference_data[1-0-0-0-Image-11x11] ___________

self = <tests.analyses.test_polarization.TestPolarizationPupilMap object at 0x000001B76A126950>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F33E3E0>, jx = 1, jy = 0, x_phase = 0
y_phase = 0, surface = 'Image', sampling = '11x11'
reference_data = 'AnalysisType': 'PolarizationPupilMap'
'CgfOutFile': 'REDACTED'
'Data': PupilMapData(Header='Polarization Pupil Map Da...face        Image
Sampling       11x11
Add Configs
Sub Configs
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "jx,jy,x_phase,y_phase,surface,sampling",
        [
            (1, 0, 0, 0, "Image", "11x11"),
            (1, 1, 0, 0, 2, "11x11"),
            (0, 1, 0, 0, "Image", "11x11"),
            (1, 1, 45, 90, "Image", "17x17"),
        ],
    )
    def test_polarization_pupil_map_matches_reference_data(
        self, polarized_system, jx, jy, x_phase, y_phase, surface, sampling, reference_data
    ):
>       result = polarization_pupil_map(polarized_system, jx, jy, x_phase, y_phase, surface=surface, sampling=sampling)

tests\analyses\test_polarization.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:179: in polarization_pupil_map
    df = pd.read_csv(
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:912: in read_csv
    return _read(filepath_or_buffer, kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:577: in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1407: in __init__
    self._engine = self._make_engine(f, self.engine)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1679: in _make_engine
    return mapping[engine](f, **self.options)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py:93: in __init__
    self._reader = parsers.TextReader(src, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pandas.errors.EmptyDataError: No columns to parse from file

pandas\_libs\parsers.pyx:557: EmptyDataError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
____________ TestPolarizationPupilMap.test_polarization_pupil_map_matches_reference_data[1-1-0-0-2-11x11] _____________

self = <tests.analyses.test_polarization.TestPolarizationPupilMap object at 0x000001B76A1269E0>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76B77E680>, jx = 1, jy = 1, x_phase = 0
y_phase = 0, surface = 2, sampling = '11x11'
reference_data = 'AnalysisType': 'PolarizationPupilMap'
'CgfOutFile': 'REDACTED'
'Data': PupilMapData(Header='Polarization Pupil Map Da...face            2
Sampling       11x11
Add Configs
Sub Configs
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "jx,jy,x_phase,y_phase,surface,sampling",
        [
            (1, 0, 0, 0, "Image", "11x11"),
            (1, 1, 0, 0, 2, "11x11"),
            (0, 1, 0, 0, "Image", "11x11"),
            (1, 1, 45, 90, "Image", "17x17"),
        ],
    )
    def test_polarization_pupil_map_matches_reference_data(
        self, polarized_system, jx, jy, x_phase, y_phase, surface, sampling, reference_data
    ):
>       result = polarization_pupil_map(polarized_system, jx, jy, x_phase, y_phase, surface=surface, sampling=sampling)

tests\analyses\test_polarization.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:179: in polarization_pupil_map
    df = pd.read_csv(
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:912: in read_csv
    return _read(filepath_or_buffer, kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:577: in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1407: in __init__
    self._engine = self._make_engine(f, self.engine)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1679: in _make_engine
    return mapping[engine](f, **self.options)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py:93: in __init__
    self._reader = parsers.TextReader(src, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pandas.errors.EmptyDataError: No columns to parse from file

pandas\_libs\parsers.pyx:557: EmptyDataError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________ TestPolarizationPupilMap.test_polarization_pupil_map_matches_reference_data[0-1-0-0-Image-11x11] ___________

self = <tests.analyses.test_polarization.TestPolarizationPupilMap object at 0x000001B76A126A70>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F2BC8E0>, jx = 0, jy = 1, x_phase = 0
y_phase = 0, surface = 'Image', sampling = '11x11'
reference_data = 'AnalysisType': 'PolarizationPupilMap'
'CgfOutFile': 'REDACTED'
'Data': PupilMapData(Header='Polarization Pupil Map Da...face        Image
Sampling       11x11
Add Configs
Sub Configs
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "jx,jy,x_phase,y_phase,surface,sampling",
        [
            (1, 0, 0, 0, "Image", "11x11"),
            (1, 1, 0, 0, 2, "11x11"),
            (0, 1, 0, 0, "Image", "11x11"),
            (1, 1, 45, 90, "Image", "17x17"),
        ],
    )
    def test_polarization_pupil_map_matches_reference_data(
        self, polarized_system, jx, jy, x_phase, y_phase, surface, sampling, reference_data
    ):
>       result = polarization_pupil_map(polarized_system, jx, jy, x_phase, y_phase, surface=surface, sampling=sampling)

tests\analyses\test_polarization.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:172: in polarization_pupil_map
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F2BC1F0>
input = b'Polarization Pupil Map Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: \r\...   0.0000000\t   0.0000000\r\n 1.000\t 0.000\t 0.000000000\t 0.000000000\t 0.000000000\t   0.0000000\t   0.0000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 6900: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_________ TestPolarizationPupilMap.test_polarization_pupil_map_matches_reference_data[1-1-45-90-Image-17x17] __________

self = <tests.analyses.test_polarization.TestPolarizationPupilMap object at 0x000001B76A126B00>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E70F610>, jx = 1, jy = 1, x_phase = 45
y_phase = 90, surface = 'Image', sampling = '17x17'
reference_data = 'AnalysisType': 'PolarizationPupilMap'
'CgfOutFile': 'REDACTED'
'Data': PupilMapData(Header='Polarization Pupil Map Da...face        Image
Sampling       17x17
Add Configs
Sub Configs
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "jx,jy,x_phase,y_phase,surface,sampling",
        [
            (1, 0, 0, 0, "Image", "11x11"),
            (1, 1, 0, 0, 2, "11x11"),
            (0, 1, 0, 0, "Image", "11x11"),
            (1, 1, 45, 90, "Image", "17x17"),
        ],
    )
    def test_polarization_pupil_map_matches_reference_data(
        self, polarized_system, jx, jy, x_phase, y_phase, surface, sampling, reference_data
    ):
>       result = polarization_pupil_map(polarized_system, jx, jy, x_phase, y_phase, surface=surface, sampling=sampling)

tests\analyses\test_polarization.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:179: in polarization_pupil_map
    df = pd.read_csv(
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:912: in read_csv
    return _read(filepath_or_buffer, kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:577: in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1407: in __init__
    self._engine = self._make_engine(f, self.engine)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1679: in _make_engine
    return mapping[engine](f, **self.options)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py:93: in __init__
    self._reader = parsers.TextReader(src, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pandas.errors.EmptyDataError: No columns to parse from file

pandas\_libs\parsers.pyx:557: EmptyDataError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_____________________________________ TestTransmission.test_can_run_transmission ______________________________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A126BC0>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F406170>

    def test_can_run_transmission(self, polarized_system):
>       result = transmission(polarized_system)

tests\analyses\test_polarization.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:370: in transmission
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F4075B0>
input = b'Polarization Transmission Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: ...\r\n   2 \t    0.960000 \t    0.960000\r\n   3 \t    0.921600 \t    0.960000\r\n   4 \t    0.921600 \t    1.000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 730: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestTransmission.test_transmission_matches_reference_data[32x32-False-1-0-0-0] ____________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A127AC0>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F24A1A0>, sampling = '32x32'
unpolarized = False, jx = 1, jy = 0, x_phase = 0, y_phase = 0
reference_data = 'AnalysisType': 'Transmission'
'CgfOutFile': 'REDACTED'
'Data': TransmissionData(Header='Polarization Transmission Dat...                1
Jy                 0
X-Phase            0
Y-Phase            0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "sampling,unpolarized,jx,jy,x_phase,y_phase",
        [
            ("32x32", False, 1, 0, 0, 0),
            ("32x32", False, 0, 1, 0, 0),
            ("32x32", False, 1, 1, 0, 0),
            ("64x64", False, 1, 1, 45, 90),
            ("64x64", True, 1, 0, 0, 0),
        ],
    )
    def test_transmission_matches_reference_data(
        self, polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase, reference_data
    ):
>       result = transmission(polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase)

tests\analyses\test_polarization.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:370: in transmission
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F33EB30>
input = b'Polarization Transmission Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: ...\r\n   2 \t    0.960000 \t    0.960000\r\n   3 \t    0.921600 \t    0.960000\r\n   4 \t    0.921600 \t    1.000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 730: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestTransmission.test_transmission_matches_reference_data[32x32-False-0-1-0-0] ____________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A127B50>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F2BCB20>, sampling = '32x32'
unpolarized = False, jx = 0, jy = 1, x_phase = 0, y_phase = 0
reference_data = 'AnalysisType': 'Transmission'
'CgfOutFile': 'REDACTED'
'Data': TransmissionData(Header='Polarization Transmission Dat...                0
Jy                 1
X-Phase            0
Y-Phase            0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "sampling,unpolarized,jx,jy,x_phase,y_phase",
        [
            ("32x32", False, 1, 0, 0, 0),
            ("32x32", False, 0, 1, 0, 0),
            ("32x32", False, 1, 1, 0, 0),
            ("64x64", False, 1, 1, 45, 90),
            ("64x64", True, 1, 0, 0, 0),
        ],
    )
    def test_transmission_matches_reference_data(
        self, polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase, reference_data
    ):
>       result = transmission(polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase)

tests\analyses\test_polarization.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:370: in transmission
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F2BD0C0>
input = b'Polarization Transmission Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: ...\r\n   2 \t    0.000000 \t    0.000000\r\n   3 \t    0.000000 \t    0.000000\r\n   4 \t    0.000000 \t    0.000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 730: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestTransmission.test_transmission_matches_reference_data[32x32-False-1-1-0-0] ____________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A127BE0>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F404130>, sampling = '32x32'
unpolarized = False, jx = 1, jy = 1, x_phase = 0, y_phase = 0
reference_data = 'AnalysisType': 'Transmission'
'CgfOutFile': 'REDACTED'
'Data': TransmissionData(Header='Polarization Transmission Dat...                1
Jy                 1
X-Phase            0
Y-Phase            0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "sampling,unpolarized,jx,jy,x_phase,y_phase",
        [
            ("32x32", False, 1, 0, 0, 0),
            ("32x32", False, 0, 1, 0, 0),
            ("32x32", False, 1, 1, 0, 0),
            ("64x64", False, 1, 1, 45, 90),
            ("64x64", True, 1, 0, 0, 0),
        ],
    )
    def test_transmission_matches_reference_data(
        self, polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase, reference_data
    ):
>       result = transmission(polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase)

tests\analyses\test_polarization.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:370: in transmission
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F4066E0>
input = b'Polarization Transmission Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: ...\r\n   2 \t    0.480000 \t    0.480000\r\n   3 \t    0.460800 \t    0.960000\r\n   4 \t    0.460800 \t    1.000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 730: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________________ TestTransmission.test_transmission_matches_reference_data[64x64-False-1-1-45-90] ___________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A127C70>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F33C1C0>, sampling = '64x64'
unpolarized = False, jx = 1, jy = 1, x_phase = 45, y_phase = 90
reference_data = 'AnalysisType': 'Transmission'
'CgfOutFile': 'REDACTED'
'Data': TransmissionData(Header='Polarization Transmission Dat...                1
Jy                 1
X-Phase           45
Y-Phase           90
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "sampling,unpolarized,jx,jy,x_phase,y_phase",
        [
            ("32x32", False, 1, 0, 0, 0),
            ("32x32", False, 0, 1, 0, 0),
            ("32x32", False, 1, 1, 0, 0),
            ("64x64", False, 1, 1, 45, 90),
            ("64x64", True, 1, 0, 0, 0),
        ],
    )
    def test_transmission_matches_reference_data(
        self, polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase, reference_data
    ):
>       result = transmission(polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase)

tests\analyses\test_polarization.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:370: in transmission
    text_output = f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F33EBC0>
input = b'Polarization Transmission Data\r\n\r\nFile : C:\\Users\\David Nguyen\\Documents\\Zemax\\SAMPLES\\LENS.zos\r\nTitle: ...\r\n   2 \t    0.480000 \t    0.480000\r\n   3 \t    0.460800 \t    0.960000\r\n   4 \t    0.460800 \t    1.000000\r\n'
final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 730: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
____________________ TestTransmission.test_transmission_matches_reference_data[64x64-True-1-0-0-0] ____________________

self = <tests.analyses.test_polarization.TestTransmission object at 0x000001B76A127D00>
polarized_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F3296C0>, sampling = '64x64', unpolarized = True
jx = 1, jy = 0, x_phase = 0, y_phase = 0
reference_data = 'AnalysisType': 'Transmission'
'CgfOutFile': 'REDACTED'
'Data': TransmissionData(Header='Polarization Transmission Dat...                1
Jy                 0
X-Phase            0
Y-Phase            0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "sampling,unpolarized,jx,jy,x_phase,y_phase",
        [
            ("32x32", False, 1, 0, 0, 0),
            ("32x32", False, 0, 1, 0, 0),
            ("32x32", False, 1, 1, 0, 0),
            ("64x64", False, 1, 1, 45, 90),
            ("64x64", True, 1, 0, 0, 0),
        ],
    )
    def test_transmission_matches_reference_data(
        self, polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase, reference_data
    ):
>       result = transmission(polarized_system, sampling, unpolarized, jx, jy, x_phase, y_phase)

tests\analyses\test_polarization.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\polarization.py:377: in transmission
    df = pd.read_csv(
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:912: in read_csv
    return _read(filepath_or_buffer, kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:577: in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1407: in __init__
    self._engine = self._make_engine(f, self.engine)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\readers.py:1679: in _make_engine
    return mapping[engine](f, **self.options)
.tox\py310-standalone\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py:93: in __init__
    self._reader = parsers.TextReader(src, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pandas.errors.EmptyDataError: No columns to parse from file

pandas\_libs\parsers.pyx:557: EmptyDataError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________________________________ TestSingleRayTrace.test_can_run_single_ray_trace ___________________________________

self = <tests.analyses.test_raysandspots.TestSingleRayTrace object at 0x000001B76A14D360>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E777160>

    def test_can_run_single_ray_trace(self, simple_system):
>       result = single_ray_trace(simple_system)

tests\analyses\test_raysandspots.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\raysandspots.py:169: in single_ray_trace
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\raysandspots.py:169: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76E775360>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________________________________ TestSingleRayTrace.test_to_json ___________________________________________

self = <tests.analyses.test_raysandspots.TestSingleRayTrace object at 0x000001B76A14D3C0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F33C760>

    def test_to_json(self, simple_system):
>       result = single_ray_trace(simple_system)

tests\analyses\test_raysandspots.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\raysandspots.py:169: in single_ray_trace
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\raysandspots.py:169: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F248D60>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________ TestSingleRayTrace.test_single_ray_trace_matches_reference_data[1-1-0-0-DirectionCosines-False] ___________

self = <tests.analyses.test_raysandspots.TestSingleRayTrace object at 0x000001B76A14E1D0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F2BFA90>, hx = 1, hy = 1, px = 0, py = 0
raytrace_type = 'DirectionCosines', global_coordinates = False
reference_data = 'AnalysisType': 'RayTrace'
'Data':
  'Header': 'Ray Trace Data'
  'ParaxialRayTraceData':   Surf  X-coordinate  Y-coor... All
Type                 DirectionCosines
GlobalCoordinates               False
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "hx,hy,px,py,raytrace_type,global_coordinates",
        [
            (1, 1, 0, 0, "DirectionCosines", False),
            (0, 0, 1, 1, "DirectionCosines", True),
            (1, 1, 0, 0, "TangentAngle", True),
        ],
    )
    def test_single_ray_trace_matches_reference_data(
        self, simple_system, hx, hy, px, py, raytrace_type, global_coordinates, reference_data
    ):
>       result = single_ray_trace(
            simple_system,
            hx=hx,
            hy=hy,
            px=px,
            py=py,
            raytrace_type=raytrace_type,
            global_coordinates=global_coordinates,
        )

tests\analyses\test_raysandspots.py:61:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\raysandspots.py:169: in single_ray_trace
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\raysandspots.py:169: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F2BEB90>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________ TestSingleRayTrace.test_single_ray_trace_matches_reference_data[0-0-1-1-DirectionCosines-True] ____________

self = 'Header': '慒⁹牔捡\u2065慄慴\u0a0d\u0a0d楆敬㨠䌠尺獕牥屳慄楶\u2064李祵湥䑜捯浵湥獴婜浥硡卜䵁䱐卅䱜久\u2e53潺൳吊瑩敬›\u0a0d慄整㨠㈠⼶㜰㈯㈰ളഊഊ唊楮獴†††㨠\u2009楍汬浩瑥牥ॳ\u...73慢正\u0a0d†ऴ††⸱㠹〰〰〰〰ⵅ㌰\u2009†⸱㠹〰〰〰〰ⵅ㌰\u2009†⸲㜰㈹〰〰〰⭅\u3130\u2009ⴠ⸰㐰㐹ㄶ㠸\u3130\u2009ⴠ⸰㐰㐹ㄶ㠸\u3130\u2009†⸰㤹㔷〵㈵㐲\u2009\u0a0d'
name = 'ParaxialRayTraceData'

    def __getattr__(self, name):
        try:
>           return self[name]
E           KeyError: 'ParaxialRayTraceData'

zospy\analyses\base.py:204: KeyError

During handling of the above exception, another exception occurred:

self = <tests.analyses.test_raysandspots.TestSingleRayTrace object at 0x000001B76A14E260>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76B77DF30>, hx = 0, hy = 0, px = 1, py = 1
raytrace_type = 'DirectionCosines', global_coordinates = True
reference_data = 'AnalysisType': 'RayTrace'
'Data':
  'Header': 'Ray Trace Data'
  'ParaxialRayTraceData':   Surf  X-coordinate  Y-coor... All
Type                 DirectionCosines
GlobalCoordinates                True
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "hx,hy,px,py,raytrace_type,global_coordinates",
        [
            (1, 1, 0, 0, "DirectionCosines", False),
            (0, 0, 1, 1, "DirectionCosines", True),
            (1, 1, 0, 0, "TangentAngle", True),
        ],
    )
    def test_single_ray_trace_matches_reference_data(
        self, simple_system, hx, hy, px, py, raytrace_type, global_coordinates, reference_data
    ):
        result = single_ray_trace(
            simple_system,
            hx=hx,
            hy=hy,
            px=px,
            py=py,
            raytrace_type=raytrace_type,
            global_coordinates=global_coordinates,
        )

        assert np.allclose(
            result.Data.ParaxialRayTraceData.select_dtypes(float),
            reference_data.Data.ParaxialRayTraceData.select_dtypes(float),
            equal_nan=True,
>       )

tests\analyses\test_raysandspots.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = 'Header': '慒⁹牔捡\u2065慄慴\u0a0d\u0a0d楆敬㨠䌠尺獕牥屳慄楶\u2064李祵湥䑜捯浵湥獴婜浥硡卜䵁䱐卅䱜久\u2e53潺൳吊瑩敬›\u0a0d慄整㨠㈠⼶㜰㈯㈰ളഊഊ唊楮獴†††㨠\u2009楍汬浩瑥牥ॳ\u...73慢正\u0a0d†ऴ††⸱㠹〰〰〰〰ⵅ㌰\u2009†⸱㠹〰〰〰〰ⵅ㌰\u2009†⸲㜰㈹〰〰〰⭅\u3130\u2009ⴠ⸰㐰㐹ㄶ㠸\u3130\u2009ⴠ⸰㐰㐹ㄶ㠸\u3130\u2009†⸰㤹㔷〵㈵㐲\u2009\u0a0d'
name = 'ParaxialRayTraceData'

    def __getattr__(self, name):
        try:
            return self[name]
        except KeyError:
>           raise AttributeError(name)
E           AttributeError: ParaxialRayTraceData

zospy\analyses\base.py:206: AttributeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_____________ TestSingleRayTrace.test_single_ray_trace_matches_reference_data[1-1-0-0-TangentAngle-True] ______________

self = <tests.analyses.test_raysandspots.TestSingleRayTrace object at 0x000001B76A14E2F0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E7727D0>, hx = 1, hy = 1, px = 0, py = 0
raytrace_type = 'TangentAngle', global_coordinates = True
reference_data = 'AnalysisType': 'RayTrace'
'Data':
  'Header': 'Ray Trace Data'
  'ParaxialRayTraceData':   Surf  X-coordinate  Y-coor...         All
Type                 TangentAngle
GlobalCoordinates            True
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize(
        "hx,hy,px,py,raytrace_type,global_coordinates",
        [
            (1, 1, 0, 0, "DirectionCosines", False),
            (0, 0, 1, 1, "DirectionCosines", True),
            (1, 1, 0, 0, "TangentAngle", True),
        ],
    )
    def test_single_ray_trace_matches_reference_data(
        self, simple_system, hx, hy, px, py, raytrace_type, global_coordinates, reference_data
    ):
>       result = single_ray_trace(
            simple_system,
            hx=hx,
            hy=hy,
            px=px,
            py=py,
            raytrace_type=raytrace_type,
            global_coordinates=global_coordinates,
        )

tests\analyses\test_raysandspots.py:61:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\raysandspots.py:169: in single_ray_trace
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\raysandspots.py:169: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76E771030>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestRayFan.test_ray_fan_matches_reference_data[0-20-Aberration_Y-Aberration_X] ____________________

self = <tests.analyses.test_raysandspots.TestRayFan object at 0x000001B76A14F340>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F405B40>, plot_scale = 0, number_of_rays = 20
tangential = 'Aberration_Y', sagittal = 'Aberration_X'
reference_data = 'AnalysisType': 'RayFan'
'Data':
  'Header': 'Ray Fan Data'
  'Sagittal fan, field number 1 = 0,0000 (deg)':     Pupil...        True
UseDashes                False
Sagittal          Aberration_X
Tangential        Aberration_Y
dtype: object

    @pytest.mark.parametrize(
        "plot_scale,number_of_rays,tangential,sagittal",
        [
            (0, 20, "Aberration_Y", "Aberration_X"),
            (1, 40, "Aberration_Y", "Aberration_X"),
            (0, 20, "Aberration_X", "Aberration_Y"),
        ],
    )
    def test_ray_fan_matches_reference_data(
        self, simple_system, plot_scale, number_of_rays, tangential, sagittal, reference_data
    ):
        result = ray_fan(
            simple_system,
            plot_scale=plot_scale,
            number_of_rays=number_of_rays,
            tangential=tangential,
            sagittal=sagittal,
        )

>       assert np.allclose(
            result.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
            reference_data.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
        )
E       KeyError: 'Tangential fan, field number 1 = 0,0000 (deg)'

tests\analyses\test_raysandspots.py:141: KeyError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestRayFan.test_ray_fan_matches_reference_data[1-40-Aberration_Y-Aberration_X] ____________________

self = <tests.analyses.test_raysandspots.TestRayFan object at 0x000001B76A14F3D0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F404C40>, plot_scale = 1, number_of_rays = 40
tangential = 'Aberration_Y', sagittal = 'Aberration_X'
reference_data = 'AnalysisType': 'RayFan'
'Data':
  'Header': 'Ray Fan Data'
  'Sagittal fan, field number 1 = 0,0000 (deg)':     Pupil...        True
UseDashes                False
Sagittal          Aberration_X
Tangential        Aberration_Y
dtype: object

    @pytest.mark.parametrize(
        "plot_scale,number_of_rays,tangential,sagittal",
        [
            (0, 20, "Aberration_Y", "Aberration_X"),
            (1, 40, "Aberration_Y", "Aberration_X"),
            (0, 20, "Aberration_X", "Aberration_Y"),
        ],
    )
    def test_ray_fan_matches_reference_data(
        self, simple_system, plot_scale, number_of_rays, tangential, sagittal, reference_data
    ):
        result = ray_fan(
            simple_system,
            plot_scale=plot_scale,
            number_of_rays=number_of_rays,
            tangential=tangential,
            sagittal=sagittal,
        )

>       assert np.allclose(
            result.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
            reference_data.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
        )
E       KeyError: 'Tangential fan, field number 1 = 0,0000 (deg)'

tests\analyses\test_raysandspots.py:141: KeyError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestRayFan.test_ray_fan_matches_reference_data[0-20-Aberration_X-Aberration_Y] ____________________

self = <tests.analyses.test_raysandspots.TestRayFan object at 0x000001B76A14F460>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E70ED40>, plot_scale = 0, number_of_rays = 20
tangential = 'Aberration_X', sagittal = 'Aberration_Y'
reference_data = 'AnalysisType': 'RayFan'
'Data':
  'Header': 'Ray Fan Data'
  'Sagittal fan, field number 1 = 0,0000 (deg)':     Pupil...        True
UseDashes                False
Sagittal          Aberration_Y
Tangential        Aberration_X
dtype: object

    @pytest.mark.parametrize(
        "plot_scale,number_of_rays,tangential,sagittal",
        [
            (0, 20, "Aberration_Y", "Aberration_X"),
            (1, 40, "Aberration_Y", "Aberration_X"),
            (0, 20, "Aberration_X", "Aberration_Y"),
        ],
    )
    def test_ray_fan_matches_reference_data(
        self, simple_system, plot_scale, number_of_rays, tangential, sagittal, reference_data
    ):
        result = ray_fan(
            simple_system,
            plot_scale=plot_scale,
            number_of_rays=number_of_rays,
            tangential=tangential,
            sagittal=sagittal,
        )

>       assert np.allclose(
            result.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
            reference_data.Data["Tangential fan, field number 1 = 0,0000 (deg)"],
        )
E       KeyError: 'Tangential fan, field number 1 = 0,0000 (deg)'

tests\analyses\test_raysandspots.py:141: KeyError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
______________________________________ TestSurfaceData.test_can_run_surface_data ______________________________________

self = <tests.analyses.test_reports.TestSurfaceData object at 0x000001B76A14FCA0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76B77F850>

    def test_can_run_surface_data(self, simple_system):
>       result = surface_data(simple_system, 3)

tests\analyses\test_reports.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:227: in surface_data
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:227: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F4404C0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
____________________________________________ TestSurfaceData.test_to_json _____________________________________________

self = <tests.analyses.test_reports.TestSurfaceData object at 0x000001B76A168040>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F325210>

    def test_to_json(self, simple_system):
>       result = surface_data(simple_system, 3)

tests\analyses\test_reports.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:227: in surface_data
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:227: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F325240>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________________________________ TestSurfaceData.test_can_run_surface_data_fromcfg __________________________________

self = <tests.analyses.test_reports.TestSurfaceData object at 0x000001B76A14FFA0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F39CB80>
cfg_file = WindowsPath('E:/Local_ZOSPy_For_PR/tests/data/config/test_reports.py-TestSurfaceData.CFG')

    def test_can_run_surface_data_fromcfg(self, simple_system, cfg_file):
>       result = surface_data_fromcfg(simple_system, str(cfg_file))

tests\analyses\test_reports.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:316: in surface_data_fromcfg
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:316: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F39C0D0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
__________________________ TestSurfaceData.test_surface_data_fromcfg_loads_config_correctly ___________________________

self = <tests.analyses.test_reports.TestSurfaceData object at 0x000001B76A1682B0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F24A920>
cfg_file = WindowsPath('E:/Local_ZOSPy_For_PR/tests/data/config/test_reports.py-TestSurfaceData.CFG')

    def test_surface_data_fromcfg_loads_config_correctly(self, simple_system, cfg_file):
>       result = surface_data_fromcfg(simple_system, str(cfg_file))

tests\analyses\test_reports.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:316: in surface_data_fromcfg
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:316: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F248B80>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
______________________________ TestSurfaceData.test_surface_data_matches_reference_data _______________________________

self = <tests.analyses.test_reports.TestSurfaceData object at 0x000001B76A168550>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E770850>
reference_data = 'AnalysisType': 'SurfaceDataSettings'
'CgfOutFile': 'REDACTED'
'Data': General                         File           ...    10,084\n', '\n', 'Shape Factor: \t             0\n']
'Settings': Surface    2
dtype: int64
'TxtOutFile': 'REDACTED'

    def test_surface_data_matches_reference_data(self, simple_system, reference_data):
        result = surface_data(simple_system, surface=2)

>       assert all(result.Data.Surface == reference_data.Data.Surface)

tests\analyses\test_reports.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = Series([], dtype: object), name = 'Surface'

    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'Surface'

.tox\py310-standalone\lib\site-packages\pandas\core\generic.py:5989: AttributeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_______________________________________ TestSystemData.test_can_run_system_data _______________________________________

self = <tests.analyses.test_reports.TestSystemData object at 0x000001B76A168AC0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F2234C0>

    def test_can_run_system_data(self, simple_system):
        result = system_data(simple_system)

>       assert result.Data is not None
E       AssertionError: assert None is not None
E        +  where None = 'AnalysisType': 'SystemData'\n'Data': None\n'HeaderData': []\n'Messages': []\n'MetaData': AnalysisMetadata(DateTime=dateti...0d⁄‽\u2009†††〲ㄮള\u200a']\n'Settings': None\n'TxtOutFile': 'C:\\Users\\DAVIDN~1\\AppData\\Local\\Temp\\zospy_7_4n4pb8.txt'.Data

tests\analyses\test_reports.py:57: AssertionError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_______________________________ TestSystemData.test_system_data_matches_reference_data ________________________________

self = <tests.analyses.test_reports.TestSystemData object at 0x000001B76A169060>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F32BEB0>
reference_data = 'AnalysisType': 'SystemData'
'Data':
  'Fields':
    'Data':    #  X-Value  Y-Value  Weight
0  1      0.0      0.0    ... 'B = \t           0\n', 'C = \t           0\n', 'D = \t       20,13\n', ' ']
'Settings': None
'TxtOutFile': 'REDACTED'

    def test_system_data_matches_reference_data(self, simple_system, reference_data):
        result = system_data(simple_system)

>       assert all(result.Data.Fields.Data == reference_data.Data.Fields.Data)
E       AttributeError: 'NoneType' object has no attribute 'Fields'

tests\analyses\test_reports.py:78: AttributeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________________________ TestCardinalPoints.test_can_run_cardinal_points ___________________________________

self = <tests.analyses.test_reports.TestCardinalPoints object at 0x000001B76A1695D0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F33CFA0>

    def test_can_run_cardinal_points(self, simple_system):
>       result = cardinal_points(simple_system, 2, 3)

tests\analyses\test_reports.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:834: in cardinal_points
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:834: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F33D090>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________________________________ TestCardinalPoints.test_to_json ___________________________________________

self = <tests.analyses.test_reports.TestCardinalPoints object at 0x000001B76A169630>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F326470>

    def test_to_json(self, simple_system):
>       result = cardinal_points(simple_system, 2, 3)

tests\analyses\test_reports.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:834: in cardinal_points
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:834: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F324940>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_______________________________ TestCardinalPoints.test_can_run_cardinal_points_fromcfg _______________________________

self = <tests.analyses.test_reports.TestCardinalPoints object at 0x000001B76A1698D0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F36A110>
cfg_file = WindowsPath('E:/Local_ZOSPy_For_PR/tests/data/config/test_reports.py-TestCardinalPoints.CFG')

    def test_can_run_cardinal_points_fromcfg(self, simple_system, cfg_file):
>       result = cardinal_points_fromcfg(simple_system, str(cfg_file))

tests\analyses\test_reports.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:921: in cardinal_points_fromcfg
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:921: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F36A9B0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_______________________ TestCardinalPoints.test_cardinal_points_fromcfg_loads_config_correctly ________________________

self = <tests.analyses.test_reports.TestCardinalPoints object at 0x000001B76A169B70>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E70DE10>
cfg_file = WindowsPath('E:/Local_ZOSPy_For_PR/tests/data/config/test_reports.py-TestCardinalPoints.CFG')

    def test_cardinal_points_fromcfg_loads_config_correctly(self, simple_system, cfg_file):
>       result = cardinal_points_fromcfg(simple_system, str(cfg_file))

tests\analyses\test_reports.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:921: in cardinal_points_fromcfg
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:921: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76E70E410>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________________ TestCardinalPoints.test_cardinal_points_matches_reference_data ____________________________

self = <tests.analyses.test_reports.TestCardinalPoints object at 0x000001B76A16A0B0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F257D00>
reference_data = 'AnalysisType': 'CardinalPoints'
'CgfOutFile': 'REDACTED'
'Data': General       File                                  ...      -40,000000\t          40,000000\n']
'Settings': Surface1    2
Surface2    3
dtype: int64
'TxtOutFile': 'REDACTED'

    def test_cardinal_points_matches_reference_data(self, simple_system, reference_data):
>       result = cardinal_points(simple_system, 2, 3)

tests\analyses\test_reports.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\reports.py:834: in cardinal_points
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\reports.py:834: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F255990>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_____________________ TestZernikeStandardCoefficients.test_can_run_zernike_standard_coefficients ______________________

self = <tests.analyses.test_wavefront.TestZernikeStandardCoefficients object at 0x000001B76A18CCD0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F2239D0>

    def test_can_run_zernike_standard_coefficients(self, simple_system):
>       result = zernike_standard_coefficients(simple_system)

tests\analyses\test_wavefront.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\wavefront.py:171: in zernike_standard_coefficients
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\wavefront.py:171: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F2228C0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
____________________________________ TestZernikeStandardCoefficients.test_to_json _____________________________________

self = <tests.analyses.test_wavefront.TestZernikeStandardCoefficients object at 0x000001B76A18CD30>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F5F9330>

    def test_to_json(self, simple_system):
>       result = zernike_standard_coefficients(simple_system)

tests\analyses\test_wavefront.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\wavefront.py:171: in zernike_standard_coefficients
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\wavefront.py:171: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F5F8D90>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
_________ TestZernikeStandardCoefficients.test_zernike_standard_coefficients_matches_reference_data[64x64-37] _________

self = <tests.analyses.test_wavefront.TestZernikeStandardCoefficients object at 0x000001B76A18D9C0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F6B1030>, sampling = '64x64', maximum_term = 37
reference_data = 'AnalysisType': 'ZernikeStandardCoefficients'
'Data':
  'Coefficients':         Value   Unit                          ...             0.0
Sy                          0.0
Sr                          0.0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize("sampling,maximum_term", [("64x64", 37), ("128x128", 64)])
    def test_zernike_standard_coefficients_matches_reference_data(
        self, simple_system, sampling, maximum_term, reference_data
    ):
>       result = zernike_standard_coefficients(simple_system, sampling=sampling, maximum_term=maximum_term)

tests\analyses\test_wavefront.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\wavefront.py:171: in zernike_standard_coefficients
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\wavefront.py:171: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76F6B02E0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
________ TestZernikeStandardCoefficients.test_zernike_standard_coefficients_matches_reference_data[128x128-64] ________

self = <tests.analyses.test_wavefront.TestZernikeStandardCoefficients object at 0x000001B76A18DAB0>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76E774640>, sampling = '128x128', maximum_term = 64
reference_data = 'AnalysisType': 'ZernikeStandardCoefficients'
'Data':
  'Coefficients':         Value   Unit                          ...         0.0
Sy                            0.0
Sr                            0.0
dtype: object
'TxtOutFile': 'REDACTED'

    @pytest.mark.parametrize("sampling,maximum_term", [("64x64", 37), ("128x128", 64)])
    def test_zernike_standard_coefficients_matches_reference_data(
        self, simple_system, sampling, maximum_term, reference_data
    ):
>       result = zernike_standard_coefficients(simple_system, sampling=sampling, maximum_term=maximum_term)

tests\analyses\test_wavefront.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zospy\analyses\wavefront.py:171: in zernike_standard_coefficients
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
zospy\analyses\wavefront.py:171: in <listcomp>
    line_list = [line for line in open(txtoutfile, "r", encoding="utf-16-le")]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.utf_16_le.IncrementalDecoder object at 0x000001B76E7747F0>, input = b'', final = True

    def decode(self, input, final=False):
        # decode input (taking the buffer into account)
        data = self.buffer + input
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
E       UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x0a in position 0: truncated data

C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\codecs.py:322: UnicodeDecodeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
___________________ TestStringToNumberConversion.test_atox_returns_correct_results_for_opticstudio ____________________

self = <tests.utils.test_pyutils.TestStringToNumberConversion object at 0x000001B76A1AB220>
simple_system = <zospy.zpcore.OpticStudioSystem object at 0x000001B76F6CCAC0>

    def test_atox_returns_correct_results_for_opticstudio(self, simple_system):
        xphase = 0.9
        surface = 3

        # cfgfile
        fd, cfgoutfile = mkstemp(suffix=".CFG", prefix="zospy_")
        os.close(fd)

        # txtfile
        fd, txtoutfile = mkstemp(suffix=".txt", prefix="zospy_")
        os.close(fd)

        analysis = new_analysis(simple_system, constants.Analysis.AnalysisIDM.PolarizationPupilMap)

        # Modify the settings file
        analysis_settings = analysis.GetSettings()
        analysis_settings.SaveTo(cfgoutfile)

        analysis_settings.ModifySettings(cfgoutfile, "PPM_PX", xtoa(xphase, thousands_separator=None))
        if isinstance(surface, str):
            analysis_settings.ModifySettings(cfgoutfile, "PPM_SURFACE", surface)
        else:
            analysis_settings.ModifySettings(cfgoutfile, "PPM_SURFACE", xtoa(surface, thousands_separator=None))

        analysis_settings.LoadFrom(cfgoutfile)

        # Run analysis
        analysis.ApplyAndWaitForCompletion()

        # Get results
        analysis.Results.GetTextFile(txtoutfile)

        with open(txtoutfile, "r", encoding="utf-16-le") as f:
            text_output = f.read()

>       xphase_out = atox(_get_number_field("X-Phase", text_output), dtype=float)

tests\utils\test_pyutils.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = 'X-Phase'
text = '潐慬楲慺楴湯倠灵汩䴠灡䐠瑡ൡഊ䘊汩\u2065›㩃啜敳獲䑜癡摩丠畧敹屮潄畣敭瑮屳敚慭屸䅓偍䕌屓䕌华種獯\u0a0d楔汴㩥ഠ䐊瑡\u2065›㘲〯⼷〲㌲\u0a0d\u0a0d\u0a0d慗敶敬杮桴†ऺ〠㔮㌴ര䘊敩摬倠獯†㨠\u2009...㔷\u2009⸰㜳व〠〮〰㜱㔳㐷\u2009⸰㔹㘹㜲㌰ष〠㤮〲㠸〴〸\u2009㠱⸰〰〰〰र†〹〮〱㘳㔳\u0a0dㄠ〮〰\u2009⸰〰र〠〮〰〰〰〰\u2009⸰㔹㘹〷㔲ऱ〠㤮〲㘹㤶ㄹ\u2009㔭⸹ㄸㄴ㐴श†〹〮〰〰〰\u0a0d'

    def _get_number_field(name: str, text: str) -> str:
>       return re.search(rf"{name}\s*:\s*(-?[\d{_config.DECIMAL_POINT}]+)", text).group(1)
E       AttributeError: 'NoneType' object has no attribute 'group'

zospy\analyses\polarization.py:22: AttributeError
------------------------------------------------ Captured stdout setup ------------------------------------------------
*** FRU__delta_init(): Attempt to start when running!
=============================================== short test summary info ===============================================
FAILED tests/analyses/test_polarization.py::TestPolarizationPupilMap::test_can_run_polarization_pupil_map - pandas.er...
FAILED tests/analyses/test_polarization.py::TestPolarizationPupilMap::test_polarization_pupil_map_matches_reference_data[1-0-0-0-Image-11x11]
FAILED tests/analyses/test_polarization.py::TestPolarizationPupilMap::test_polarization_pupil_map_matches_reference_data[1-1-0-0-2-11x11]
FAILED tests/analyses/test_polarization.py::TestPolarizationPupilMap::test_polarization_pupil_map_matches_reference_data[0-1-0-0-Image-11x11]
FAILED tests/analyses/test_polarization.py::TestPolarizationPupilMap::test_polarization_pupil_map_matches_reference_data[1-1-45-90-Image-17x17]
FAILED tests/analyses/test_polarization.py::TestTransmission::test_can_run_transmission - UnicodeDecodeError: 'utf-16...
FAILED tests/analyses/test_polarization.py::TestTransmission::test_transmission_matches_reference_data[32x32-False-1-0-0-0]
FAILED tests/analyses/test_polarization.py::TestTransmission::test_transmission_matches_reference_data[32x32-False-0-1-0-0]
FAILED tests/analyses/test_polarization.py::TestTransmission::test_transmission_matches_reference_data[32x32-False-1-1-0-0]
FAILED tests/analyses/test_polarization.py::TestTransmission::test_transmission_matches_reference_data[64x64-False-1-1-45-90]
FAILED tests/analyses/test_polarization.py::TestTransmission::test_transmission_matches_reference_data[64x64-True-1-0-0-0]
FAILED tests/analyses/test_raysandspots.py::TestSingleRayTrace::test_can_run_single_ray_trace - UnicodeDecodeError: '...
FAILED tests/analyses/test_raysandspots.py::TestSingleRayTrace::test_to_json - UnicodeDecodeError: 'utf-16-le' codec ...
FAILED tests/analyses/test_raysandspots.py::TestSingleRayTrace::test_single_ray_trace_matches_reference_data[1-1-0-0-DirectionCosines-False]
FAILED tests/analyses/test_raysandspots.py::TestSingleRayTrace::test_single_ray_trace_matches_reference_data[0-0-1-1-DirectionCosines-True]
FAILED tests/analyses/test_raysandspots.py::TestSingleRayTrace::test_single_ray_trace_matches_reference_data[1-1-0-0-TangentAngle-True]
FAILED tests/analyses/test_raysandspots.py::TestRayFan::test_ray_fan_matches_reference_data[0-20-Aberration_Y-Aberration_X]
FAILED tests/analyses/test_raysandspots.py::TestRayFan::test_ray_fan_matches_reference_data[1-40-Aberration_Y-Aberration_X]
FAILED tests/analyses/test_raysandspots.py::TestRayFan::test_ray_fan_matches_reference_data[0-20-Aberration_X-Aberration_Y]
FAILED tests/analyses/test_reports.py::TestSurfaceData::test_can_run_surface_data - UnicodeDecodeError: 'utf-16-le' c...
FAILED tests/analyses/test_reports.py::TestSurfaceData::test_to_json - UnicodeDecodeError: 'utf-16-le' codec can't de...
FAILED tests/analyses/test_reports.py::TestSurfaceData::test_can_run_surface_data_fromcfg - UnicodeDecodeError: 'utf-...
FAILED tests/analyses/test_reports.py::TestSurfaceData::test_surface_data_fromcfg_loads_config_correctly - UnicodeDec...
FAILED tests/analyses/test_reports.py::TestSurfaceData::test_surface_data_matches_reference_data - AttributeError: 'S...
FAILED tests/analyses/test_reports.py::TestSystemData::test_can_run_system_data - AssertionError: assert None is not ...
FAILED tests/analyses/test_reports.py::TestSystemData::test_system_data_matches_reference_data - AttributeError: 'Non...
FAILED tests/analyses/test_reports.py::TestCardinalPoints::test_can_run_cardinal_points - UnicodeDecodeError: 'utf-16...
FAILED tests/analyses/test_reports.py::TestCardinalPoints::test_to_json - UnicodeDecodeError: 'utf-16-le' codec can't...
FAILED tests/analyses/test_reports.py::TestCardinalPoints::test_can_run_cardinal_points_fromcfg - UnicodeDecodeError:...
FAILED tests/analyses/test_reports.py::TestCardinalPoints::test_cardinal_points_fromcfg_loads_config_correctly - Unic...
FAILED tests/analyses/test_reports.py::TestCardinalPoints::test_cardinal_points_matches_reference_data - UnicodeDecod...
FAILED tests/analyses/test_wavefront.py::TestZernikeStandardCoefficients::test_can_run_zernike_standard_coefficients
FAILED tests/analyses/test_wavefront.py::TestZernikeStandardCoefficients::test_to_json - UnicodeDecodeError: 'utf-16-...
FAILED tests/analyses/test_wavefront.py::TestZernikeStandardCoefficients::test_zernike_standard_coefficients_matches_reference_data[64x64-37]
FAILED tests/analyses/test_wavefront.py::TestZernikeStandardCoefficients::test_zernike_standard_coefficients_matches_reference_data[128x128-64]
FAILED tests/utils/test_pyutils.py::TestStringToNumberConversion::test_atox_returns_correct_results_for_opticstudio
=============================== 36 failed, 113 passed, 33 skipped in 649.38s (0:10:49) ================================
py310-standalone: exit 1 (651.51 seconds) E:\Local_ZOSPy_For_PR> pytest tests pid=25412
py310-standalone: FAIL ✖ in 10 minutes 55.72 seconds
py311-standalone-legacy-zpcoreonly: skipped because could not find python interpreter with spec(s): py311
py311-standalone-legacy-zpcoreonly: SKIP ⚠ in 0.02 seconds
py311-standalone: skipped because could not find python interpreter with spec(s): py311
.pkg: _exit> python "C:\Users\David Nguyen\anaconda3\envs\Refractometer\lib\site-packages\pyproject_api\_backend.py" True flit_core.buildapi
  format: OK (2.75=setup[0.09]+cmd[1.33,1.33] seconds)
  lint: OK (0.09=setup[0.02]+cmd[0.08] seconds)
  py39-standalone-legacy-zpcoreonly: SKIP (0.41 seconds)
  py39-standalone: SKIP (0.02 seconds)
  py310-standalone-legacy-zpcoreonly: OK (52.94=setup[4.62]+cmd[48.31] seconds)
  py310-standalone: FAIL code 1 (655.72=setup[4.20]+cmd[651.51] seconds)
  py311-standalone-legacy-zpcoreonly: SKIP (0.02 seconds)
  py311-standalone: SKIP (0.05 seconds)
  evaluation failed :( (712.69 seconds)

@Omnistic
Copy link
Contributor Author

Hi @crnh,

I've pasted the tox result above. Also, I reently updated to R2.00.

I hope this helps, and take care,

David

@crnh
Copy link
Collaborator

crnh commented Jul 26, 2023

Thanks for sharing the output! The problem seems related to parsing the text output from certain analyses. I'll split this to a separate issue, to keep this PR clean.

tests/conftest.py Outdated Show resolved Hide resolved
@crnh
Copy link
Collaborator

crnh commented Jul 26, 2023

@Omnistic Thanks for contributing this function! I added a small unit test for it. If you want to get an idea of what a very simple test looks like, you can check it here.

If @LucVV approves this PR as well, it can be merged!

crnh
crnh previously approved these changes Jul 26, 2023
@crnh crnh dismissed their stale review July 26, 2023 13:34

Forgot to update the changelog

@Omnistic
Copy link
Contributor Author

Thanks @crnh, I'm starting to have a grasp of what these tests mean.

@LucVV LucVV self-requested a review July 26, 2023 22:30
Copy link
Contributor

@LucVV LucVV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat implementation, thank you @Omnistic and @crnh!

@LucVV LucVV merged commit 970bdc0 into MREYE-LUMC:main Jul 26, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants