🔖 Checkpoint: Edit /workspaces/claude-code-flow/test_blackbody_issue.py

This commit is contained in:
rUv committed 2025-08-07 16:27:31 +00:00
1 parent 823c8bc2dd
commit d0efff3efa
2 files changed
+29

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"checkpoint": "task-20250807-162646", "task": "🧠 HIVE MIND COLLECTIVE INTELLIGENCE SYSTEM ══════════════════", "timestamp": "2025-08-07T16:26:47Z", "commit": "a0d9d96a1584ada311ab9deb4029f3f41406a3ea", "github_release": "true"}
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python
"""Test script to reproduce the BlackBody bolometric flux issue with dimensionless_unscaled units."""
import numpy as np
from astropy import units as u
from astropy.modeling.models import BlackBody
# Test case from the issue
temperature = 3000 * u.K
# Test with float scale (should work correctly)
bb_float = BlackBody(temperature=temperature, scale=1.0)
flux_float = bb_float.bolometric_flux
print(f"Float scale bolometric flux: {flux_float}")
print(f"Float scale value: {flux_float.value}")
# Test with dimensionless_unscaled Quantity (problematic)
bb_dimensionless = BlackBody(temperature=temperature, scale=1.0 * u.dimensionless_unscaled)
flux_dimensionless = bb_dimensionless.bolometric_flux
print(f"\nDimensionless_unscaled scale bolometric flux: {flux_dimensionless}")
print(f"Dimensionless_unscaled scale value: {flux_dimensionless.value}")
# They should be equal
print(f"\nAre they equal? {np.isclose(flux_float.value, flux_dimensionless.value)}")
print(f"Ratio: {flux_dimensionless.value / flux_float.value}")
# Expected value from the issue
print(f"\nExpected value: ~4.823870774433646e-16 erg / (cm2 s)")