From 4fd4199b5ceba13bd625be4ffbc96fac57ca12ec Mon Sep 17 00:00:00 2001 From: Kathryn Crowter <4613851+kmjc@users.noreply.github.com> Date: Wed, 29 Sep 2021 11:41:06 -0700 Subject: [PATCH 1/2] evolve.py bagchi_fixes chi was being converted to radians when already in radians --- lib/python/evolve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/evolve.py b/lib/python/evolve.py index d6f9842..88b6b0d 100755 --- a/lib/python/evolve.py +++ b/lib/python/evolve.py @@ -444,9 +444,9 @@ def alignpulsar(pulsar, pop): chi = math.acos(random.random()) # in radians pulsar.chi = math.degrees(chi) # -> degrees - pulsar.sinchi_init = math.sin(math.radians(chi)) + pulsar.sinchi_init = math.sin(chi) pulsar.sinchi = pulsar.sinchi_init - pulsar.coschi = math.cos(math.radians(chi)) + pulsar.coschi = math.cos(chi) elif pop.alignModel == 'rand45': pulsar.coschi = random.random() * (1.0 - math.sqrt(0.5)) \ From c16d0a24732eace0544ae632cff007844b51581d Mon Sep 17 00:00:00 2001 From: Kathryn Crowter <4613851+kmjc@users.noreply.github.com> Date: Wed, 29 Sep 2021 11:43:42 -0700 Subject: [PATCH 2/2] galacticops.py bagchi_fixes cos -> sin was already fixed changed blurring gaussian sigma --- lib/python/galacticops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/galacticops.py b/lib/python/galacticops.py index f9a2010..a04fd72 100755 --- a/lib/python/galacticops.py +++ b/lib/python/galacticops.py @@ -359,7 +359,7 @@ def spiralize(r): theta += angle # blur in radial direction a little - dr = math.fabs(random.gauss(0.0, 0.5 * r)) + dr = math.fabs(random.gauss(0.0, 0.07 * r)) angle = random.random() * 2.0 * math.pi dx = dr * math.cos(angle) dy = dr * math.sin(angle)