def test_crop_append():
 raw = _test_raw_reader(read_raw_bti, pdf_fname=pdf_fnames[0], config_fname=config_fnames[0], head_shape_fname=hs_fnames[0])
 (y, t) = raw[:]
 (t0, t1) = ((0.25 * t[(-1)]), (0.75 * t[(-1)]))
 mask = ((t0 <= t) * (t <= t1))
 raw_ = raw.copy().crop(t0, t1)
 (y_, _) = raw_[:]
 assert_true((y_.shape[1] == mask.sum()))
 assert_true((y_.shape[0] == y.shape[0]))

def test_crop_append ( ) : raw = _test_raw_reader ( read_raw_bti , pdf_fname = pdf_fnames [ 0 ] , config_fname = config_fnames [ 0 ] , head_shape_fname = hs_fnames [ 0 ] ) ( y , t ) = raw [ : ] ( t0 , t1 ) = ( ( 0.25 * t [ ( - 1 ) ] ) , ( 0.75 * t [ ( - 1 ) ] ) ) mask = ( ( t0 <= t ) * ( t <= t1 ) ) raw_ = raw . copy ( ) . crop ( t0 , t1 ) ( y_ , _ ) = raw_ [ : ] assert_true ( ( y_ . shape [ 1 ] == mask . sum ( ) ) ) assert_true ( ( y_ . shape [ 0 ] == y . shape [ 0 ] ) )
test crop and append raw .