CCSDSPy / ccsdspy

I/O interface and utilities for CCSDS binary spacecraft data in Python. Library used in flight missions at NASA, NOAA, and SWRI
https://ccsdspy.org
BSD 3-Clause "New" or "Revised" License
74 stars 18 forks source link

Have the packet arrays at the same location in the parsed results (load output) as in the VariableLength packet definition #106

Closed tloubrieu-jpl closed 5 months ago

tloubrieu-jpl commented 5 months ago

As for now, at the output of function _unexpand_field_arrays they are pushed at the end of the list of fields, instead of where they were origninally defined.

This is a minor request, but if possible, that would help the user to retrieve the parsed data where it was initially defined.

ddasilva commented 5 months ago

Thanks @tloubrieu-jpl! Just to be clear, by "same location" you are referring to the order in which the keys iterate in the returned dict (which matches the insertion order)?

tloubrieu-jpl commented 5 months ago

Hi @ddasilva , yes, the fieldsArrays are found at the end of the keys of the dictionary returned by the load() method, wherever they were in the VariableLength object init.