Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gsched 745: Update some resource definitions in the providers #507

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scheduler/core/programprovider/gpp/gppprogramprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def determine_mode(inst: str) -> ObservationMode:
qa_states = []
prev_atom_id = -1
n_atom = 0
instrument_resources = frozenset([self._sources.origin.resource.lookup_resource(instrument)])
instrument_resources = frozenset([self._sources.origin.resource.lookup_resource(instrument, resource_type=ResourceType.INSTRUMENT)])
for step in sequence:
if step[GppProgramProvider._AtomKeys.OBS_CLASS] != 'ACQUISITION':
next_atom = False
Expand All @@ -813,7 +813,8 @@ def determine_mode(inst: str) -> ObservationMode:
GppProgramProvider._fpu_to_barcode[instrument][fpu], description=fpu)
for fpu in fpus])
disperser_resources = frozenset(
[self._sources.origin.resource.lookup_resource(disperser.split('_')[0])
[self._sources.origin.resource.lookup_resource(disperser.split('_')[0],
resource_type=ResourceType.DISPERSER)
for disperser in dispersers])
resources = frozenset([r for r in fpu_resources | disperser_resources | instrument_resources])

Expand Down
2 changes: 1 addition & 1 deletion scheduler/core/programprovider/ocs/ocsprogramprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def autocorr_lag(x):

# Transform Resources.
# TODO: For now, we focus on instruments, and GMOS FPUs and dispersers exclusively.
instrument_resources = frozenset([self._sources.origin.resource.lookup_resource(instrument)])
instrument_resources = frozenset([self._sources.origin.resource.lookup_resource(instrument, resource_type=ResourceType.INSTRUMENT)])
if 'GMOS' in instrument:
# Convert FPUs and dispersers to barcodes. Note that None might be contained in some of these
# sets, but we filter below to remove them.
Expand Down
Binary file modified scheduler/pickles/ocsenv.pickle
Binary file not shown.
Loading