Mesh.get_obstruction_mask_slice cuts the time axis for 3D slices
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 90/100
Hướng nghiên cứu
Đọc fdsreader/fds_classes/mesh.py trong get_obstruction_mask_slice() (khoảng dòng 80), nơi mask_indices[orientation] được xây dựng, và so sánh với Slice.to_global(masked=True), nơi mask được broadcast đối với dữ liệu của slice. Triển khai lệnh trả về sớm cho orientation == 0 bằng self.get_obstruction_mask(subslice.times, cell_centered=cell_centered). Hoàn thành có nghĩa là một slice 3D trả về mask có dạng (n_t, nx, ny, nz) khớp với dữ liệu — tái hiện với trường hợp tổng hợp từ issue #124 (mask (1,5,5,5) so với dữ liệu (2,5,5,5)) và xác nhận các slice 2D không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Mesh.get_obstruction_mask_slice() (fdsreader/fds_classes/mesh.py, around line 80) selects the slice plane with
mask_indices = [slice(None)] * 4
mask_indices[orientation] = slice(slc_index, slc_index + 1, 1)
The mask is indexed (t, x, y, z), so for a 2D slice orientation (1, 2 or 3) hits the right spatial axis. For a 3D slice orientation == 0, so the same line cuts the time axis down to a single frame instead of leaving the mask untouched. Which frame survives is accidental: with orientation == 0, subslice.extent[0] and dimension=(0,) both wrap to z, so slc_index is the z index of the slice's lower z bound (0 when the slice starts at the mesh bottom). If that index is >= n_t, the selection is empty.
The returned mask then has shape (1, nx, ny, nz) while the data has (n_t, nx, ny, nz). In Slice.to_global(masked=True), np.where(mask, slc_data, fill) broadcasts that one frame over all time steps, so every time step is masked with the obstructions visible at that one frame (the first time step in the common case). For example, an obstruction removed after t = 0 still masks the corresponding cells, and one that appears later does not mask anything. A synthetic check during review of #124 showed mask (1, 5, 5, 5) against data (2, 5, 5, 5), with an obstructed cell at the second time step left unmasked.
Expected: for orientation == 0, return the full time-dependent mask from get_obstruction_mask(subslice.times, cell_centered=...).
Suggested fix: return early for 3D slices, e.g.
if orientation == 0:
return self.get_obstruction_mask(subslice.times, cell_centered=cell_centered)
2D slices are not affected. Found while reviewing the fix for #123.
- Ngôn ngữ chính
- Python
- Star
- 76
- Fork
- 28
- Merge trung bình
- 16 giờ 49 phút
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FireDynamics/fdsreader
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FireDynamics/fdsreader#133 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Get RGBA-Value of obstruction from Surf_IdCó thể làm lại được @goelakash đã nhận 39 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
FireDynamics/fdsreader#77 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
to_global has Problem with different cell-sizesCó thể làm lại được @lu-kas đã nhận 836 ngày trước và không có pull request nào đang mở. Đang mở
FireDynamics/fdsreader#49 · 8 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Parallel readingĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
FireDynamics/fdsreader#23 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của FireDynamics/fdsreader
Issue tương tự
-
get_page_thumbnail modifies cached page images, affecting later thumbnails and picture exportsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
docling-project/docling-mcp#147 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
autowarefoundation/autoware_carla_scenario#405 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mohitmishra786/readprism#322 ·
Maintainer thường phản hồi trong vòng 1 ngày