Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions src/subscript/casegen_upcars/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,19 +490,15 @@ def _build_grid(self):

self._xv, self._yv = np.meshgrid(self._x, self._y)
if self._a * self._b * self._c != 0.0:
self._zv = (
-self._c
* np.sqrt(
np.clip(
1.0
- (self._xv - x_mid) ** 2 / self._a ** 2
- (self._yv - y_mid) ** 2 / self._b ** 2,
0,
None,
)
self._zv = -self._c * np.sqrt(
np.clip(
1.0
- (self._xv - x_mid) ** 2 / self._a**2
- (self._yv - y_mid) ** 2 / self._b**2,
0,
None,
)
+ (self._xv - x_mid) * math.tan(math.radians(self._tilt))
)
) + (self._xv - x_mid) * math.tan(math.radians(self._tilt))
else:
self._zv = (self._xv - x_mid) * math.tan(math.radians(self._tilt))

Expand Down
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==21.12b0
black
check-manifest
flake8
isort
Expand Down
6 changes: 5 additions & 1 deletion tests/test_fmuobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,11 @@ def test_ert_workflow_hook(verbose, tmp_path):

# Verify that we can control whether INFO messages from fmuobs through ERT
# is emitted:
ert_log_filename = "ert-log.txt" # Beware, this filename is controlled by ERT
ert_log_filename = "ert-log" # Beware, this filename is controlled by ERT
for file in os.listdir():
if file.startswith(ert_log_filename):
ert_log_filename = file
break
assert Path(ert_log_filename).exists()
ert_output = Path(ert_log_filename).read_text(encoding="utf8")

Expand Down