Skip to content

Commit

Permalink
Merge pull request #507 from bryanmiller/GSCHED-745
Browse files Browse the repository at this point in the history
Gsched 745: Update some resource definitions in the providers
  • Loading branch information
stroncod authored Sep 11, 2024
2 parents 7b41dad + 46c62b5 commit d096715
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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.

0 comments on commit d096715

Please sign in to comment.