mth5 icon indicating copy to clipboard operation
mth5 copied to clipboard

More permissive data storage in the FC Level

Open kkappler opened this issue 1 year ago • 0 comments

  • FCs are currently stored as complex, however, it is possible that one may wish to store amplitude, phase instead of real/imaginary, or that they may wish to store other features at the FC level, that are real, or boolean valued.

  • The FC Level Dataset also assumes linear spaced frequencies, but we may wish to calculate and store some features of FCs (such as cross-spectra) on log-spaced bands. To make this work we would want from_xarray() to store the coordinates of the incoming array somewhere, and access them when we call to_xarray()

It is possible that we should we consider a frequency domain features layer instead of modifying the FC layer.

Possibly we want to be able to define the dtype for a group based on the data passed in:

SUPPORTED_DTYPES = {"complex":complex,"float":float, "int":int}

and then pass a kwarg to add_channel such as dtype="complex" then

dataset = self.hdf5_group.create_dataset(
                fc_name,
                data=fc_data,
                dtype=SUPPORTED_DTYPES[dtype],
                chunks=chunks,
                maxshape=max_shape,
                **self.dataset_options,
            )

kkappler avatar Mar 22 '24 21:03 kkappler