# Path: caput/tod.py
# class TOData(memh5.BasicCont):
# class Reader:
#     def time(self):
#     def from_mult_files(
#         cls,
#         files,
#         data_group=None,
#         start=None,
#         stop=None,
#         datasets=None,
#         dataset_filter=None,
#         **kwargs
#     ):
#     def convert_time(time):
#     def __init__(self, files):
#     def files(self):
#     def time(self):
#     def datasets(self):
#     def time_sel(self):
#     def time_sel(self, value):
#     def dataset_sel(self):
#     def dataset_sel(self, value):
#     def select_time_range(self, start_time=None, stop_time=None):
#     def read(self, out_group=None):
# def concatenate(
#     data_list,
#     out_group=None,
#     start=None,
#     stop=None,
#     datasets=None,
#     dataset_filter=None,
#     convert_attribute_strings=True,
#     convert_dataset_strings=False,
# ):
#         def dataset_filter(d):
# def ensure_file_list(files):
# def _copy_non_time_data(
#     data,
#     out=None,
#     to_dataset_names=None,
#     convert_attribute_strings=True,
#     convert_dataset_strings=False,
# ):
# def _start_stop_inds(start, stop, ntime):
# def _get_in_out_slice(start, stop, current, ntime):


import unittest
import numpy as np
from caput import tod
        for nt in ntime:
            this_time = this_t_start + np.arange(nt) * delta_t
            this_t_start += nt * delta_t

            data = tod.TOData()
            data.create_index_map("time", this_time)
            data.create_index_map("chan", chan)

            ds1 = data.create_dataset("dset1", data=chan[:, None] * this_time)
            ds1.attrs["axis"] = ["chan", "time"]

            ds2 = data.create_dataset("dset2", data=this_time)
            ds2.attrs["axis"] = ["time"]

            todlist.append(data)
        self.todlist = todlist

    def test_from_files(self):

        data = tod.TOData.from_mult_files(self.todlist)
        self.assertTrue(
            np.all(
                data["dset1"][:]
                == data.index_map["chan"][:, None] * data.index_map["time"]
            )
        )
        self.assertEqual(data["dset1"].shape, (self.nchan, self.ntime))

    def test_reader(self):


# Path: caput/tod.py
# class TOData(memh5.BasicCont):
# class Reader:
#     def time(self):
#     def from_mult_files(
#         cls,
#         files,
#         data_group=None,
#         start=None,
#         stop=None,
#         datasets=None,
#         dataset_filter=None,
#         **kwargs
#     ):
#     def convert_time(time):
#     def __init__(self, files):
#     def files(self):
#     def time(self):
#     def datasets(self):
#     def time_sel(self):
#     def time_sel(self, value):
#     def dataset_sel(self):
#     def dataset_sel(self, value):
#     def select_time_range(self, start_time=None, stop_time=None):
#     def read(self, out_group=None):
# def concatenate(
#     data_list,
#     out_group=None,
#     start=None,
#     stop=None,
#     datasets=None,
#     dataset_filter=None,
#     convert_attribute_strings=True,
#     convert_dataset_strings=False,
# ):
#         def dataset_filter(d):
# def ensure_file_list(files):
# def _copy_non_time_data(
#     data,
#     out=None,
#     to_dataset_names=None,
#     convert_attribute_strings=True,
#     convert_dataset_strings=False,
# ):
# def _start_stop_inds(start, stop, ntime):
# def _get_in_out_slice(start, stop, current, ntime):


# Path: caput/tests/test_tod.py
import unittest
import numpy as np
from caput import tod

        for nt in ntime:
            this_time = this_t_start + np.arange(nt) * delta_t
            this_t_start += nt * delta_t

            data = tod.TOData()
            data.create_index_map("time", this_time)
            data.create_index_map("chan", chan)

            ds1 = data.create_dataset("dset1", data=chan[:, None] * this_time)
            ds1.attrs["axis"] = ["chan", "time"]

            ds2 = data.create_dataset("dset2", data=this_time)
            ds2.attrs["axis"] = ["time"]

            todlist.append(data)
        self.todlist = todlist

    def test_from_files(self):

        data = tod.TOData.from_mult_files(self.todlist)
        self.assertTrue(
            np.all(
                data["dset1"][:]
                == data.index_map["chan"][:, None] * data.index_map["time"]
            )
        )
        self.assertEqual(data["dset1"].shape, (self.nchan, self.ntime))

    def test_reader(self):


        reader = tod.Reader(self.todlist)