Skip to content

Commit

Permalink
Sample calibration state rather than 50/50 boolean
Browse files Browse the repository at this point in the history
Change to 1/8 chance. So that it will try more shifts. It does not shift
when xaxis is uncalibrated.
  • Loading branch information
jason-neal committed Sep 29, 2016
1 parent aaaf23a commit 5110f7d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spectrum_overload/test/test_Spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,15 @@ def test_wav_select_example():


@given(st.lists(st.floats(min_value=1e-6, allow_infinity=False), min_size=1),
st.floats(min_value=1e-8), st.booleans(), st.booleans())
st.floats(min_value=1e-8), st.sampled_from((1, 1, 1, 1, 1, 1, 1, 0)),
st.booleans())
def test_doppler_shift_with_hypothesis(x, RV, calib, RV_dir):
"""Test doppler shift properties.
Need to check values against pyastronomy separately """

Need to check values against pyastronomy separately
calib is sampled with a 1/8 chance being uncalibrated.
"""

# Added a min value to RV shift to avoid very small RV values (1e-300).
# Have added a flag to change RV direction to explore negative values
rvdir = 2 * RV_dir - 1 # True -> 1 , False -> -1
Expand Down

0 comments on commit 5110f7d

Please sign in to comment.