lsst-utils 29.2025.2500__tar.gz → 29.2025.2600__tar.gz

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.
Files changed (64) hide show
  1. {lsst_utils-29.2025.2500/python/lsst_utils.egg-info → lsst_utils-29.2025.2600}/PKG-INFO +1 -1
  2. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/doc/lsst.utils/CHANGES.rst +10 -0
  3. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/plotting/figures.py +1 -0
  4. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/plotting/publication_plots.py +19 -6
  5. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/timer.py +11 -4
  6. lsst_utils-29.2025.2600/python/lsst/utils/version.py +2 -0
  7. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600/python/lsst_utils.egg-info}/PKG-INFO +1 -1
  8. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_matplotlib_figures.py +13 -0
  9. lsst_utils-29.2025.2500/python/lsst/utils/version.py +0 -2
  10. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/COPYRIGHT +0 -0
  11. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/LICENSE +0 -0
  12. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/MANIFEST.in +0 -0
  13. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/README.rst +0 -0
  14. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/doc/lsst.utils/index.rst +0 -0
  15. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/pyproject.toml +0 -0
  16. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/__init__.py +0 -0
  17. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/__init__.py +0 -0
  18. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/_packaging.py +0 -0
  19. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/argparsing.py +0 -0
  20. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/classes.py +0 -0
  21. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/db_auth.py +0 -0
  22. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/deprecated.py +0 -0
  23. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/doImport.py +0 -0
  24. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/inheritDoc.py +0 -0
  25. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/introspection.py +0 -0
  26. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/iteration.py +0 -0
  27. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/logging.py +0 -0
  28. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/packages.py +0 -0
  29. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/plotting/__init__.py +0 -0
  30. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/plotting/limits.py +0 -0
  31. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/plotting/rubin.mplstyle +0 -0
  32. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/py.typed +0 -0
  33. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/tests.py +0 -0
  34. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/threads.py +0 -0
  35. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/usage.py +0 -0
  36. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst/utils/wrappers.py +0 -0
  37. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst_utils.egg-info/SOURCES.txt +0 -0
  38. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst_utils.egg-info/dependency_links.txt +0 -0
  39. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst_utils.egg-info/requires.txt +0 -0
  40. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst_utils.egg-info/top_level.txt +0 -0
  41. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/python/lsst_utils.egg-info/zip-safe +0 -0
  42. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/setup.cfg +0 -0
  43. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_argparsing.py +0 -0
  44. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_classes.py +0 -0
  45. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_db_auth.py +0 -0
  46. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_decorators.py +0 -0
  47. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_deprecated.py +0 -0
  48. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_doImport.py +0 -0
  49. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_executables.py +0 -0
  50. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_getPackageDir.py +0 -0
  51. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_getTempFilePath.py +0 -0
  52. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_import.py +0 -0
  53. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_inheritDoc.py +0 -0
  54. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_introspection.py +0 -0
  55. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_iteration.py +0 -0
  56. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_logging.py +0 -0
  57. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_ordering.py +0 -0
  58. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_packages.py +0 -0
  59. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_plotting_limits.py +0 -0
  60. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_threads.py +0 -0
  61. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_timer.py +0 -0
  62. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_usage.py +0 -0
  63. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_utils.py +0 -0
  64. {lsst_utils-29.2025.2500 → lsst_utils-29.2025.2600}/tests/test_wrappers.py +0 -0
@@ -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
@@ -1,3 +1,13 @@
1
+ lsst-utils v29.1.1 (2025-06-19)
2
+ ===============================
3
+
4
+ Miscellaneous Changes of Minor Interest
5
+ ---------------------------------------
6
+
7
+ - Updated multiband plot colors (with white background) for improved colorblind accessibility. (`DM-51451 <https://rubinobs.atlassian.net/browse/DM-51451>`_)
8
+ - Add some minor changes to plotting utilities, for example adding a default color for SSO objects
9
+ (`DM-50892 <https://rubinobs.atlassian.net/browse/DM-50892>`_)
10
+
1
11
  lsst-utils v29.1.0 (2025-05-22)
2
12
  ===============================
3
13
 
@@ -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
@@ -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
@@ -0,0 +1,2 @@
1
+ __all__ = ["__version__"]
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
@@ -34,6 +34,8 @@ from lsst.utils.plotting import (
34
34
  make_figure,
35
35
  mk_colormap,
36
36
  set_rubin_plotstyle,
37
+ sso_cmap,
38
+ sso_color,
37
39
  stars_cmap,
38
40
  stars_color,
39
41
  )
@@ -130,6 +132,17 @@ class PublicationPlotsTestCase(unittest.TestCase):
130
132
  ax.axhline(0, color=accent_color())
131
133
  fig.savefig(tmpFile)
132
134
 
135
+ def testSSOColor(self):
136
+ with lsst.utils.tests.getTempFilePath(".png") as tmpFile:
137
+ fig = make_figure()
138
+ ax = fig.add_subplot(111)
139
+ xs = [0, 1]
140
+ ys = [0, 1]
141
+ for cmap in [sso_cmap(), sso_cmap(single_color=True)]:
142
+ ax.hexbin(xs, ys, cmap=cmap)
143
+ ax.axhline(0, color=sso_color())
144
+ fig.savefig(tmpFile)
145
+
133
146
  def testMkColormap(self):
134
147
  mk_colormap(["#fde725", "#21918c", "#440154"])
135
148
  mk_colormap(["#fde725", "#5ec962", "#21918c", "#3b528b"])
@@ -1,2 +0,0 @@
1
- __all__ = ["__version__"]
2
- __version__ = "29.2025.2500"