mth5.tables package
Submodules
mth5.tables.channel_table module
Created on Wed Mar 23 14:09:38 2022
@author: jpeacock
mth5.tables.mth5_table module
Created on Wed Dec 23 16:53:55 2020
- author
Jared Peacock
- license
MIT
- class mth5.tables.mth5_table.MTH5Table(hdf5_dataset)[source]
Bases:
object
Use the underlying NumPy basics, there are simple actions in this table, if a user wants to use something more sophisticated for querying they should try using a pandas table. In this case entries in the table are more difficult to change and datatypes need to be kept track of.
- add_row(row, index=None)[source]
Add a row to the table.
row must be of the same data type as the table
- Parameters
row (TYPE) – row entry for the table
index (integer, if None is given then the row is added to the end of the array) – index of row to add
- Returns
index of the row added
- Return type
integer
- clear_table()[source]
clear a table,
Basically delete the table and start over :return: DESCRIPTION :rtype: TYPE
- property dtype
- locate(column, value, test='eq')[source]
locate index where column is equal to value :param column: DESCRIPTION :type column: TYPE :param value: DESCRIPTION :type value: TYPE :type test: type of test to try * ‘eq’: equals * ‘lt’: less than * ‘le’: less than or equal to * ‘gt’: greater than * ‘ge’: greater than or equal to. * ‘be’: between or equal to * ‘bt’: between
If be or bt input value as a list of 2 values
- Returns
DESCRIPTION
- Return type
TYPE
- property nrows
- remove_row(index)[source]
Remove a row
Note
that there is not index value within the array, so the indexing is on the fly. A user should use the HDF5 reference instead of index number that is the safest and most robust method.
- Parameters
index (TYPE) – DESCRIPTION
- Returns
DESCRIPTION
- Return type
TYPE
This isn’t as easy as just deleteing an element. Need to delete the element from the weakly referenced array and then set the summary table dataset to the new array.
So set to a null array for now until a more clever option is found.
- property shape
mth5.tables.tf_table module
Created on Wed Mar 23 14:09:38 2022
@author: jpeacock
Module contents
- class mth5.tables.ChannelSummaryTable(hdf5_dataset)[source]
Bases:
MTH5Table
Object to hold the channel summary and provide some convenience functions like fill, to_dataframe …
- class mth5.tables.MTH5Table(hdf5_dataset)[source]
Bases:
object
Use the underlying NumPy basics, there are simple actions in this table, if a user wants to use something more sophisticated for querying they should try using a pandas table. In this case entries in the table are more difficult to change and datatypes need to be kept track of.
- add_row(row, index=None)[source]
Add a row to the table.
row must be of the same data type as the table
- Parameters
row (TYPE) – row entry for the table
index (integer, if None is given then the row is added to the end of the array) – index of row to add
- Returns
index of the row added
- Return type
integer
- clear_table()[source]
clear a table,
Basically delete the table and start over :return: DESCRIPTION :rtype: TYPE
- property dtype
- locate(column, value, test='eq')[source]
locate index where column is equal to value :param column: DESCRIPTION :type column: TYPE :param value: DESCRIPTION :type value: TYPE :type test: type of test to try * ‘eq’: equals * ‘lt’: less than * ‘le’: less than or equal to * ‘gt’: greater than * ‘ge’: greater than or equal to. * ‘be’: between or equal to * ‘bt’: between
If be or bt input value as a list of 2 values
- Returns
DESCRIPTION
- Return type
TYPE
- property nrows
- remove_row(index)[source]
Remove a row
Note
that there is not index value within the array, so the indexing is on the fly. A user should use the HDF5 reference instead of index number that is the safest and most robust method.
- Parameters
index (TYPE) – DESCRIPTION
- Returns
DESCRIPTION
- Return type
TYPE
This isn’t as easy as just deleteing an element. Need to delete the element from the weakly referenced array and then set the summary table dataset to the new array.
So set to a null array for now until a more clever option is found.
- property shape