Exemplo n.º 1
0
def test_npixels_per_sample_is_zero():
    obs = PacsObservation(data_dir + 'frames_blue.fits')
    header = obs.get_map_header()
    header['crval1'] += 1
    proj2 = obs.get_projection_operator(header=header)
    assert proj2.matrix.shape[-1] == 0
    t = proj2(np.ones((header['NAXIS2'],header['NAXIS1'])))
    assert all_eq(minmax(t), [0,0])
    t[:] = 1
    assert all_eq(minmax(proj2.T(t)), [0,0])
Exemplo n.º 2
0
def test_any_neq2():
    NaN = np.nan
    assert all_eq(NaN, NaN)
    assert all_eq([NaN], [NaN])
    assert all_eq([NaN, 1], [NaN, 1])
    assert any_neq([NaN, 1, NaN], [NaN, 1, 3])
    assert all_eq(minmax([NaN, 1., 4., NaN, 10.]), [1., 10.])
Exemplo n.º 3
0
def test_any_neq2():
    NaN = np.nan
    assert all_eq(NaN, NaN)
    assert all_eq([NaN], [NaN])
    assert all_eq([NaN,1], [NaN,1])
    assert any_neq([NaN,1,NaN], [NaN,1,3])
    assert all_eq(minmax([NaN, 1., 4., NaN, 10.]), [1., 10.])