|
18 | 18 | import strax |
19 | 19 | from strax import CutList |
20 | 20 |
|
21 | | - |
22 | 21 | export, __all__ = strax.exporter() |
23 | 22 | __all__.extend(["RUN_DEFAULTS_KEY"]) |
24 | 23 |
|
@@ -1460,8 +1459,9 @@ def _add_saver( |
1460 | 1459 | target_plugin: strax.Plugin, |
1461 | 1460 | combining: bool = False, |
1462 | 1461 | ): |
1463 | | - """Adds savers to already existing savers. Checks if data_type can be stored in any storage |
1464 | | - frontend. |
| 1462 | + """Adds savers to already existing savers. |
| 1463 | +
|
| 1464 | + Checks if data_type can be stored in any storage frontend. |
1465 | 1465 |
|
1466 | 1466 | :param savers: Dictionary of already existing savers. |
1467 | 1467 | :param d_to_save: String of the data_type to be saved. |
@@ -1576,7 +1576,6 @@ def to_absolute_time_range( |
1576 | 1576 | :param full_range: If True returns full time_range of the run. |
1577 | 1577 |
|
1578 | 1578 | """ |
1579 | | - |
1580 | 1579 | selection = ( |
1581 | 1580 | (time_range is None) |
1582 | 1581 | + (seconds_range is None) |
@@ -1624,9 +1623,8 @@ def get_iter( |
1624 | 1623 | ) -> ty.Iterator[strax.Chunk]: |
1625 | 1624 | """Compute target for run_id and iterate over results. |
1626 | 1625 |
|
1627 | | - Do NOT interrupt the iterator (i.e. break): it will keep running stuff |
1628 | | - in background threads... |
1629 | | - {get_docs} |
| 1626 | + Do NOT interrupt the iterator (i.e. break): it will keep running stuff in background |
| 1627 | + threads... {get_docs} |
1630 | 1628 |
|
1631 | 1629 | """ |
1632 | 1630 | if hasattr(run_id, "decode"): |
@@ -1837,9 +1835,9 @@ def make( |
1837 | 1835 | combining=False, |
1838 | 1836 | **kwargs, |
1839 | 1837 | ) -> None: |
1840 | | - """Compute target for run_id. Returns nothing (None). |
| 1838 | + """Compute target for run_id. |
1841 | 1839 |
|
1842 | | - {get_docs} |
| 1840 | + Returns nothing (None). {get_docs} |
1843 | 1841 |
|
1844 | 1842 | """ |
1845 | 1843 | kwargs.setdefault("progress_bar", False) |
@@ -2035,9 +2033,11 @@ def get_zarr( |
2035 | 2033 | overwrite=True, |
2036 | 2034 | **kwargs, |
2037 | 2035 | ): |
2038 | | - """Get persistent arrays using zarr. This is useful when loading large amounts of data that |
2039 | | - cannot fit in memory zarr is very compatible with dask. Targets are loaded into separate |
2040 | | - arrays and runs are merged. the data is added to any existing data in the storage location. |
| 2036 | + """Get persistent arrays using zarr. |
| 2037 | +
|
| 2038 | + This is useful when loading large amounts of data that cannot fit in memory zarr is very |
| 2039 | + compatible with dask. Targets are loaded into separate arrays and runs are merged. the data |
| 2040 | + is added to any existing data in the storage location. |
2041 | 2041 |
|
2042 | 2042 | :param run_ids: (Iterable) run ids you wish to load. |
2043 | 2043 | :param targets: (Iterable) targets to load. |
@@ -2087,9 +2087,10 @@ def get_zarr( |
2087 | 2087 | return group |
2088 | 2088 |
|
2089 | 2089 | def key_for(self, run_id, target, chunk_number=None, combining=False): |
2090 | | - """Get the DataKey for a given run and a given target plugin. The DataKey is inferred from |
2091 | | - the plugin lineage. The lineage can come either from the _fixed_plugin_cache or computed on |
2092 | | - the fly. |
| 2090 | + """Get the DataKey for a given run and a given target plugin. |
| 2091 | +
|
| 2092 | + The DataKey is inferred from the plugin lineage. The lineage can come either from the |
| 2093 | + _fixed_plugin_cache or computed on the fly. |
2093 | 2094 |
|
2094 | 2095 | :param run_id: run id to get |
2095 | 2096 | :param target: data type to get |
@@ -2510,7 +2511,6 @@ def merge_per_chunk_storage( |
2510 | 2511 | check_is_stored: bool = True, |
2511 | 2512 | ): |
2512 | 2513 | """Merge the per-chunked data from the per-chunked dependency into the target storage.""" |
2513 | | - |
2514 | 2514 | if check_is_stored and self.is_stored(run_id, target): |
2515 | 2515 | raise ValueError(f"Data {target} for {run_id} already exists.") |
2516 | 2516 |
|
@@ -2894,7 +2894,6 @@ def tree_levels(self): |
2894 | 2894 | 'class': 'Peaks', 'index': 0, 'order': 1}} |
2895 | 2895 |
|
2896 | 2896 | """ |
2897 | | - |
2898 | 2897 | context_hash = self._context_hash() |
2899 | 2898 | if self._fixed_level_cache is not None and context_hash in self._fixed_level_cache: |
2900 | 2899 | return self._fixed_level_cache[context_hash] |
|
0 commit comments