-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathionospheric_layer_trace.py
More file actions
38 lines (29 loc) · 942 Bytes
/
ionospheric_layer_trace.py
File metadata and controls
38 lines (29 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import numpy as np
class Modes:
ORDINARY = "ordinary"
EXTRAORDINARY = "extraordinary"
class IonosphericLayers:
E_LAYER = "E"
F1_LAYER = "F1"
F2_LAYER = "F2"
ES_LAYER = "Es"
class IonosphericLayerTrace:
def __init__(
self, name: str, freqs, heights, critical_frequency=None, trace_type=Modes.ORDINARY
):
self.name = name
self.freqs = np.array(freqs)
self.heights = np.array(heights)
self.critical_frequency = critical_frequency
self.trace_type = trace_type
def get_critical_frequency(self):
return self.critical_frequency
def to_dict(self):
"""Return trace data as a dictionary."""
return {
"name": self.name,
"freqs": self.freqs.tolist(),
"heights": self.heights.tolist(),
"critical_frequency": self.critical_frequency,
"trace_type": self.trace_type,
}