Skip to content

Commit

Permalink
add minimal unit test for reflected-light functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Jul 22, 2024
1 parent d1f285c commit a0b603f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/test_brightness.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""
Tests for the reflected-light calculation in system.compute_all_orbits
"""

from orbitize import system
from orbitize import DATADIR, read_input
import os
import numpy as np


def test_brightness_calculation():

num_secondary_bodies = 1
input_file = os.path.join(DATADIR, "GJ504.csv")
data_table = read_input.read_file(input_file)
system_mass = 1.47
plx = 24.30

test_system = system.System(num_secondary_bodies, data_table, system_mass, plx)

params = np.array(
[
7.2774010e01,
4.1116819e-02,
5.6322372e-01,
3.5251172e00,
4.2904768e00,
9.4234377e-02,
4.5418411e01,
1.4317369e-03,
5.6322372e-01,
3.1016846e00,
4.2904768e00,
3.4033456e-01,
2.4589758e01,
1.4849439e00,
]
)

ra, dec, vz, brightness = test_system.compute_all_orbits(params)

0 comments on commit a0b603f

Please sign in to comment.