Compare commits
No commits in common. "eda84fa990d7f94247fc6c36351cb087217c43ea" and "ce93b5e7b11ba3a6efcbc64285873808e84bcc00" have entirely different histories.
eda84fa990
...
ce93b5e7b1
1 changed files with 1 additions and 23 deletions
|
@ -3,13 +3,11 @@ import cairo
|
||||||
|
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
|
||||||
from xmet.sounding import Sounding, SoundingParameters
|
from xmet.sounding import Sounding
|
||||||
from xmet.thermo import loft_parcel, moist_lapse_rate, \
|
from xmet.thermo import loft_parcel, moist_lapse_rate, \
|
||||||
LAPSE_RATE_DRY, PRESSURE_MAX, PRESSURE_MIN, \
|
LAPSE_RATE_DRY, PRESSURE_MAX, PRESSURE_MIN, \
|
||||||
PRESSURE_STEP
|
PRESSURE_STEP
|
||||||
|
|
||||||
from xmet.series import Series
|
|
||||||
|
|
||||||
PRESSURE_LOG_MAX = math.log(PRESSURE_MAX)
|
PRESSURE_LOG_MAX = math.log(PRESSURE_MAX)
|
||||||
PRESSURE_LOG_MIN = math.log(PRESSURE_MIN)
|
PRESSURE_LOG_MIN = math.log(PRESSURE_MIN)
|
||||||
PRESSURE_LOG_RANGE = PRESSURE_LOG_MAX - PRESSURE_LOG_MIN
|
PRESSURE_LOG_RANGE = PRESSURE_LOG_MAX - PRESSURE_LOG_MIN
|
||||||
|
@ -142,26 +140,6 @@ class SkewTGraph():
|
||||||
|
|
||||||
cr.restore()
|
cr.restore()
|
||||||
|
|
||||||
def draw_series(self,
|
|
||||||
cr: cairo.Context,
|
|
||||||
x: float,
|
|
||||||
y: float,
|
|
||||||
series: Series):
|
|
||||||
first = True
|
|
||||||
|
|
||||||
for pressure in series:
|
|
||||||
temp = series[pressure]
|
|
||||||
|
|
||||||
sx, sy = self.sample_to_screen(temp, pressure)
|
|
||||||
|
|
||||||
if first:
|
|
||||||
cr.move_to(x + sx, y + sy)
|
|
||||||
first = False
|
|
||||||
else:
|
|
||||||
cr.line_to(x + sx, y + sy)
|
|
||||||
|
|
||||||
cr.stroke()
|
|
||||||
|
|
||||||
def draw_sounding(self,
|
def draw_sounding(self,
|
||||||
cr: cairo.Context,
|
cr: cairo.Context,
|
||||||
x: float,
|
x: float,
|
||||||
|
|
Loading…
Add table
Reference in a new issue