-
Notifications
You must be signed in to change notification settings - Fork 0
Phase2_Block_Integration
fujiaze edited this page Aug 10, 2026
·
1 revision
假设当前工作块有:
P = output pixels
N_B = covering frames
Phase2必须看到同一输出pixel的全部可用样本,才能执行迭代rejection。
因此主要工作集近似:
[ M \approx P,N_B,B_{\mathrm{sample}} + P,B_{\mathrm{scratch}} + M_{\mathrm{AIO}} + M_{\mathrm{UPM}} + M_{\mathrm{ACR}} ]
不把10MP写死。
输入:
- configured memory limit;
- current available RAM;
- actual
N_B; - FP32/FP64;
- rejection method scratch requirement;
- ACR host/device staging;
- AIO buffers。
输出:
block pixel count
block tile list
covering frame list
estimated peak RAM
默认目标:
estimated host peak <= memory_limit × safety_factor
建议初始safety_factor=0.75,必须可配置。
不做Windows CPU/GPU占用率闭环。
优先按最终HiPS deepest tiles组成连续block。
例如:
10MP ≈ 38 × 512² tiles
实际大小动态。
若:
one HiPS tile × N_B
仍超内存,则允许tile内micro-chunk处理。
对每个block:
- 用MOC/index得到实际覆盖帧;
- 只读取这些帧;
- 从对应HiPS order读取signal/support;
- 查询SNR/quality field;
- 不读取不覆盖当前block的frame。
对frame i的block:
input signal
→ UPM.calibrate(frame_id, sky_pos, signal)
→ calibrated signal
Phase2只允许加性校准。
禁止Phase2再做:
multiplicative photometric scaling
乘性测光坐标已经属于Phase1 DR3SP。
AIO天然可能frame-major读取:
frame0[P]
frame1[P]
...
rejection天然pixel-major消费:
pixel0[N_B]
pixel1[N_B]
...
实现可选择:
- explicit transpose;
- tiled AoSoA;
- strided kernel。
先benchmark,不提前强制。
CPU reference必须先简单正确。
对rejection后accepted samples:
\frac{\sum_i a_i,w_i(p),I_i'(p)} {\sum_i a_i,w_i(p)} ]
其中:
-
a_i:accepted mask; -
I_i':校准到UPM后的signal; -
w_i:SNR/support/quality权重。
候选baseline:
w_i = support_i × quality_i × SNR_i²
但最终默认公式由合成Gate决定。
必须防:
- NaN/Inf;
- all rejected;
- weight sum=0;
- one bad huge SNR monopolizing output。
Phase2 support仍应保持空间coverage意义,不承担SNR权重含义。
v1建议:
support_out = max(support_i among accepted samples)
这是对未知子像素覆盖并集的保守下界。
另外可输出:
weight/
rejection_count/
避免把integration depth偷偷塞进support。
此support策略必须在边缘合成数据上验证并写入最终Wiki。