Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

-s3_fast with -r, -g or -b also runs the full step 3 with LED fits

未关闭 适合新手
#176 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
cli, testing

调研方向

阅读 ledsa/core/parser_arguments_run.py 第60–75行附近的代码,并追踪颜色标志如何设置 step_3 和 step_3_fast。添加测试,确认 -s3_fast -r 只运行快速步骤,而单独使用 -r 时仍运行步骤3;运行相关测试套件。两种参数组合都选择预期步骤后即为完成。

由索引模型根据 Issue 内容生成。

描述

bug

Problem

python -m ledsa -s3_fast -r runs the full step 3, with the LED fit on every LED of every image, and then the fast step 3 again. -g and -b behave the same way. Only -s3_fast -rgb, the combination the README shows, runs the fast step alone.

Cause

parser_arguments_run.py, line 60:

if args.red or args.green or args.blue or args.rgb and not args.step_3_fast:
    args.step_3 = True

and binds tighter than or, so the condition reads red or green or blue or (rgb and not step_3_fast), and the not step_3_fast guard only applies to -rgb. With -r, step_3 is set, so the full step 3 runs (line 70) before the fast one (line 75).

Impact

The fast run overwrites the result files of the full run, so the values that end up in analysis/channel*/ are those of the fast step. What is lost is the runtime of the LED fits, by far the slowest part of step 3, and logfiles/warnings.log collects the warnings of failed fits that were never asked for.

Fix

Group the colour flags before the guard:

if (args.red or args.green or args.blue or args.rgb) and not args.step_3_fast:
    args.step_3 = True

and add a test that -s3_fast -r runs only the fast step 3, while -r alone still runs step 3.

主要语言
Python
星标
7
派生
4
平均合并
3 小时 58 分钟
30 天内合并 PR
35

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FireDynamics/LEDSmokeAnalysis 的其他 Issue

查看 FireDynamics/LEDSmokeAnalysis 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。