pint.toa_select.TOASelect
- class pint.toa_select.TOASelect(is_range, use_hash=False)[source]
Bases:
object
Select toas from toa table based on a given condition.
The selection result will be saved in the select_result attribute as a mini caching for the future calculation.
- Parameters:
Note
- The supported condition types are:
Ranged condition in the format of {‘DMX_0001’:(54000, 54001), …}
Key condition in the format of {‘JUMP1’: ‘L-wide’, …}
Putting an object as condition will slow the process dramatically.
Methods
check_condition
(new_cond)Check if the condition that same with old input.
check_table_column
(new_column)check if a table column has been changed from the old one.
get_select_index
(condition, column)get_select_non_range
(condition, column)A function get the selected toa index via compare the key value.
get_select_range
(condition, column)A function get the selected toa index via a range comparison.
- check_condition(new_cond)[source]
Check if the condition that same with old input.
The new condition’s information will be updated to the ‘condition’ attribute.
- Parameters:
new_cond (dict) – New condition for selection.
- check_table_column(new_column)[source]
check if a table column has been changed from the old one.
The column information will be updated to the new column if they are not the same.
- Parameters:
column (toas.table column) – The toa table column that the condition is applied on
- Returns:
True for column is the same as old one False for column has been changed.
- Return type: