Skip to content

Commit

Permalink
test system for brightness calc: gj 504 -> beta pic
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Jul 24, 2024
1 parent 03ea984 commit 64045dd
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions tests/test_brightness.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ def test_brightness_calculation():

num_secondary_bodies = 1

# TODO (sarah): change dataset to one where we can see brightness variations
input_file = os.path.join(DATADIR, "GJ504.csv")
# input_file = os.path.join(DATADIR, "new_dataset.csv")
# input_file = os.path.join(DATADIR, "GJ504.csv")
input_file = os.path.join(DATADIR, "betaPic.csv")
data_table = read_input.read_file(input_file)

times = data_table["epoch"].value
Expand All @@ -24,27 +23,21 @@ def test_brightness_calculation():

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

print(test_system.param_idx)

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,
10.0,
0.1,
np.radians(89),
np.radians(21),
np.radians(31),
0.0, # note: I didn't convert tau here, just picked random number
51.5,
1.75,
]
)

print(test_system.param_idx)

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

# TODO (farrah): make plot of brightness vs time
Expand All @@ -54,6 +47,8 @@ def test_read_input_with_brightness():

# TODO (farrah): use code above as inspiration to read in a csv file with a brightness column

print("hello! :D ")


if __name__ == "__main__":
test_brightness_calculation()
Expand Down

0 comments on commit 64045dd

Please sign in to comment.