Example #1
0
def test_dataset_read_hdf5_disk_chunk(dataset_hdf5):
    dataset = lcdata.read_hdf5(dataset_hdf5, in_memory=False)
    total_count = 0
    for chunk in dataset.iterate_chunks(2):
        assert len(chunk) == 2
        total_count += len(chunk)

    assert total_count == len(dataset)
Example #2
0
def test_dataset_hdf5_disk_lc_slice(dataset_hdf5):
    dataset = lcdata.read_hdf5(dataset_hdf5, in_memory=False)
    light_curves = dataset.light_curves[3:6]
    assert len(light_curves) == 3
    assert len(light_curves[0]) > 0
Example #3
0
def test_dataset_hdf5_disk_load(dataset_hdf5):
    dataset = lcdata.read_hdf5(dataset_hdf5, in_memory=False).load()
    assert len(dataset.light_curves[0]) > 0
Example #4
0
def test_dataset_hdf5_disk_read(dataset_hdf5):
    dataset = lcdata.read_hdf5(dataset_hdf5, in_memory=False)
    assert len(dataset) == 10
Example #5
0
def test_dataset_hdf5_overwrite(dataset_hdf5, dataset_2):
    dataset_2.write_hdf5(dataset_hdf5, overwrite=True)

    dataset = lcdata.read_hdf5(dataset_hdf5)
    assert len(dataset) == 5
Example #6
0
def test_dataset_hdf5_append(dataset_hdf5, dataset_2):
    dataset_2.write_hdf5(dataset_hdf5, append=True)

    dataset = lcdata.read_hdf5(dataset_hdf5)
    assert len(dataset) == 15
Example #7
0
def test_dataset_hdf5_read(dataset_hdf5):
    dataset = lcdata.read_hdf5(dataset_hdf5)
    assert len(dataset) == 10