-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: output additional keywords in simulation (from #77, finally)
feat: output additional keywords in simulation
- Loading branch information
Showing
2 changed files
with
62 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import shutil | ||
|
||
from prose import Telescope, FitsManager, FITSImage | ||
from prose.simulations import ObservationSimulation | ||
|
||
|
||
def test_additional_keywords(destination="./fits"): | ||
obs = ObservationSimulation(600, Telescope.from_name("A")) | ||
obs.set_psf((3.5, 3.5), 45, 4) | ||
obs.add_stars(10, [0, 1]) | ||
obs.save_fits(destination, POINT="30, 40", SITE="112, 30") | ||
|
||
fm = FitsManager(destination) | ||
for image in fm.all_images: | ||
im = FITSImage(image) | ||
assert im.header["POINT"] == "30, 40" | ||
assert im.header["SITE"] == "112, 30" | ||
|
||
shutil.rmtree(destination) |