doppy 0.5.4__tar.gz → 0.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of doppy might be problematic. Click here for more details.
- {doppy-0.5.4 → doppy-0.5.5}/Cargo.lock +2 -2
- {doppy-0.5.4 → doppy-0.5.5}/Cargo.toml +1 -1
- {doppy-0.5.4 → doppy-0.5.5}/PKG-INFO +1 -1
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/Cargo.toml +1 -0
- doppy-0.5.5/crates/doprs/README.md +5 -0
- doppy-0.5.5/crates/doprs/src/bin/parse_halo.rs +8 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/raw/halo_hpl.rs +26 -6
- {doppy-0.5.4 → doppy-0.5.5}/LICENSE +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/README.md +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/Cargo.toml +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/src/lib.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/src/raw/halo_hpl.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/src/raw/wls70.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/src/raw/wls77.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doppy_rs/src/raw.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/.gitignore +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/bin/parse_wls70.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/bin/parse_wls77.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/lib.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/raw/error.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/raw/wls70.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/raw/wls77.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/crates/doprs/src/raw.rs +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/pyproject.toml +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/__init__.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/__main__.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/bench.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/data/__init__.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/data/api.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/data/cache.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/data/exceptions.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/defaults.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/exceptions.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/netcdf.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/options.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/__init__.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/noise_utils.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/stare.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/stare_depol.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/turbulence.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/product/wind.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/py.typed +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/__init__.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/halo_bg.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/halo_hpl.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/halo_sys_params.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/utils.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/windcube.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/wls70.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/raw/wls77.py +0 -0
- {doppy-0.5.4 → doppy-0.5.5}/src/doppy/utils.py +0 -0
|
@@ -106,7 +106,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
|
106
106
|
|
|
107
107
|
[[package]]
|
|
108
108
|
name = "doppy_rs"
|
|
109
|
-
version = "0.5.
|
|
109
|
+
version = "0.5.5"
|
|
110
110
|
dependencies = [
|
|
111
111
|
"doprs",
|
|
112
112
|
"ndarray 0.16.1",
|
|
@@ -116,7 +116,7 @@ dependencies = [
|
|
|
116
116
|
|
|
117
117
|
[[package]]
|
|
118
118
|
name = "doprs"
|
|
119
|
-
version = "0.5.
|
|
119
|
+
version = "0.5.5"
|
|
120
120
|
dependencies = [
|
|
121
121
|
"chrono",
|
|
122
122
|
"ndarray 0.16.1",
|
|
@@ -34,15 +34,21 @@ pub struct Info {
|
|
|
34
34
|
|
|
35
35
|
#[derive(Debug, Clone)]
|
|
36
36
|
enum RangeFormula {
|
|
37
|
-
Common,
|
|
38
|
-
Overlapping
|
|
37
|
+
Common, //(range gate + 0.5) * Gate length
|
|
38
|
+
Overlapping {
|
|
39
|
+
gate_length_div: f64,
|
|
40
|
+
gate_index_mul: f64,
|
|
41
|
+
}, //Gate length / gate_length_div + (range gate x gate_index_mul)
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
impl RangeFormula {
|
|
42
45
|
fn compute_distance(&self, gate_index: f64, range_gate_length: f64) -> f64 {
|
|
43
46
|
match self {
|
|
44
47
|
RangeFormula::Common => (gate_index + 0.5) * range_gate_length,
|
|
45
|
-
RangeFormula::Overlapping
|
|
48
|
+
RangeFormula::Overlapping {
|
|
49
|
+
gate_length_div,
|
|
50
|
+
gate_index_mul,
|
|
51
|
+
} => range_gate_length / gate_length_div + gate_index * gate_index_mul,
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
}
|
|
@@ -231,7 +237,11 @@ fn infer_data_shape(cur: &mut Cursor<&[u8]>) -> Result<(u64, u64), RawParseError
|
|
|
231
237
|
|
|
232
238
|
fn parse_header(header_bytes: &[u8]) -> Result<Info, RawParseError> {
|
|
233
239
|
let mut info = Info::default();
|
|
234
|
-
let
|
|
240
|
+
let re_spectral = regex::Regex::new(r"^**** Instrument spectral width = (\d+(?:\.\d+)?)$")?;
|
|
241
|
+
let re_overlapping = regex::Regex::new(
|
|
242
|
+
r"^Range of measurement \(center of gate\) = Gate length / (\d+(?:\.\d+)?) \+ \(range gate x (\d+(?:\.\d+)?)\)$",
|
|
243
|
+
)?;
|
|
244
|
+
|
|
235
245
|
for line in header_bytes
|
|
236
246
|
.split(|&b| b == b'\n')
|
|
237
247
|
.filter(|line| !line.is_empty())
|
|
@@ -266,8 +276,18 @@ fn parse_header(header_bytes: &[u8]) -> Result<Info, RawParseError> {
|
|
|
266
276
|
}
|
|
267
277
|
} else {
|
|
268
278
|
let line = std::str::from_utf8(line)?.trim().to_string();
|
|
269
|
-
if let Some(captures) =
|
|
279
|
+
if let Some(captures) = re_spectral.captures(&line) {
|
|
270
280
|
info.instrument_spectral_width = Some(captures[1].parse()?);
|
|
281
|
+
} else if let Some(captures) = re_overlapping.captures(&line) {
|
|
282
|
+
let divisor = captures[1].parse()?;
|
|
283
|
+
let multiplier = captures[2].parse()?;
|
|
284
|
+
if !(divisor > 0.0 && divisor < 10.0 && multiplier > 0.0 && multiplier < 10.0) {
|
|
285
|
+
return Err(format!("Suspicious range formula: {}", line).into());
|
|
286
|
+
}
|
|
287
|
+
info.range_formula = Some(RangeFormula::Overlapping {
|
|
288
|
+
gate_length_div: divisor,
|
|
289
|
+
gate_index_mul: multiplier,
|
|
290
|
+
});
|
|
271
291
|
} else {
|
|
272
292
|
match line.as_str() {
|
|
273
293
|
"Altitude of measurement (center of gate) = (range gate + 0.5) * Gate length" |
|
|
@@ -275,7 +295,7 @@ fn parse_header(header_bytes: &[u8]) -> Result<Info, RawParseError> {
|
|
|
275
295
|
info.range_formula = Some(RangeFormula::Common)
|
|
276
296
|
},
|
|
277
297
|
"Range of measurement (center of gate) = Gate length / 2 + (range gate x 3)" => {
|
|
278
|
-
info.range_formula = Some(RangeFormula::Overlapping)
|
|
298
|
+
info.range_formula = Some(RangeFormula::Overlapping{gate_length_div: 2.0, gate_index_mul: 3.0})
|
|
279
299
|
},
|
|
280
300
|
"Data line 1: Decimal time (hours) Azimuth (degrees) Elevation (degrees) Pitch (degrees) Roll (degrees)" => (),
|
|
281
301
|
"Data line 1: Decimal time (hours) Azimuth (degrees) Elevation (degrees)" => (),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|