doppy 0.5.2__tar.gz → 0.5.3__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.2 → doppy-0.5.3}/Cargo.lock +28 -28
- {doppy-0.5.2 → doppy-0.5.3}/Cargo.toml +1 -1
- {doppy-0.5.2 → doppy-0.5.3}/PKG-INFO +1 -1
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/src/raw/halo_hpl.rs +30 -4
- {doppy-0.5.2 → doppy-0.5.3}/LICENSE +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/README.md +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doppy_rs/Cargo.toml +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doppy_rs/src/lib.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doppy_rs/src/raw/halo_hpl.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doppy_rs/src/raw/wls70.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doppy_rs/src/raw.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/.gitignore +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/Cargo.toml +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/src/lib.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/src/raw/error.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/src/raw/wls70.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/crates/doprs/src/raw.rs +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/pyproject.toml +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/__init__.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/__main__.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/bench.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/data/__init__.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/data/api.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/data/cache.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/data/exceptions.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/defaults.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/exceptions.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/netcdf.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/options.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/__init__.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/noise_utils.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/stare.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/stare_depol.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/turbulence.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/product/wind.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/py.typed +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/__init__.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/halo_bg.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/halo_hpl.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/halo_sys_params.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/utils.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/windcube.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/raw/wls70.py +0 -0
- {doppy-0.5.2 → doppy-0.5.3}/src/doppy/utils.py +0 -0
|
@@ -34,9 +34,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
|
34
34
|
|
|
35
35
|
[[package]]
|
|
36
36
|
name = "bitflags"
|
|
37
|
-
version = "2.
|
|
37
|
+
version = "2.9.0"
|
|
38
38
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
-
checksum = "
|
|
39
|
+
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
|
|
40
40
|
|
|
41
41
|
[[package]]
|
|
42
42
|
name = "bumpalo"
|
|
@@ -46,9 +46,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
|
|
|
46
46
|
|
|
47
47
|
[[package]]
|
|
48
48
|
name = "cc"
|
|
49
|
-
version = "1.2.
|
|
49
|
+
version = "1.2.16"
|
|
50
50
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
-
checksum = "
|
|
51
|
+
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
|
|
52
52
|
dependencies = [
|
|
53
53
|
"shlex",
|
|
54
54
|
]
|
|
@@ -106,7 +106,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
|
106
106
|
|
|
107
107
|
[[package]]
|
|
108
108
|
name = "doppy_rs"
|
|
109
|
-
version = "0.5.
|
|
109
|
+
version = "0.5.3"
|
|
110
110
|
dependencies = [
|
|
111
111
|
"doprs",
|
|
112
112
|
"numpy",
|
|
@@ -115,7 +115,7 @@ dependencies = [
|
|
|
115
115
|
|
|
116
116
|
[[package]]
|
|
117
117
|
name = "doprs"
|
|
118
|
-
version = "0.5.
|
|
118
|
+
version = "0.5.3"
|
|
119
119
|
dependencies = [
|
|
120
120
|
"chrono",
|
|
121
121
|
"rayon",
|
|
@@ -124,9 +124,9 @@ dependencies = [
|
|
|
124
124
|
|
|
125
125
|
[[package]]
|
|
126
126
|
name = "either"
|
|
127
|
-
version = "1.
|
|
127
|
+
version = "1.15.0"
|
|
128
128
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
-
checksum = "
|
|
129
|
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
130
130
|
|
|
131
131
|
[[package]]
|
|
132
132
|
name = "heck"
|
|
@@ -159,9 +159,9 @@ dependencies = [
|
|
|
159
159
|
|
|
160
160
|
[[package]]
|
|
161
161
|
name = "indoc"
|
|
162
|
-
version = "2.0.
|
|
162
|
+
version = "2.0.6"
|
|
163
163
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
-
checksum = "
|
|
164
|
+
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
|
|
165
165
|
|
|
166
166
|
[[package]]
|
|
167
167
|
name = "js-sys"
|
|
@@ -175,9 +175,9 @@ dependencies = [
|
|
|
175
175
|
|
|
176
176
|
[[package]]
|
|
177
177
|
name = "libc"
|
|
178
|
-
version = "0.2.
|
|
178
|
+
version = "0.2.171"
|
|
179
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
180
|
+
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
|
181
181
|
|
|
182
182
|
[[package]]
|
|
183
183
|
name = "lock_api"
|
|
@@ -277,9 +277,9 @@ dependencies = [
|
|
|
277
277
|
|
|
278
278
|
[[package]]
|
|
279
279
|
name = "once_cell"
|
|
280
|
-
version = "1.
|
|
280
|
+
version = "1.21.0"
|
|
281
281
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
282
|
-
checksum = "
|
|
282
|
+
checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad"
|
|
283
283
|
|
|
284
284
|
[[package]]
|
|
285
285
|
name = "parking_lot"
|
|
@@ -312,9 +312,9 @@ checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
|
|
|
312
312
|
|
|
313
313
|
[[package]]
|
|
314
314
|
name = "proc-macro2"
|
|
315
|
-
version = "1.0.
|
|
315
|
+
version = "1.0.94"
|
|
316
316
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
317
|
-
checksum = "
|
|
317
|
+
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
|
318
318
|
dependencies = [
|
|
319
319
|
"unicode-ident",
|
|
320
320
|
]
|
|
@@ -384,9 +384,9 @@ dependencies = [
|
|
|
384
384
|
|
|
385
385
|
[[package]]
|
|
386
386
|
name = "quote"
|
|
387
|
-
version = "1.0.
|
|
387
|
+
version = "1.0.40"
|
|
388
388
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
389
|
-
checksum = "
|
|
389
|
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
|
390
390
|
dependencies = [
|
|
391
391
|
"proc-macro2",
|
|
392
392
|
]
|
|
@@ -419,9 +419,9 @@ dependencies = [
|
|
|
419
419
|
|
|
420
420
|
[[package]]
|
|
421
421
|
name = "redox_syscall"
|
|
422
|
-
version = "0.5.
|
|
422
|
+
version = "0.5.10"
|
|
423
423
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
424
|
-
checksum = "
|
|
424
|
+
checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1"
|
|
425
425
|
dependencies = [
|
|
426
426
|
"bitflags",
|
|
427
427
|
]
|
|
@@ -463,9 +463,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
|
463
463
|
|
|
464
464
|
[[package]]
|
|
465
465
|
name = "rustversion"
|
|
466
|
-
version = "1.0.
|
|
466
|
+
version = "1.0.20"
|
|
467
467
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
468
|
-
checksum = "
|
|
468
|
+
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
|
|
469
469
|
|
|
470
470
|
[[package]]
|
|
471
471
|
name = "scopeguard"
|
|
@@ -487,9 +487,9 @@ checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
|
|
|
487
487
|
|
|
488
488
|
[[package]]
|
|
489
489
|
name = "syn"
|
|
490
|
-
version = "2.0.
|
|
490
|
+
version = "2.0.100"
|
|
491
491
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
492
|
-
checksum = "
|
|
492
|
+
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
|
493
493
|
dependencies = [
|
|
494
494
|
"proc-macro2",
|
|
495
495
|
"quote",
|
|
@@ -504,15 +504,15 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
|
504
504
|
|
|
505
505
|
[[package]]
|
|
506
506
|
name = "unicode-ident"
|
|
507
|
-
version = "1.0.
|
|
507
|
+
version = "1.0.18"
|
|
508
508
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
509
|
-
checksum = "
|
|
509
|
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
|
510
510
|
|
|
511
511
|
[[package]]
|
|
512
512
|
name = "unindent"
|
|
513
|
-
version = "0.2.
|
|
513
|
+
version = "0.2.4"
|
|
514
514
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
515
|
-
checksum = "
|
|
515
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
516
516
|
|
|
517
517
|
[[package]]
|
|
518
518
|
name = "wasm-bindgen"
|
|
@@ -29,6 +29,22 @@ pub struct Info {
|
|
|
29
29
|
pub start_time: i64, // Unix-timestamp
|
|
30
30
|
pub system_id: String,
|
|
31
31
|
pub instrument_spectral_width: Option<f64>,
|
|
32
|
+
range_formula: Option<RangeFormula>,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#[derive(Debug, Clone)]
|
|
36
|
+
enum RangeFormula {
|
|
37
|
+
Common, //(range gate + 0.5) * Gate length
|
|
38
|
+
Overlapping, //Gate length / 2 + (range gate x 3)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
impl RangeFormula {
|
|
42
|
+
fn compute_distance(&self, gate_index: f64, range_gate_length: f64) -> f64 {
|
|
43
|
+
match self {
|
|
44
|
+
RangeFormula::Common => (gate_index + 0.5) * range_gate_length,
|
|
45
|
+
RangeFormula::Overlapping => range_gate_length / 2.0 + gate_index * 3.0,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
#[derive(Debug, Default, Clone)]
|
|
@@ -97,7 +113,11 @@ pub fn from_bytes_src(content: &[u8]) -> Result<HaloHpl, RawParseError> {
|
|
|
97
113
|
}
|
|
98
114
|
}
|
|
99
115
|
let info = parse_header(&buf_header)?;
|
|
100
|
-
let
|
|
116
|
+
let range_formula = info
|
|
117
|
+
.range_formula
|
|
118
|
+
.as_ref()
|
|
119
|
+
.ok_or("Cannot find range formula")?;
|
|
120
|
+
let data = parse_data(&mut cur, info.ngates, info.range_gate_length, range_formula)?;
|
|
101
121
|
Ok(HaloHpl { info, data })
|
|
102
122
|
}
|
|
103
123
|
|
|
@@ -105,6 +125,7 @@ fn parse_data(
|
|
|
105
125
|
cur: &mut Cursor<&[u8]>,
|
|
106
126
|
ngates: u64,
|
|
107
127
|
range_gate_length: f64,
|
|
128
|
+
range_formula: &RangeFormula,
|
|
108
129
|
) -> Result<Data, RawParseError> {
|
|
109
130
|
let (n1d, n2d) = infer_data_shape(cur)?;
|
|
110
131
|
if ngates < 1 || n1d < 3 || n2d < 4 {
|
|
@@ -161,7 +182,7 @@ fn parse_data(
|
|
|
161
182
|
time: data_1d[0].clone(),
|
|
162
183
|
radial_distance: gate
|
|
163
184
|
.iter()
|
|
164
|
-
.map(|&x| (x
|
|
185
|
+
.map(|&x| range_formula.compute_distance(x, range_gate_length))
|
|
165
186
|
.collect(),
|
|
166
187
|
azimuth: data_1d[1].clone(),
|
|
167
188
|
elevation: data_1d[2].clone(),
|
|
@@ -249,8 +270,13 @@ fn parse_header(header_bytes: &[u8]) -> Result<Info, RawParseError> {
|
|
|
249
270
|
info.instrument_spectral_width = Some(captures[1].parse()?);
|
|
250
271
|
} else {
|
|
251
272
|
match line.as_str() {
|
|
252
|
-
"Altitude of measurement (center of gate) = (range gate + 0.5) * Gate length"
|
|
253
|
-
"Range of measurement (center of gate) = (range gate + 0.5) * Gate length" =>
|
|
273
|
+
"Altitude of measurement (center of gate) = (range gate + 0.5) * Gate length" |
|
|
274
|
+
"Range of measurement (center of gate) = (range gate + 0.5) * Gate length" => {
|
|
275
|
+
info.range_formula = Some(RangeFormula::Common)
|
|
276
|
+
},
|
|
277
|
+
"Range of measurement (center of gate) = Gate length / 2 + (range gate x 3)" => {
|
|
278
|
+
info.range_formula = Some(RangeFormula::Overlapping)
|
|
279
|
+
},
|
|
254
280
|
"Data line 1: Decimal time (hours) Azimuth (degrees) Elevation (degrees) Pitch (degrees) Roll (degrees)" => (),
|
|
255
281
|
"Data line 1: Decimal time (hours) Azimuth (degrees) Elevation (degrees)" => (),
|
|
256
282
|
"f9.6,1x,f6.2,1x,f6.2" => (),
|
|
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
|