sdss-almanac 0.2.9__tar.gz → 0.2.11__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.
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/PKG-INFO +1 -1
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/pyproject.toml +1 -1
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/__init__.py +1 -1
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/cli.py +2 -2
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/exposure.py +12 -2
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/plate.py +8 -2
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/PKG-INFO +1 -1
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/LICENSE.md +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/README.md +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/setup.cfg +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/apogee.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/catalog.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/config.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/__init__.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/fps.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/metadata.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/types.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/data_models/utils.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/database.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/display.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/etc/__init__.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/etc/bad_exposures.csv +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/io.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/logger.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/qa.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/stash/data_models.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/stash/plugmap_models.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/almanac/utils.py +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/SOURCES.txt +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/dependency_links.txt +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/entry_points.txt +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/not-zip-safe +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/requires.txt +0 -0
- {sdss_almanac-0.2.9 → sdss_almanac-0.2.11}/src/sdss_almanac.egg-info/top_level.txt +0 -0
@@ -383,10 +383,10 @@ def update(key, value, **kwargs):
|
|
383
383
|
click.echo(click.style("Deprecated: use `almanac config set`", fg="yellow"))
|
384
384
|
return set(key, value, **kwargs)
|
385
385
|
|
386
|
-
@config.command
|
386
|
+
@config.command(name="set")
|
387
387
|
@click.argument("key")
|
388
388
|
@click.argument("value")
|
389
|
-
def
|
389
|
+
def _set(key, value, **kwargs):
|
390
390
|
"""Set a configuration value"""
|
391
391
|
|
392
392
|
from almanac import config, get_config_path, ConfigManager
|
@@ -77,6 +77,13 @@ class Exposure(BaseModel):
|
|
77
77
|
#def sparse_pak(self) -> bool:
|
78
78
|
# return "sparse" in self.observer_comment.lower()
|
79
79
|
|
80
|
+
def __str__(self):
|
81
|
+
return (
|
82
|
+
f"<Exposure(observatory={self.observatory},"
|
83
|
+
f" mjd={self.mjd}, exposure={self.exposure},"
|
84
|
+
f" image_type={self.image_type})>"
|
85
|
+
)
|
86
|
+
|
80
87
|
@computed_field
|
81
88
|
def flagged_bad(self) -> bool:
|
82
89
|
marked_bad = (self.observatory, self.mjd, self.exposure) in lookup_bad_exposures
|
@@ -342,8 +349,11 @@ class Exposure(BaseModel):
|
|
342
349
|
# went wrong in early plate era.
|
343
350
|
rows["plugged_mjd"] = self.plugged_mjd
|
344
351
|
rows["observatory"] = self.observatory
|
345
|
-
|
346
|
-
|
352
|
+
try:
|
353
|
+
self._targets = tuple([factory(**r) for r in rows])
|
354
|
+
except Exception as e:
|
355
|
+
e.add_note(f"Originated from {self}")
|
356
|
+
raise
|
347
357
|
else:
|
348
358
|
self._targets = tuple()
|
349
359
|
return self._targets
|
@@ -49,7 +49,7 @@ class PlateTarget(BaseModel):
|
|
49
49
|
|
50
50
|
# Instrument identifiers
|
51
51
|
spectrograph_id: int = Field(alias="spectrographId", description="Spectrograph ID", default=-1)
|
52
|
-
fiber_id: int = Field(alias="fiberId", description="Fiber ID",
|
52
|
+
fiber_id: int = Field(alias="fiberId", description="Fiber ID", ge=1, le=300)
|
53
53
|
planned_fiber_id: int = Field(alias="fiberid", description="Fiber ID", default=-1)
|
54
54
|
throughput: int = Field(description="Throughput value", default=-1)
|
55
55
|
|
@@ -137,6 +137,12 @@ class PlateTarget(BaseModel):
|
|
137
137
|
break
|
138
138
|
|
139
139
|
if self.fiber_id in (53, 60):
|
140
|
-
|
140
|
+
# The DRP indicates that these are unpopulated fibers.
|
141
|
+
self.hole_type = "unplugged"
|
142
|
+
self.category = "unplugged"
|
143
|
+
self.planned_hole_type = "unplugged"
|
144
|
+
self.ra = np.nan
|
145
|
+
self.dec = np.nan
|
146
|
+
self.obj_type = "na"
|
141
147
|
|
142
148
|
return self
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|