Clock offset (exif_time_infront_real_time) is not applied to Experiment_Time[s]
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với _calc_experiment_and_real_time trong ledsa/data_extraction/init_functions.py và so sánh cách tính thời gian của nó với ConfigData.get_start_time trong ledsa/core/ConfigData.py. Bổ sung kiểm thử hồi quy cho trường hợp ảnh đầu tiên có start_time lấy từ thời gian EXIF và trường hợp hai camera có độ lệch khác nhau. Công việc hoàn tất khi cả hai trường hợp tạo ra trục thời gian chung của thí nghiệm như mong đợi; cập nhật tài liệu cấu hình để nêu rõ start_time được đặt thủ công sử dụng giờ thực trên đồng hồ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The camera clock offset exif_time_infront_real_time is only applied to Time[s]. It never reaches Experiment_Time[s].
ConfigData.get_start_timemovesstart_timeonto the real clock: it subtracts the offset from the EXIF time of the first image (ConfigData.py#L494)._calc_experiment_and_real_timethen measures the experiment time from the uncorrected EXIF time (init_functions.py#L130):
experiment_time = date_time_img - config.get_datetime() # camera clock − real clock
...
time = date_time_img - timedelta(seconds=time_diff) # only Time[s] is corrected
So every Experiment_Time[s] is off by exif_time_infront_real_time.
Effects
- One camera: every time moves by the same amount. When
start_timecomes from the first image, that image sits at t = offset instead of 0. A temperature reduction table built on the lab clock is read that many seconds off. - Several cameras: the stacked analysis matches the cameras by
Experiment_Time[s](_load_time_map→read_experiment_times, StackedExtinctionCoefficients.py#L575). Their time axes stay apart by the difference of their offsets, which is the gap the clock photos were meant to remove.
Reproduction
Camera clock 30 s ahead, one image every 10 s, start_time left to be read from image 1 (EXIF times faked):
start_time = 12:00:00
#Count,Name,Time[s],Experiment_Time[s]
1,img0001.jpg,12:00:00.000,30.0
2,img0002.jpg,12:00:10.000,40.0
3,img0003.jpg,12:00:20.000,50.0
Time[s] of image 1 equals start_time, yet its experiment time is 30 s.
Suggested fix
Measure the experiment time from the corrected time, the same way start_time is computed:
date_time_img = get_exif_datetime(img_path, tag)
- experiment_time = date_time_img - config.get_datetime()
- experiment_time = experiment_time.total_seconds()
time_diff = config.getfloat(build_type, 'exif_time_infront_real_time')
time = date_time_img - timedelta(seconds=time_diff)
+ # start_time is on the real clock, so the experiment time is measured from the corrected image time
+ experiment_time = (time - config.get_datetime()).total_seconds()
return experiment_time, time
With this change the reproduction gives 0, 10, 20 s, and the existing unit tests (370) still pass. A regression test should cover two cases:
- With
start_timederived from the first image, that image is at 0. - Two cameras with offsets of +30 s and −5 s and the same
start_timegive the same experiment times.
Things to note
- Semantics of a hand-set
start_time: after the fix,start_timeis read as a real-clock (lab) time, as it already is when LEDSA derives it. The config docs should say so explicitly. - Existing results:
image_infos*.csvwritten before the fix, and everything built on them, are shifted by the offset. They must be regenerated, and so must any temperature reduction table that was aligned to the old axis. The demo hastime_diff_to_image_time = -1, so its times move by 1 s. - Multi-camera, out of scope here: even after the fix, cameras share a time axis only when their
start_timeis the same real time. If each camera derivesstart_timefrom its own first image, the axes still differ by the gap between those first images. It may be worth a check or a warning in the stacked analysis.
- Ngôn ngữ chính
- Python
- Star
- 7
- Fork
- 4
- Merge trung bình
- 3 giờ 58 phút
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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/LEDSmokeAnalysis
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
FireDynamics/LEDSmokeAnalysis#176 ·
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
FireDynamics/LEDSmokeAnalysis#175 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
FireDynamics/LEDSmokeAnalysis#177 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
FireDynamics/LEDSmokeAnalysis#98 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
FireDynamics/LEDSmokeAnalysis#91 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của FireDynamics/LEDSmokeAnalysis
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vllm-project/vllm#64845 ·
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 84/100
dekobon/big-code-analysis#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pydantic/pydantic-ai#12091 ·
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 88/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 82/100