Skip to content

Commit 074a709

Browse files
authored
Merge pull request #1171 from lsst/tickets/DM-49453
DM-49453 : DRP solar system ephemeris generation
2 parents 1c5cce2 + 201bfd4 commit 074a709

File tree

5 files changed

+646
-80
lines changed

5 files changed

+646
-80
lines changed

data/eph.ini

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Sorcha Configuration File
2+
3+
4+
[INPUT]
5+
6+
# The simulation used for the ephemeris input.
7+
# Options: "ar", "external"
8+
ephemerides_type = ar
9+
10+
# Format for ephemeris simulation output file. If reading from an existing temporary ephemeris
11+
# database, this will be ignored.
12+
# Options: csv, whitespace, hdf5
13+
eph_format = csv
14+
15+
# SSPP chunks processing by object: how many objects should be processed at once?
16+
size_serial_chunk = 2000
17+
18+
# Format for orbit/colour/brightness/cometary data files.
19+
# Options: comma, csv or whitespace
20+
aux_format = csv
21+
22+
# SQL query for extracting data from the pointing database.
23+
pointing_sql_query = SELECT observationId, observationStartMJD as observationStartMJD_TAI, visitTime, visitExposureTime, filter, seeingFwhmGeom as seeingFwhmGeom_arcsec, seeingFwhmEff as seeingFwhmEff_arcsec, fiveSigmaDepth as fieldFiveSigmaDepth_mag, fieldRA as fieldRA_deg, fieldDec as fieldDec_deg, rotSkyPos as fieldRotSkyPos_deg FROM observations order by observationId
24+
25+
26+
[FILTERS]
27+
28+
# Filters of the observations you are interested in, comma-separated.
29+
# Your physical parameters file must have H calculated in one of these filters
30+
# and colour offset columns defined relative to that filter.
31+
observing_filters = r
32+
33+
34+
[SATURATION]
35+
36+
# Upper magnitude limit on sources that will overfill the detector pixels/have
37+
# counts above the non-linearity regime of the pixels where one can’t do
38+
# photometry. Objects brighter than this limit (in magnitude) will be cut.
39+
# Comment out for no saturation limit.
40+
# Two formats are accepted:
41+
# Single float: applies same saturation limit to observations in all filters.
42+
# Comma-separated list of floats: applies saturation limit per filter, in order as
43+
# given in observing_filters keyword.
44+
bright_limit = -9999
45+
46+
47+
[PHASECURVES]
48+
49+
# The phase function used to calculate apparent magnitude. The physical parameters input
50+
# file must contain the columns needed to calculate the phase function.
51+
# Options: HG, HG1G2, HG12, linear, none.
52+
phase_function = HG
53+
54+
55+
[FOV]
56+
57+
camera_model = circle
58+
fill_factor = 1.0
59+
60+
# Radius of the circle for a circular footprint (in degrees). Float.
61+
# Comment out or do not include if using footprint camera model.
62+
circle_radius = {FOV}
63+
64+
65+
[FADINGFUNCTION]
66+
67+
# Detection efficiency fading function on or off. Uses the fading function as outlined in
68+
# Chelsey and Vereš (2017) to remove observations.
69+
fading_function_on = True
70+
71+
# Width parameter for fading function. Should be greater than zero and less than 0.5.
72+
# Suggested value is 0.1 after Chelsey and Vereš (2017).
73+
fading_function_width = 0.1
74+
75+
# Peak efficiency for the fading function, called the 'fill factor' in Chelsey and Veres (2017).
76+
# Suggested value is 1. Do not change this unless you are sure of what you are doing.
77+
fading_function_peak_efficiency = 1.
78+
79+
80+
[SIMULATION]
81+
# Configuration for running the ASSIST+REBOUND ephemerides generator.
82+
83+
# the field of view of our search field, in degrees
84+
ar_ang_fov = {FOV}
85+
86+
# the buffer zone around the field of view we want to include, in degrees
87+
ar_fov_buffer = 0.2
88+
89+
# the "picket" is our imprecise discretization of time that allows us to move progress
90+
# our simulations forward without getting too granular when we don't have to.
91+
# the unit is number of days.
92+
ar_picket = 1
93+
94+
# the obscode is the MPC observatory code for the provided telescope.
95+
ar_obs_code = {OBSCODE}
96+
97+
# the order of healpix which we will use for the healpy portions of the code.
98+
# the nside is equivalent to 2**ar_healpix_order
99+
ar_healpix_order = 6
100+
101+
102+
[OUTPUT]
103+
104+
# Output format.
105+
# Options: csv, sqlite3, hdf5
106+
output_format = csv
107+
108+
# Controls which columns are in the output files.
109+
# Options are "basic" and "all", which returns all columns.
110+
output_columns = all
111+
112+
113+
[LIGHTCURVE]
114+
115+
# The unique name of the lightcurve model to use. Defined in the ``name_id`` method
116+
# of the subclasses of AbstractLightCurve. If not none, the complex physical parameters
117+
# file must be specified at the command line.lc_model = none
118+
lc_model = none
119+
120+
121+
[ACTIVITY]
122+
123+
# The unique name of the actvity model to use. Defined in the ``name_id`` method
124+
# of the subclasses of AbstractCometaryActivity. If not none, a complex physical parameters
125+
# file must be specified at the command line.
126+
comet_activity = none
127+
128+
[EXPERT]
129+
130+
default_SNR_cut=False

python/lsst/pipe/tasks/drpAssociationPipe.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class DrpAssociationPipeConnections(pipeBase.PipelineTaskConnections,
5858
ssObjectTableRefs = pipeBase.connectionTypes.Input(
5959
doc="Reference to catalogs of SolarSolarSystem objects expected to be "
6060
"observable in each (visit, detector).",
61-
name="preloaded_DRP_SsObjects",
61+
name="preloaded_ss_object_visit",
6262
storageClass="ArrowAstropy",
63-
dimensions=("instrument", "visit", "detector"),
63+
dimensions=("instrument", "visit"),
6464
minimum=0,
6565
deferLoad=True,
6666
multiple=True
@@ -236,7 +236,7 @@ def visitDetectorPair(dataRef):
236236
diaIdDict[visitDetectorPair(diaCatRef)] = diaCatRef
237237
if self.config.doSolarSystemAssociation:
238238
for ssCatRef in ssObjectTableRefs:
239-
ssObjectIdDict[visitDetectorPair(ssCatRef)] = ssCatRef
239+
ssObjectIdDict[ssCatRef.dataId["visit"]] = ssCatRef
240240
for finalVisitSummaryRef in finalVisitSummaryRefs:
241241
finalVisitSummaryIdDict[finalVisitSummaryRef.dataId["visit"]] = finalVisitSummaryRef
242242

@@ -247,9 +247,9 @@ def visitDetectorPair(dataRef):
247247
associatedSsSources, unassociatedSsObjects = None, None
248248
nSsSrc, nSsObj = 0, 0
249249
# Always false if ! self.config.doSolarSystemAssociation
250-
if all([(visit, detector) in ssObjectIdDict and visit in finalVisitSummaryIdDict]):
250+
if (visit in ssObjectIdDict) and (visit in finalVisitSummaryIdDict):
251251
# Get the ssCat and finalVisitSummary
252-
ssCat = ssObjectIdDict[(visit, detector)].get()
252+
ssCat = ssObjectIdDict[visit].get()
253253
finalVisitSummary = finalVisitSummaryIdDict[visit].get()
254254
# Get the exposure metadata from the detector's row in the finalVisitSummary table.
255255
visitInfo = finalVisitSummary.find(detector).visitInfo

0 commit comments

Comments
 (0)