From 2ce7ed826537a759767acb2bc840089ae779af31 Mon Sep 17 00:00:00 2001
From: Chris Pankow <chris.pankow@ligo.org>
Date: Wed, 30 Aug 2017 16:20:03 -0400
Subject: [PATCH] rapidpe_cig: add param for number of points to a side

---
 lalinference/python/rapidpe_compute_intrinsic_grid.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lalinference/python/rapidpe_compute_intrinsic_grid.py b/lalinference/python/rapidpe_compute_intrinsic_grid.py
index 361c25a1ef..c474c7b040 100644
--- a/lalinference/python/rapidpe_compute_intrinsic_grid.py
+++ b/lalinference/python/rapidpe_compute_intrinsic_grid.py
@@ -192,6 +192,7 @@ grid_section.add_argument("--setup", help="Set up the initial grid based on temp
 grid_section.add_argument("-t", "--tmplt-bank", help="XML file with template bank.")
 grid_section.add_argument("-O", "--use-overlap", help="Use overlap information to define 'closeness'.")
 grid_section.add_argument("-T", "--overlap-threshold", type=float, help="Threshold on overlap value.")
+grid_section.add_argument("-s", "--points-per-side", type=int, default=10, help="Number of points per side, default is 10.")
 grid_section.add_argument("-D", "--deactivate", action="store_true", help="Deactivate cells initially which have no template within them.")
 grid_section.add_argument("-P", "--prerefine", help="Refine this initial grid based on overlap values.")
 
@@ -346,7 +347,7 @@ else:
 
     # TODO: Alternatively, check density of points in the region to determine
     # the points to a side
-    grid, spacing = amrlib.create_regular_grid_from_cell(init_region, side_pts=5, return_cells=True)
+    grid, spacing = amrlib.create_regular_grid_from_cell(init_region, side_pts=opts.points_per_side / 2, return_cells=True)
 
     # "Deactivate" cells not close to template points
     # FIXME: This gets more and more dangerous in higher dimensions
-- 
GitLab