lsst-utils 29.2025.2500__py3-none-any.whl → 29.2025.2600__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,6 +88,7 @@ def get_multiband_plot_colors(dark_background: bool = False) -> dict:
88
88
  "z": "#BA52FF",
89
89
  "y": "#370201",
90
90
  }
91
+
91
92
  plot_filter_colors_black_background = {
92
93
  "u": "#3eb7ff",
93
94
  "g": "#30c39f",
@@ -18,6 +18,8 @@ __all__ = [
18
18
  "get_band_dicts",
19
19
  "mk_colormap",
20
20
  "set_rubin_plotstyle",
21
+ "sso_cmap",
22
+ "sso_color",
21
23
  "stars_cmap",
22
24
  "stars_color",
23
25
  ]
@@ -77,7 +79,7 @@ def mk_colormap(colorNames): # type: ignore
77
79
  else:
78
80
  nums = np.linspace(0, 1, len(colorNames))
79
81
  if len(colorNames) == 3:
80
- alphaRange = [1.0, 0.3, 1.0]
82
+ alphaRange = [1.0, 1.0, 1.0]
81
83
  elif len(colorNames) == 5:
82
84
  alphaRange = [1.0, 0.7, 0.3, 0.7, 1.0]
83
85
  else:
@@ -99,10 +101,7 @@ def divergent_cmap(): # type: ignore
99
101
  """
100
102
  Make a divergent color map.
101
103
  """
102
- import seaborn as sns
103
- from matplotlib.colors import ListedColormap
104
-
105
- cmap = ListedColormap(sns.color_palette("icefire", 256))
104
+ cmap = mk_colormap([stars_color(), "#D9DCDE", accent_color()])
106
105
 
107
106
  return cmap
108
107
 
@@ -121,7 +120,7 @@ def stars_cmap(single_color=False): # type: ignore
121
120
 
122
121
  def stars_color() -> str:
123
122
  """Return the star color string for lines"""
124
- return "#357BA3"
123
+ return "#084d96"
125
124
 
126
125
 
127
126
  def accent_color() -> str:
@@ -146,6 +145,20 @@ def galaxies_color() -> str:
146
145
  return "#961A45"
147
146
 
148
147
 
148
+ def sso_color() -> str:
149
+ """Return the SSO color string for lines"""
150
+ return "#01694c"
151
+
152
+
153
+ def sso_cmap(single_color=False): # type: ignore
154
+ """Make a color map for solar system objects."""
155
+ if single_color:
156
+ cmap = mk_colormap([sso_color()])
157
+ else:
158
+ cmap = "viridis"
159
+ return cmap
160
+
161
+
149
162
  def get_band_dicts() -> dict:
150
163
  """
151
164
  Define palettes, from RTN-045. This includes dicts for colors (bandpass
lsst/utils/timer.py CHANGED
@@ -553,7 +553,7 @@ def duration_from_timeMethod(
553
553
  method_name : `str`
554
554
  Name of the timed method to extract a duration for.
555
555
  clock : `str`, optional
556
- Options are "Cpu", "User", or "System".
556
+ Options are "Cpu", "User", "System", or "Utc".
557
557
 
558
558
  Returns
559
559
  -------
@@ -562,10 +562,17 @@ def duration_from_timeMethod(
562
562
  """
563
563
  if metadata is None:
564
564
  return None
565
- start = metadata[method_name + "Start" + clock + "Time"]
565
+ if clock.lower() == "utc":
566
+ start = metadata[method_name + "StartUtc"]
567
+ end = metadata[method_name + "EndUtc"]
568
+ else:
569
+ start = metadata[method_name + "Start" + clock + "Time"]
570
+ end = metadata[method_name + "End" + clock + "Time"]
566
571
  if isinstance(start, list):
567
572
  start = start[-1]
568
- end = metadata[method_name + "End" + clock + "Time"]
569
573
  if isinstance(end, list):
570
574
  end = end[-1]
571
- return end - start
575
+ if isinstance(start, str) and isinstance(end, str):
576
+ return (datetime.datetime.fromisoformat(end) - datetime.datetime.fromisoformat(start)).total_seconds()
577
+ else:
578
+ return end - start
lsst/utils/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "29.2025.2500"
2
+ __version__ = "29.2025.2600"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-utils
3
- Version: 29.2025.2500
3
+ Version: 29.2025.2600
4
4
  Summary: Utility functions from Rubin Observatory Data Management for the Legacy Survey of Space and Time (LSST).
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: BSD 3-Clause License
@@ -14,19 +14,19 @@ lsst/utils/packages.py,sha256=D2eD2Qy3P_Os7RbUKsG2mPyLoSLjqejUX6lNhaC16wg,27455
14
14
  lsst/utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  lsst/utils/tests.py,sha256=1cjyXtEL2LNhnPKjtiTt9cdPmlaEWgaWBx9BfM-xSmA,39152
16
16
  lsst/utils/threads.py,sha256=WNl3uvbE7bx5UyxTX0fwN5AkU3Yty_m8y_pMKcMCdv8,2551
17
- lsst/utils/timer.py,sha256=Vt5yTuyGL-EAQ9ZE9rtzYLNRQDQ3njN97J5_kZn9Kh4,19923
17
+ lsst/utils/timer.py,sha256=ONg_6n3r8hbWg4wcLSxcIHg6LjO4n0_pzwyzLeX0-_E,20258
18
18
  lsst/utils/usage.py,sha256=qunydx-KlcbNp-vFcBtvBayWwZAa0tHtSWvz5BycvLA,4598
19
- lsst/utils/version.py,sha256=uW49-HYTP9jPdj_-PD584MYKQsfoumQbft7BWRqu6H4,55
19
+ lsst/utils/version.py,sha256=eKEngRNTsqzq5yv4faNqXQ7KB1ya5wGTLTxJ1qbWG50,55
20
20
  lsst/utils/wrappers.py,sha256=KCvsrGXziLQ5pC8ytiFEXeDH9mBSo8eCZ8g08f7s404,19209
21
21
  lsst/utils/plotting/__init__.py,sha256=OEAZv2W12UAcUfDxH5H_k8v7cK4fVTOssuqNksZTuIs,507
22
- lsst/utils/plotting/figures.py,sha256=86qhbMEDc-VqyilXeoq-bS1X3-7wmLRyt2GvH2nD974,4356
22
+ lsst/utils/plotting/figures.py,sha256=BGpj3C71hJXg_IeyB62RL6oDl8LJgIhZbScHOon4tMM,4357
23
23
  lsst/utils/plotting/limits.py,sha256=6ilPmb4wg4aVtjlBgm75FPBrjDVSkW_ywZrj_QIQD2U,5839
24
- lsst/utils/plotting/publication_plots.py,sha256=nwttKC3818okJFZrquuRDDsnOys3WflGGZOmpZ0hcLI,4739
24
+ lsst/utils/plotting/publication_plots.py,sha256=-uOL2ptI3N52KxfhtJNsUt7SqeGdT78GF-_QjHKKmV8,5016
25
25
  lsst/utils/plotting/rubin.mplstyle,sha256=mjLPYzolUjeCXq8z4ltXLvEf8IuyT4TS0Nx8JJ05v6I,1063
26
- lsst_utils-29.2025.2500.dist-info/licenses/COPYRIGHT,sha256=I6Bxnp_LkIqDjafZNIXM8jfjYWC4XIlpNpZ7jkdeZK0,361
27
- lsst_utils-29.2025.2500.dist-info/licenses/LICENSE,sha256=7wrtgl8meQ0_RIuv2TjIKpAnNrl-ODH-QLwyHe9citI,1516
28
- lsst_utils-29.2025.2500.dist-info/METADATA,sha256=RqygypePRv1-E4xcuP437i7izFBRtn_fOBXPBADNdpY,1691
29
- lsst_utils-29.2025.2500.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
- lsst_utils-29.2025.2500.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
31
- lsst_utils-29.2025.2500.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
32
- lsst_utils-29.2025.2500.dist-info/RECORD,,
26
+ lsst_utils-29.2025.2600.dist-info/licenses/COPYRIGHT,sha256=I6Bxnp_LkIqDjafZNIXM8jfjYWC4XIlpNpZ7jkdeZK0,361
27
+ lsst_utils-29.2025.2600.dist-info/licenses/LICENSE,sha256=7wrtgl8meQ0_RIuv2TjIKpAnNrl-ODH-QLwyHe9citI,1516
28
+ lsst_utils-29.2025.2600.dist-info/METADATA,sha256=Ujpi5B9C42iLclZryt6IRbt_lYhdme6y5JrrK-Pi36A,1691
29
+ lsst_utils-29.2025.2600.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
30
+ lsst_utils-29.2025.2600.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
31
+ lsst_utils-29.2025.2600.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
32
+ lsst_utils-29.2025.2600.dist-info/RECORD,,