def add_value_vector(self, name, x, unit="", comment="", folder="data", **meta): """Adds a 1dim dataset to the h5 file. This function is a wrapper to create a hdf_dataset object with some predefined arguments. name, x-axis, unit, comment, and folder are parsed to the hdf_dataset init and the ds_type is set. Args: name: String to name the dataset. x: Optional hdf_dataset representing the x-coordinate of the vector. unit: Optional string. comment: Optional string to put in any comment. folder: Optional string ('data' or 'analysis'). Returns: hdf_dataset object. """ ds = hdf_dataset(self.hf, name, x=x, unit=unit, ds_type=ds_types['vector'], comment=comment, folder=folder, dim=1, **meta) return ds
def add_coordinate(self, name, unit="", comment="", folder="data", **meta): """Adds a coordinate dataset to the h5 file. This function is a wrapper to create a hdf_dataset object with some predefined arguments. name, unit, comment, and folder are parsed to the hdf_dataset init and the ds_type is set. The dataset does not have any axes. The data is specifically casted to 64bit float. Args: name: String to name the dataset. unit: Optional string. comment: Optional string to put in any comment. folder: Optional string ('data' or 'analysis'). Returns: hdf_dataset object. """ ds = hdf_dataset(self.hf, name, unit=unit, ds_type=ds_types['coordinate'], comment=comment, folder=folder, dtype='float64', dim=1, **meta) return ds
def add_textlist(self, name, comment="", folder="data", **meta): ds = hdf_dataset(self.hf, name, comment=comment, folder=folder, ds_type=ds_types['txt'], dim=1, **meta) return ds
def add_coordinate(self, name, unit="", comment="", folder="data", **meta): ds = hdf_dataset(self.hf, name, unit=unit, ds_type=ds_types['coordinate'], comment=comment, folder=folder, dtype='float64', **meta) return ds
def add_value_vector(self, name, x=None, unit="", comment="", folder="data", **meta): ds = hdf_dataset(self.hf, name, x=x, unit=unit, ds_type=ds_types['vector'], comment=comment, folder=folder, **meta) return ds
def add_textlist(self,name,comment = "" ,folder="data", **meta): """Adds a dataset containing only text to the h5 file. This function is a wrapper to create a hdf_dataset object with some predefined arguments. name, comment, and folder are parsed to the hdf_dataset init and the ds_type is set. The dataset does not have any axes. Args: name: String to name the dataset. comment: Optional string to put in any comment. folder: Optional string ('data' or 'analysis'). Returns: hdf_dataset object. """ ds = hdf_dataset(self.hf, name, comment = comment, folder=folder, ds_type = ds_types['txt'], dim=1, **meta) return ds
def add_value_matrix(self, name, x=None, y=None, unit="", comment="", folder="data", **meta): ds = hdf_dataset(self.hf, name, x=x, y=y, unit=unit, ds_type=ds_types['matrix'], comment=comment, folder=folder, **meta) return ds
def add_value_box(self, name, x, y, z, unit="", comment="", folder="data", **meta): """Adds a 3dim dataset to the h5 file. This function is a wrapper to create a hdf_dataset object with some predefined arguments. name, x-axis, y-axis, z-axis, unit, comment, and folder are parsed to the hdf_dataset init and the ds_type is set. Our convention here is: y-axis changes "faster" than the x-axis. Args: name: String to name the dataset. x: Optional hdf_dataset representing the x-coordinate of the box. y: Optional hdf_dataset representing the y-coordinato of the box. z: Optional hdf_dataset representing the y-coordinato of the box. unit: Optional string. comment: Optional string to put in any comment. folder: Optional string ('data' or 'analysis'). Returns: hdf_dataset object. """ ds = hdf_dataset(self.hf, name, x=x, y=y, z=z, unit=unit, ds_type=ds_types['box'], comment=comment, folder=folder, dim=3, **meta) return ds
def get_dataset(self, ds_url): return hdf_dataset(self.hf, ds_url=ds_url)