11using XGPaint
2- using XGPaint: RingWorkspace
2+ using XGPaint: HealpixRingProfileWorkspace
33using Healpix
44using Test
55
4242(m:: TestModel )(θ, Mh, z) = m. value
4343XGPaint. compute_θmin (:: TestModel{T} ) where T = eps (T)
4444
45- @testset " RingWorkspace Profile Painting Tests" begin
45+ @testset " HealpixRingProfileWorkspace Profile Painting Tests" begin
4646
47- @testset " RingWorkspace vs Brute Force" begin
47+ @testset " HealpixRingProfileWorkspace vs Brute Force" begin
4848 # Setup
4949 nside = 64
5050 res = Healpix. Resolution (nside)
51- workspace = RingWorkspace (res)
51+ workspace = HealpixRingProfileWorkspace (res)
5252
5353 # Create test maps
54- map_ringworkspace = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
54+ map_HealpixRingProfileWorkspace = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
5555 map_bruteforce = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
5656
5757 # Test model
@@ -69,26 +69,26 @@ XGPaint.compute_θmin(::TestModel{T}) where T = eps(T)
6969
7070 for (i, test_case) in enumerate (test_cases)
7171 # Reset maps
72- fill! (map_ringworkspace . pixels, 0.0 )
72+ fill! (map_HealpixRingProfileWorkspace . pixels, 0.0 )
7373 fill! (map_bruteforce. pixels, 0.0 )
7474
7575 # Paint with both methods
76- XGPaint. profile_paint_generic! (map_ringworkspace , workspace, model,
76+ XGPaint. profile_paint_generic! (map_HealpixRingProfileWorkspace , workspace, model,
7777 test_case. Mh, test_case. z, test_case. α₀, test_case. δ₀, test_case. θmax)
7878
7979 profile_paint_bruteforce! (map_bruteforce, model,
8080 test_case. Mh, test_case. z, test_case. α₀, test_case. δ₀, test_case. θmax)
8181
8282 # Compare results - should be exactly equal for constant model
83- @test map_ringworkspace . pixels ≈ map_bruteforce. pixels
84- @test count (x -> x != 0 , map_ringworkspace . pixels) == count (x -> x != 0 , map_bruteforce. pixels)
83+ @test map_HealpixRingProfileWorkspace . pixels ≈ map_bruteforce. pixels
84+ @test count (x -> x != 0 , map_HealpixRingProfileWorkspace . pixels) == count (x -> x != 0 , map_bruteforce. pixels)
8585 end
8686 end
8787
88- @testset " RingWorkspace Edge Cases" begin
88+ @testset " HealpixRingProfileWorkspace Edge Cases" begin
8989 nside = 64
9090 res = Healpix. Resolution (nside)
91- workspace = RingWorkspace (res)
91+ workspace = HealpixRingProfileWorkspace (res)
9292
9393 map_test = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
9494 model = TestModel (1.0 )
@@ -110,14 +110,14 @@ XGPaint.compute_θmin(::TestModel{T}) where T = eps(T)
110110 end
111111 end
112112
113- @testset " RingWorkspace vs Brute Force with Real Y Profile" begin
113+ @testset " HealpixRingProfileWorkspace vs Brute Force with Real Y Profile" begin
114114 # Setup with real y profile model
115115 nside = 32 # Smaller for faster testing with real profile
116116 res = Healpix. Resolution (nside)
117- workspace = RingWorkspace (res)
117+ workspace = HealpixRingProfileWorkspace (res)
118118
119119 # Create test maps
120- map_ringworkspace = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
120+ map_HealpixRingProfileWorkspace = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
121121 map_bruteforce = HealpixMap {Float64, RingOrder} (zeros (Float64, nside2npix (nside)))
122122
123123 # Real y profile model
@@ -132,26 +132,26 @@ XGPaint.compute_θmin(::TestModel{T}) where T = eps(T)
132132
133133 for (i, test_case) in enumerate (test_cases)
134134 # Reset maps
135- fill! (map_ringworkspace . pixels, 0.0 )
135+ fill! (map_HealpixRingProfileWorkspace . pixels, 0.0 )
136136 fill! (map_bruteforce. pixels, 0.0 )
137137
138138 # Paint with both methods
139- XGPaint. profile_paint_generic! (map_ringworkspace , workspace, y_model,
139+ XGPaint. profile_paint_generic! (map_HealpixRingProfileWorkspace , workspace, y_model,
140140 test_case. Mh, test_case. z, test_case. α₀, test_case. δ₀, test_case. θmax)
141141
142142 profile_paint_bruteforce! (map_bruteforce, y_model,
143143 test_case. Mh, test_case. z, test_case. α₀, test_case. δ₀, test_case. θmax)
144144
145145 # Compare results - should be very close (allowing for floating point differences)
146- @test map_ringworkspace . pixels ≈ map_bruteforce. pixels rtol= 1e-12
146+ @test map_HealpixRingProfileWorkspace . pixels ≈ map_bruteforce. pixels rtol= 1e-12
147147
148148 # Check that we actually painted something non-zero
149- @test count (x -> x != 0 , map_ringworkspace . pixels) > 0
149+ @test count (x -> x != 0 , map_HealpixRingProfileWorkspace . pixels) > 0
150150 @test count (x -> x != 0 , map_bruteforce. pixels) > 0
151151
152152 # Check same number of non-zero pixels
153- @test count (x -> x != 0 , map_ringworkspace . pixels) == count (x -> x != 0 , map_bruteforce. pixels)
153+ @test count (x -> x != 0 , map_HealpixRingProfileWorkspace . pixels) == count (x -> x != 0 , map_bruteforce. pixels)
154154 end
155155 end
156156
157- end # RingWorkspace Profile Painting Tests
157+ end # HealpixRingProfileWorkspace Profile Painting Tests
0 commit comments