sciapy.level1c._types   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
eloc 25
dl 0
loc 31
ccs 7
cts 8
cp 0.875
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A _try_decode() 0 4 2
1
# common data types for consistency
2 1
import numpy as np
3
4 1
_float_type = np.float32
5 1
_int_type = np.int32
6
7 1
_limb_data_dtype = [
8
	("sub_sat_lat", _float_type),
9
	("sub_sat_lon", _float_type),
10
	("tp_lat", _float_type),
11
	("tp_lon", _float_type),
12
	("tp_alt", _float_type),
13
	("tp_sza", _float_type),
14
	("tp_saa", _float_type),
15
	("tp_los", _float_type),
16
	("toa_sza", _float_type),
17
	("toa_saa", _float_type),
18
	("toa_los", _float_type),
19
	("sat_sza", _float_type),
20
	("sat_saa", _float_type),
21
	("sat_los", _float_type),
22
	("sat_alt", _float_type),
23
	("earth_rad", _float_type),
24
]
25
26
27 1
def _try_decode(s):
28 1
	if hasattr(s, "decode"):
29
		return s.decode()
30
	return s
31