Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Nov 5, 2024
1 parent f99d0b8 commit af0f68b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/kbmod/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Results:
table : `astropy.table.Table`
The stored results data.
wcs : `astropy.wcs.WCS`
A gloabl WCS for all the results. This is optional and primarily used when saving
A global WCS for all the results. This is optional and primarily used when saving
the results to a file so as to preserve the WCS for future analysis.
track_filtered : `bool`
Whether to track (save) the filtered trajectories. This will use
Expand Down
5 changes: 2 additions & 3 deletions src/kbmod/run_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ def run_search(self, config, stack, trj_generator=None, wcs=None):
if config["save_all_stamps"]:
append_all_stamps(keep, stack, config["stamp_radius"])

# Append the WCS information if it is provided.
if wcs is not None:
keep.table["wcs"] = [wcs] * len(keep)
# Append the WCS information if it is provided. This will be saved with the results.
keep.table.wcs = wcs

logger.info(f"Found {len(keep)} potential trajectories.")

Expand Down
1 change: 0 additions & 1 deletion tests/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ def test_to_from_table_file(self):

# Create a fake WCS to use for serialization tests.
fake_wcs = make_fake_wcs(25.0, -7.5, 800, 600, deg_per_pixel=0.01)
fake_wcs.pixel_shape = (800, 600)
table.wcs = fake_wcs

# Test read/write to file.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wcs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def test_wcs_to_dict(self):
self.assertAlmostEqual(new_dict[key], self.header_dict[key])

def test_serialization(self):
self.wcs.array_shape = (200, 250)
self.wcs.pixel_shape = (200, 250)
wcs_str = serialize_wcs(self.wcs)
self.assertTrue(isinstance(wcs_str, str))

wcs2 = deserialize_wcs(wcs_str)
self.assertTrue(isinstance(wcs2, WCS))
self.assertEqual(self.wcs.array_shape, wcs2.array_shape)
self.assertEqual(self.wcs.pixel_shape, wcs2.pixel_shape)
self.assertTrue(wcs_fits_equal(self.wcs, wcs2))

def test_append_wcs_to_hdu_header(self):
Expand Down

0 comments on commit af0f68b

Please sign in to comment.