Coverage for python/lsst/images/tests/_data_ids.py: 100%
12 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-20 09:29 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-20 09:29 +0000
1# This file is part of lsst-images.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# Use of this source code is governed by a 3-clause BSD-style
10# license that can be found in the LICENSE file.
12from __future__ import annotations
14__all__ = (
15 "DP2_COADD_DATA_ID",
16 "DP2_COADD_MISSING_CELL",
17 "DP2_TEMPLATE_COADD_DATASETS",
18 "DP2_VISIT_DETECTOR_DATA_ID",
19 "get_dp2_exposure_record",
20)
22import uuid
23from typing import Any
25import astropy.time
27from lsst.daf.butler import DimensionRecord, DimensionUniverse, Timespan
29DP2_VISIT_DETECTOR_DATA_ID: dict[str, Any] = {
30 "instrument": "LSSTCam",
31 "visit": 2025052000177,
32 "detector": 85,
33 "day_obs": 20250520,
34 "physical_filter": "r_57",
35 "band": "r",
36}
37DP2_COADD_DATA_ID: dict[str, Any] = {"skymap": "lsst_cells_v2", "tract": 9813, "patch": 43, "band": "r"}
38DP2_COADD_MISSING_CELL: dict[str, int] = {"i": 8, "j": 6}
40DP2_TEMPLATE_COADD_DATASETS = {
41 uuid.UUID("019d7854-1c93-7a5e-a594-c0ecbd16ad75"): {
42 "band": "r",
43 "skymap": "lsst_cells_v2",
44 "tract": 9571,
45 "patch": 97,
46 },
47 uuid.UUID("019d7854-34d9-781c-829c-6ba851899d5d"): {
48 "band": "r",
49 "skymap": "lsst_cells_v2",
50 "tract": 9571,
51 "patch": 98,
52 },
53 uuid.UUID("019d7854-339d-7767-8b5e-d81eaed45041"): {
54 "band": "r",
55 "skymap": "lsst_cells_v2",
56 "tract": 9813,
57 "patch": 2,
58 },
59 uuid.UUID("019d7854-12ca-7bd2-96f3-f036b9d6db97"): {
60 "band": "r",
61 "skymap": "lsst_cells_v2",
62 "tract": 9813,
63 "patch": 3,
64 },
65 uuid.UUID("019d7854-3110-784f-9fd8-13594bf3f230"): {
66 "band": "r",
67 "skymap": "lsst_cells_v2",
68 "tract": 9813,
69 "patch": 12,
70 },
71 uuid.UUID("019d7854-1036-7f97-838f-0c50719d0986"): {
72 "band": "r",
73 "skymap": "lsst_cells_v2",
74 "tract": 9813,
75 "patch": 13,
76 },
77 uuid.UUID("019d7854-2fcd-72a3-86c4-20f9dedd7f1c"): {
78 "band": "r",
79 "skymap": "lsst_cells_v2",
80 "tract": 9813,
81 "patch": 14,
82 },
83 uuid.UUID("019d7854-0db2-7f63-9487-1c888a64bcc1"): {
84 "band": "r",
85 "skymap": "lsst_cells_v2",
86 "tract": 9813,
87 "patch": 22,
88 },
89 uuid.UUID("019d7854-389e-7cd4-9464-a9e1e584c4ae"): {
90 "band": "r",
91 "skymap": "lsst_cells_v2",
92 "tract": 9813,
93 "patch": 23,
94 },
95}
98def get_dp2_exposure_record(universe: DimensionUniverse) -> DimensionRecord:
99 """Return the exposure record associated with the DP2 test data ID.
101 Parameters
102 ----------
103 universe
104 Dimension universe that defines the record's schema.
105 """
106 return universe["exposure"].RecordClass(
107 instrument="LSSTCam",
108 id=2025052000177,
109 day_obs=20250520,
110 group="2025-05-21T01:28:49.433",
111 physical_filter="r_57",
112 obs_id="MC_O_20250520_000177",
113 exposure_time=30.001108646392822,
114 dark_time=30.9427,
115 observation_type="science",
116 observation_reason="field_survey_science",
117 seq_num=177,
118 seq_start=177,
119 seq_end=177,
120 target_name="COSMOS",
121 science_program="BLOCK-365",
122 tracking_ra=150.1928872274704,
123 tracking_dec=2.2413629369011385,
124 sky_angle=57.7790074960578,
125 azimuth=302.7758502576103,
126 zenith_angle=50.1758964491342,
127 has_simulated=False,
128 can_see_sky=True,
129 timespan=Timespan(
130 begin=astropy.time.Time(2460817.0, -0.436745640356088, scale="tai", format="jd"),
131 end=astropy.time.Time(2460817.0, -0.43638751157407407, scale="tai", format="jd"),
132 ),
133 )