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

Conform camera - possible issue with expected failures #11

Open
dougforpres opened this issue Sep 12, 2023 · 1 comment
Open

Conform camera - possible issue with expected failures #11

dougforpres opened this issue Sep 12, 2023 · 1 comment

Comments

@dougforpres
Copy link

For l_i = 1 To l_MaxBinX
For l_j = 1 To l_MaxBinY
If m_CanAsymmetricBin Then 'Carry out for all X and Y bin values
CameraExposure("", l_i, l_j, 0, 0, CInt((m_CameraXSize / l_i) + 1), CInt(m_CameraYSize / l_j), 0.1, "X size larger than binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'X size too large for binned size
CameraExposure("", l_i, l_j, 0, 0, CInt(m_CameraXSize / l_i), CInt((m_CameraYSize / l_j) + 1), 0.1, "Y size larger than binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'Y size too large for binned size
CameraExposure("", l_i, l_j, CInt((m_CameraXSize / l_i) + 1), 0, CInt(m_CameraXSize / l_i), CInt(m_CameraYSize / l_j), 0.1, "X start outside binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'X start outside binned chip dimensions
CameraExposure("", l_i, l_j, 0, CInt((m_CameraYSize / l_j) + 1), CInt(m_CameraXSize / l_i), CInt(m_CameraYSize / l_j), 0.1, "Y start outside binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'Y start outside binned chip dimensions
Else 'Only carry out where X and Y bin are equal
If l_i = l_j Then 'X and Y bin are same
CameraExposure("", l_i, l_j, 0, 0, CInt((m_CameraXSize / l_i) + 1), CInt(m_CameraYSize / l_j), 0.1, "X size larger than binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'X size too large for binned size
CameraExposure("", l_i, l_j, 0, 0, CInt(m_CameraXSize / l_i), CInt((m_CameraYSize / l_j) + 1), 0.1, "Y size larger than binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'Y size too large for binned size
CameraExposure("", l_i, l_j, CInt((m_CameraXSize / l_i) + 1), 0, CInt(m_CameraXSize / l_i), CInt(m_CameraYSize / l_j), 0.1, "X start outside binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'X start outside binned chip dimensions
CameraExposure("", l_i, l_j, 0, CInt((m_CameraYSize / l_j) + 1), CInt(m_CameraXSize / l_i), CInt(m_CameraYSize / l_j), 0.1, "Y start outside binned chip size, Bin " & l_i & "x" & l_j) : If TestStop() Then Exit Sub 'Y start outside binned chip dimensions
End If
End If
Next

Hi, I've been conformance testing my Camera driver and think I have found an issue with the tests.

When testing "NumX/Y" and "StartX/Y", the driver is expected to throw an error if the value is out of range.
But when testing "expected failures" the "CameraExposure" method deliberately manipulates those same properties with invalid values...

Example:
When l_i is 1 (first time thru loop)
CInt((m_CameraXSize / l_i) + 1)

So it will try to set NumX to be m_CameraXSize + 1, causing an out-of-range exception.

The test never gets to calling StartExposure, and the test fails :)

Am I misunderstanding something, or is this expected to fail?

@Peter-Simpson
Copy link
Member

Hi Doug,

Sorry for the delay in replying! Yes, these tests are expected to fail, their intent is to confirm that the device rejects invalid values.

The comment on line 1632 indicates the purpose of the tests:
'StartExposure - Invalid Bin values

Best wishes, Peter

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

No branches or pull requests

2 participants