Skip to content

ISIS Serial Number translation only uses the last translation #161

@jessemapel

Description

@jessemapel

In the ISIS serial number translation logic, the SQLAlchemy model converts the PVL translation string into a NextedJsonObject which removes duplicate keys such as the multiple translations. Then, the JSON object gets turned back into a PvlModule. This results in strange behavior like the Galileo translation going from:

Group = Keyword1
  Auto
  InputKey       = SpacecraftName
  InputGroup     = "IsisCube,Instrument"
  InputPosition  = (IsisCube, Instrument)
  OutputName     = Keyword1
  OutputPosition = (Group, SerialNumberKeywords)
  Translation    = (Galileo, GalileoOrbiter)
  Translation    = (Galileo, GALILEOORBITER)
  Translation    = (Galileo, "Galileo Orbiter")
  Translation    = (*, *)
End_Group

to

Group = Keyword1
  Auto
  InputKey       = SpacecraftName
  InputGroup     = "IsisCube,Instrument"
  InputPosition  = (IsisCube, Instrument)
  OutputName     = Keyword1
  OutputPosition = (Group, SerialNumberKeywords)
  Translation    = (*, *)
End_Group

This in turn results in invalid serial numbers because the value on the label is "Galileo Orbiter" and instead of getting "Galileo" as the first keyword, you get "Galileo Orbiter".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions