Skip to content

Dev/fss unit tests - #48

Open
Nav2607 wants to merge 3 commits into
virtual-sensorsfrom
dev/fss-unit-tests
Open

Dev/fss unit tests#48
Nav2607 wants to merge 3 commits into
virtual-sensorsfrom
dev/fss-unit-tests

Conversation

@Nav2607

@Nav2607 Nav2607 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Addresses issue #21

Important

Blocked by #55
This PR is dependent on the eclipse refactor in PR #55.

  • Added 4 tests for in-FOV, out-of-FOV, eclipse vectors, and noise consistency
  • Added a skeleton structure for the digitization precision test. Currently, set to skip (pytest.skip())

@Nav2607
Nav2607 requested a review from wlodaralex June 23, 2026 19:03
Comment thread tests/test_fss.py
assert output["beta_deg"] == pytest.approx(0.0, abs = 0.5)

def test_eclipse_vector(mock_fss):
sun_vector = np.array([0.0, 0.0, 0.0])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This isn't a realistic way for this case to arise. Throughout the simulation, we will always have a valid vector to the Sun being calculated and it's a question of whether any portion of the Earth is also along that vector. Using [0, 0, 0] is kind of a cheat.

Comment thread tests/test_fss.py
def test_sun_vector_fov(mock_fss):
sun_vector = np.array([1.0, 0.0, 1.0])

output = mock_fss._angle_computation(sun_vector)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should be hitting the measure() function since that's the public version that will get called by the sim.

@Nav2607 Nav2607 linked an issue Jul 18, 2026 that may be closed by this pull request
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.

SENSORS branch - FSS model unit tests

2 participants