Skip to content

Commit ebe08f5

Browse files
committed
make generateEphemerides flexible over observatories
1 parent 561d8c8 commit ebe08f5

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

data/eph.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fill_factor = 1.0
5959

6060
# Radius of the circle for a circular footprint (in degrees). Float.
6161
# Comment out or do not include if using footprint camera model.
62-
circle_radius = 2
62+
circle_radius = {FOV}
6363

6464

6565
[FADINGFUNCTION]
@@ -81,7 +81,7 @@ fading_function_peak_efficiency = 1.
8181
# Configuration for running the ASSIST+REBOUND ephemerides generator.
8282

8383
# the field of view of our search field, in degrees
84-
ar_ang_fov = 2.06
84+
ar_ang_fov = {FOV}
8585

8686
# the buffer zone around the field of view we want to include, in degrees
8787
ar_fov_buffer = 0.2
@@ -92,7 +92,7 @@ ar_fov_buffer = 0.2
9292
ar_picket = 1
9393

9494
# the obscode is the MPC observatory code for the provided telescope.
95-
ar_obs_code = X05
95+
ar_obs_code = {OBSCODE}
9696

9797
# the order of healpix which we will use for the healpy portions of the code.
9898
# the nside is equivalent to 2**ar_healpix_order

python/lsst/pipe/tasks/generateEphemerides.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,17 @@ class GenerateEphemeridesConnections(PipelineTaskConnections,
148148
class GenerateEphemeridesConfig(
149149
PipelineTaskConfig,
150150
pipelineConnections=GenerateEphemeridesConnections):
151-
observerCode = pexConfig.Field(
151+
observatoryCode = pexConfig.Field(
152152
dtype=str,
153153
doc="IAU Minor Planet Center observer code for queries "
154154
"(default is X05 for Rubin Obs./LSST)",
155155
default='X05'
156156
)
157+
observatoryFOVRadius = pexConfig.Field(
158+
dtype=float,
159+
doc="The field of view of the observatory (degrees)",
160+
default=2.06,
161+
)
157162

158163

159164
class GenerateEphemeridesTask(PipelineTask):
@@ -264,8 +269,11 @@ def run(self, visitSummaries, mpcorb, de440s, sb441_n16, obsCodes, linux_p1550p2
264269
inputColors = inputOrbits[["ObjID"]].copy()
265270
inputColors["H_r"] = mpcorb['h']
266271
inputColors["GS"] = 0.15 # Traditional
272+
267273
eph_str = resources.files(lsst.pipe.tasks).parents[3].joinpath("data/eph.ini").read_text()
268-
# same as code
274+
eph_str = eph_str.replace("{OBSCODE}", self.config.observatoryCode)
275+
eph_str = eph_str.replace("{FOV}", str(self.config.observatoryFOVRadius))
276+
269277
with tempfile.TemporaryDirectory() as tmpdirname:
270278
self.log.info(f'temp dir: {tmpdirname}')
271279

0 commit comments

Comments
 (0)