|
1 | | -""" |
2 | | -Conversion tool for StreamLine .hpl files into netCDF (.nc) files: |
3 | | -
|
4 | | - - hpl2dict(): import .hpl files and save as dictionary |
5 | | - - hpl_to_netcdf(): save .hpl files into level0 (l0) .nc files |
6 | | - - to_netcdf_l1(): correct raw data (l0) and create level1 (l1) netCDF files |
| 1 | +#!/usr/bin/env python |
| 2 | +# Copyright (c) 2024, openradar developers. |
| 3 | +# Distributed under the MIT License. See LICENSE for more info. |
7 | 4 |
|
8 | 5 | """ |
9 | 6 |
|
10 | | -import io |
| 7 | +StreamLine HPL |
| 8 | +============== |
11 | 9 |
|
12 | | -import numpy as np |
13 | | -import pandas as pd |
14 | | -import xarray as xr |
| 10 | +This sub-module contains the StreamLine HPL xarray backend for reading StreamLine-based lidar |
| 11 | +data into Xarray structures. |
15 | 12 |
|
16 | | -""" |
17 | 13 | Import of StreamLine .hpl (txt) files and save locally in directory. Therefore |
18 | 14 | the data is converted into matrices with dimension "number of range gates" x "time stamp/rays". |
19 | 15 | In newer versions of the StreamLine software, the spectral width can be |
20 | 16 | stored as additional parameter in the .hpl files. |
| 17 | +
|
| 18 | +.. autosummary:: |
| 19 | + :nosignatures: |
| 20 | + :toctree: generated/ |
| 21 | +
|
| 22 | + {} |
| 23 | +
|
21 | 24 | """ |
22 | 25 |
|
| 26 | +__all__ = [ |
| 27 | + "HPLBackendEntrypoint", |
| 28 | + "open_hpl_datatree", |
| 29 | +] |
| 30 | + |
| 31 | +__doc__ = __doc__.format("\n ".join(__all__)) |
| 32 | + |
| 33 | +import io |
23 | 34 | from collections import OrderedDict |
24 | 35 | from datetime import datetime, timedelta |
25 | 36 |
|
| 37 | +import numpy as np |
| 38 | +import pandas as pd |
| 39 | +import xarray as xr |
26 | 40 | from datatree import DataTree |
27 | 41 | from xarray.backends.common import AbstractDataStore, BackendArray, BackendEntrypoint |
28 | 42 | from xarray.backends.file_manager import CachingFileManager |
|
40 | 54 | ) |
41 | 55 | from .common import _assign_root, _attach_sweep_groups |
42 | 56 |
|
43 | | -__all__ = [ |
44 | | - "HPLBackendEntrypoint", |
45 | | - "open_hpl_datatree", |
46 | | -] |
47 | | - |
48 | | -__doc__ = __doc__.format("\n ".join(__all__)) |
49 | | - |
50 | 57 | variable_attr_dict = {} |
51 | 58 | variable_attr_dict["intensity"] = { |
52 | 59 | "long_name": "Backscatter intensity", |
|
0 commit comments