Skip to content

Commit

Permalink
Merge pull request #2314 from gemini-hlsw/GSFR-44100-b
Browse files Browse the repository at this point in the history
Gsfr 44100 b
  • Loading branch information
cquiroz authored Dec 17, 2024
2 parents bf6712e + ecf0fb5 commit 7b07f0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name := "ocs"
organization in Global := "edu.gemini.ocs"

// true indicates a test release, and false indicates a production release
ocsVersion in ThisBuild := OcsVersion("2025A", false, 1, 1, 1)
ocsVersion in ThisBuild := OcsVersion("2025A", false, 1, 1, 2)

pitVersion in ThisBuild := OcsVersion("2025A", true, 1, 1, 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scalaz._
import Scalaz._
import edu.gemini.spModel.gemini.ghost.GhostAsterism
import edu.gemini.spModel.time.ChargeClass
import edu.gemini.spModel.util.SPTreeUtil

Expand Down Expand Up @@ -370,12 +371,20 @@ final case class ProgramExportServlet(odb: IDBDatabaseService, user: Set[Princip
val ge = te.getGuideEnvironment.guideEnv

// Base information: we are only dealing with asterisms with a single target for now.
val asterism = te.getAsterism.asInstanceOf[Asterism.Single]
val base: SPTarget = te.getAsterism match {
case GhostAsterism.SingleTarget(t, _) => t.spTarget
case GhostAsterism.DualTarget(t, _, _) => t.spTarget // use the first target
case GhostAsterism.TargetPlusSky(t, _, _) => t.spTarget
case GhostAsterism.SkyPlusTarget(_, t, _) => t.spTarget
case GhostAsterism.HighResolutionTargetPlusSky(t, _, _, _) => t.spTarget
case Asterism.Single(t) => t
case _ => sys.error("Cannot happen") // Famous last words
}

("guideGroups" := guideGrpListEncodeJson(te, ge.groups)) ->:
("primaryIndex" := ge.primaryIndex) ->:
("userTargets" := userTargetsEncodeJson(te, te.getUserTargets.asScala.toList)) ->:
("base" := targetEncodeJson(te, asterism.t, None)) ->:
("base" := targetEncodeJson(te, base, None)) ->:
jEmptyObject
}

Expand Down

0 comments on commit 7b07f0a

Please sign in to comment.