Skip to content

Commit

Permalink
Fixing column names.
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomerritt committed Jan 10, 2024
1 parent 98a0828 commit a27f0cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/sorcha/modules/PPCalculateApparentMagnitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ def PPCalculateApparentMagnitude(
observations, phasefunction, othercolours, observing_filters, mainfilter
)
else:
observations.rename(columns={"H_" + mainfilter: "H_filter"}, inplace=True)
observations["H_original"] = observations["H_filter"].copy()
observations["H_filter"] = observations["H_" + mainfilter].copy()

# calculate main body apparent magnitude in observation filter
verboselog("Calculating apparent magnitude in filter...")
Expand Down
3 changes: 2 additions & 1 deletion tests/sorcha/test_PPCalculateApparentMagnitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def test_PPCalculateApparentMagnitude():

assert_almost_equal(asteroid_out["TrailedSourceMag"].values[0], 13.281578, decimal=6)
assert_almost_equal(asteroid_out["H_filter"].values[0], 7.19, decimal=6)
assert_almost_equal(asteroid_out["H_r"].values[0], 7.3, decimal=6)

assert_almost_equal(asteroid_single["TrailedSourceMag"].values[0], 13.391578, decimal=6)
assert_almost_equal(asteroid_single["H_filter"].values[0], 7.3, decimal=6)
assert_almost_equal(asteroid_single["H_original"].values[0], 7.3, decimal=6)
assert_almost_equal(asteroid_single["H_r"].values[0], 7.3, decimal=6)

0 comments on commit a27f0cf

Please sign in to comment.