Determine if the row is missing. Different versions of Databroker will return differnent value types.
(row_data)
| 2835 | data_primary = hdr.primary["data"] |
| 2836 | |
| 2837 | def _is_row_missing(row_data): |
| 2838 | """ |
| 2839 | Determine if the row is missing. Different versions of Databroker will return differnent value types. |
| 2840 | """ |
| 2841 | if row_data is None: |
| 2842 | return True |
| 2843 | elif isinstance(row_data, np.ndarray) and sum(np.isnan(row_data)): |
| 2844 | # Tiled is expected to replace missing data with NaNs, but we don't want NaNs or 0s in scalers |
| 2845 | return True |
| 2846 | elif isinstance(row_data, np.ndarray) and (row_data.size == 1) and (row_data == np.array(None)): |
| 2847 | # This is returned by databroker.v0 |
| 2848 | return True |
| 2849 | elif not len(row_data): |
| 2850 | return True |
| 2851 | else: |
| 2852 | return False |
| 2853 | |
| 2854 | def _get_row_len(row_data): |
| 2855 | if _is_row_missing(row_data): |
no outgoing calls
no test coverage detected