ISIS Serial Number translation only uses the last translation
- Dominant language
- Python
- Stars
- 16
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
In the ISIS serial number translation logic, the SQLAlchemy model converts the PVL translation string into a [NextedJsonObject](https://github.com/USGS-Astrogeology/plio/blob/master/plio/io/io_db.py#L37) 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".
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.