diff --git a/.claude/checkpoints/task-1754584007.json b/.claude/checkpoints/task-1754584007.json new file mode 100644 index 0000000000..2742072184 --- /dev/null +++ b/.claude/checkpoints/task-1754584007.json @@ -0,0 +1 @@ +{"checkpoint": "task-20250807-162646", "task": "🧠 HIVE MIND COLLECTIVE INTELLIGENCE SYSTEM ══════════════════", "timestamp": "2025-08-07T16:26:47Z", "commit": "a0d9d96a1584ada311ab9deb4029f3f41406a3ea", "github_release": "true"} diff --git a/test_blackbody_issue.py b/test_blackbody_issue.py new file mode 100644 index 0000000000..51af81d1cc --- /dev/null +++ b/test_blackbody_issue.py @@ -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)") \ No newline at end of file