Skip to content

Commit

Permalink
test: header kept by FITSImage
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrcia committed Jun 15, 2023
1 parent 71aaeb1 commit 10031e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_image.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import numpy as np
import pytest

from prose import FITSImage
from prose.core.image import Buffer, Image
from prose.core.source import PointSource, Sources
from prose.simulations import fits_image


def test_init_append(n=5):
Expand Down Expand Up @@ -44,3 +46,11 @@ def test_plot_sources():
image.sources[0].plot()
# seen in a bug
image.sources[np.int64(0)].plot()


def test_fitsimage(tmp_path):
filename = tmp_path / "test.fits"
fits_image(np.random.rand(100, 100), {}, filename)

loaded_image = FITSImage(filename)
assert "IMAGETYP" in dict(loaded_image.header)

0 comments on commit 10031e2

Please sign in to comment.