Skip to content

Commit

Permalink
Merge pull request #4448 from gemini-hlsw/sc-4407-extra-acquisition-i…
Browse files Browse the repository at this point in the history
…n-executed-sequences

Hide acquisition on completed observations
  • Loading branch information
cquiroz authored Dec 31, 2024
2 parents e44abbd + a0a6037 commit 6fbc84f
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ sealed trait GmosSequenceTable[S, D]:
currentVisitData.map(_._2)
protected[sequence] lazy val currentStepId: Option[Step.Id] = currentVisitData.flatMap(_._3)

// Hide acquisition when science is executing.
protected[sequence] lazy val scienceRows: List[SequenceRow[D]] =
config.science
.map(futureSteps(ObserveClass.Science))
.orEmpty

// Hide acquisition when science is executing or when sequence is complete.
protected[sequence] lazy val isAcquisitionDisplayed: Boolean =
!currentAtomSequenceType.contains_(SequenceType.Science)
!currentAtomSequenceType.contains_(SequenceType.Science) && scienceRows.nonEmpty

protected[sequence] lazy val acquisitionRows: List[SequenceRow[D]] =
config.acquisition // If we are executing Science, don't show any future acquisition rows.
.filter(_ => isAcquisitionDisplayed)
.map(futureSteps(ObserveClass.Acquisition))
.orEmpty

protected[sequence] lazy val scienceRows: List[SequenceRow[D]] =
config.science
.map(futureSteps(ObserveClass.Science))
.orEmpty

case class GmosNorthSequenceTable(
visits: List[Visit.GmosNorth],
config: ExecutionConfig[StaticConfig.GmosNorth, DynamicConfig.GmosNorth],
Expand Down

0 comments on commit 6fbc84f

Please sign in to comment.