You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Not integrating opacities properly (missing temperature weighting)
556
-
6. Wrong units in wavelength conversion (nm/μm to cm)
556
+
6. Wrong units in wavelength conversion (nm/$\mu$m to cm)
557
557
558
558
## Validation Requirements
559
559
@@ -628,19 +628,19 @@ Before you begin coding, these practical tips will save you hours of debugging:
628
628
629
629
- Pre-calculate and store grid boundaries (`x_min`, `x_max`, etc.) and cell size (Δx) as attributes to avoid recalculating them during packet propagation
630
630
631
-
- Save intermediate results (e.g., after every $10â´$ packets) to avoid losing progress if your code crashes during long runs - Monte Carlo results are additive
631
+
- Save intermediate results (e.g., after every $10^4$ packets) to avoid losing progress if your code crashes during long runs - Monte Carlo results are additive
632
632
633
633
**Debugging Strategy:**
634
634
635
-
- Start with `kappa` as a simple constant (e.g., 30000 cm²/g) before implementing the full Draine integration to isolate algorithmic bugs from opacity calculation bugs
635
+
- Start with `kappa` as a simple constant (e.g., 30000 cm²/g) before implementing the full Draine integration to isolate algorithmic bugs from opacity calculation bugs
636
636
637
637
- During debugging, use `np.random.seed(42)` for reproducible results. Remove the seed for final runs to ensure proper Monte Carlo statistics
638
638
639
639
- If your calculated opacities differ significantly from expected ranges, check: (1) wavelength unit conversion to cm, (2) correct reading of dust/H mass from header, (3) proper Planck weighting with stellar temperature
640
640
641
641
**Numerical Robustness:**
642
642
643
-
- Use DIFFERENT random numbers for position sampling $(ξâ‚, ξ₂)$ and direction sampling $(ξ₃, ξ₄)$ - reusing random numbers creates unwanted correlations
643
+
- Use DIFFERENT random numbers for position sampling ($\xi_1$‚ $\xi_2$) and direction sampling $\xi_3$‚ $\xi_4$) - reusing random numbers creates unwanted correlations
644
644
645
645
- Handle the special case where a direction component is exactly zero (e.g., dx = 0) by setting the distance to that boundary to infinity rather than dividing by zero
0 commit comments