Skip to content

Commit

Permalink
add plate scale for new cc API
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsavel authored Dec 2, 2022
1 parent 1461ce5 commit 2197fe5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/simmer/tests/test_contrast.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import unittest
from photutils import datasets
from astropy.table import Table
from simmer.contrast import ConCur as cc
from simmer.contrast import contrast_curve_core as cc
from simmer.contrast import twoD_weighted_std as wstd
from simmer.contrast import find_best_center
from simmer.contrast import background_calc
Expand All @@ -31,22 +31,22 @@ def all_same(items):
class TestContrastCurve(unittest.TestCase):
def test_constant_flux(self):
arr = np.array([[1000] * 600] * 600)
result = cc(arr)
result = cc(arr, .0333, )
self.assertTrue(all_same(result[1]))

def test_zero_vals(self):
arr = np.array([[0] * 600] * 600)
result = cc(arr)
result = cc(arr, .0333, )
bools = []
for i in result[1]:
bools.append(np.isnan(i))
self.assertTrue(np.all(bools))

def test_radius_size(self):
arr = np.array([[1000] * 600] * 600)
rad1_result = cc(arr, radius_size=1)
rad3_result = cc(arr, radius_size=3)
rad6_result = cc(arr, radius_size=6)
rad1_result = cc(arr, .0333, radius_size=1)
rad3_result = cc(arr, .0333, radius_size=3)
rad6_result = cc(arr, .0333, radius_size=6)
self.assertTrue(
np.all(
[
Expand Down

0 comments on commit 2197fe5

Please sign in to comment.