Exemplo n.º 1
0
def test_crop(ndcubesequence_4c_ln_lt_l):
    seq = ndcubesequence_4c_ln_lt_l
    intervals = seq[0].wcs.array_index_to_world([1, 2], [0, 1], [0, 2])
    lower_corner = [coord[0] for coord in intervals]
    upper_corner = [coord[-1] for coord in intervals]
    expected = seq[:, 1:3, 0:2, 0:3]
    output = seq.crop(lower_corner, upper_corner)
    helpers.assert_cubesequences_equal(output, expected)
Exemplo n.º 2
0
def test_IRISSpectrogramCubeSequence_apply_exposure_time_correction(
        input_sequence, undo, force, expected_sequence):
    output_sequence = input_sequence.apply_exposure_time_correction(undo, copy=True,
                                                                    force=force)
    assert_cubesequences_equal(output_sequence, expected_sequence)
Exemplo n.º 3
0
def test_IRISSpectrogramCubeSequence_convert_to(input_sequence, new_unit,
                                                expected_sequence):
    output_sequence = input_sequence.convert_to(new_unit, copy=True)
    assert_cubesequences_equal(output_sequence, expected_sequence)