Skip to content

Commit

Permalink
Merge pull request #18 from swagnercarena/cosmo_utils_bug
Browse files Browse the repository at this point in the history
Removed bug in input_pipeline that only showed up for z_source > 1.5.
  • Loading branch information
swagnercarena authored Apr 16, 2024
2 parents 9c5cd44 + 55f0705 commit 0a85258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion paltax/input_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def initialize_cosmology_params(
r_max = cosmology_utils.lagrangian_radius(cosmology_params,
m_max * 10)
cosmology_params = cosmology_utils.add_lookup_tables_to_cosmology_params(
cosmology_params_init, 1.5, dz / 2, r_min, r_max, 10000)
cosmology_params_init, max_source_z, dz / 2, r_min, r_max, 10000)
extrenal_los_params = {'m_min': m_min, 'm_max': m_max, 'dz': dz}
cosmology_params = los.add_los_lookup_tables_to_cosmology_params(
extrenal_los_params, cosmology_params, max_source_z
Expand Down
1 change: 1 addition & 0 deletions paltax/input_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ def test_initialize_cosmology_params(self):
r_max = cosmology_utils.lagrangian_radius(cosmology_params, 1e11)
# Cosmological values are calculated in incriments of dz / 2.
self.assertAlmostEqual(cosmology_params['dz'], dz / 2)
self.assertAlmostEqual(cosmology_params['z_lookup_max'], 2.0)
self.assertAlmostEqual(cosmology_params['r_min'], r_min, places=6)
self.assertAlmostEqual(cosmology_params['r_max'], r_max, places=6)

Expand Down

0 comments on commit 0a85258

Please sign in to comment.