Beispiel #1
0
def test_flags_bad_if_no_master_calibration(mock_cal):
    mock_cal.return_value = None
    context = FakeContext()
    context.FRAME_CLASS = FakeDarkImage
    comparer = DarkComparer(context)
    image = comparer.do_stage(FakeDarkImage(30.0))
    assert image.is_bad is True
Beispiel #2
0
def test_flags_bad_if_no_master_calibration(mock_cal):
    mock_cal.return_value = None
    context = FakeContext()
    context.FRAME_CLASS = FakeDarkImage
    comparer = DarkComparer(context)
    image = comparer.do_stage(FakeDarkImage(30.0))
    assert image.is_bad is True
Beispiel #3
0
def test_header_cal_type_dark(mock_frame):
    context = FakeContext()
    context.FRAME_CLASS = FakeDarkImage

    maker = DarkMaker(context)

    images = maker.do_stage([FakeDarkImage() for x in range(6)])
    assert images[0].header['OBSTYPE'].upper() == 'DARK'
Beispiel #4
0
def test_header_cal_type_dark(mock_frame, mock_namer):
    mock_namer.return_value = lambda *x: 'foo.fits'

    context = FakeContext()
    context.FRAME_CLASS = FakeDarkImage

    maker = DarkMaker(context)

    images = maker.do_stage([FakeDarkImage() for x in range(6)])
    assert images[0].header['OBSTYPE'].upper() == 'DARK'