combined with how asdf handles datatype validation means a skycell reference files with inline storage results in a validation error.
Practically we never want a skycell reference file with inline storage but the current test models creates small arrays that combined with an array_inline_threshold (spacetelescope/roman_datamodels#681) results in an a model that cannot be saved.
'exact_datatype': True,
'tag': 'tag:stsci.edu:asdf/core/ndarray-1.*',
'title': 'Information about each projection region'}
On instance['projection_regions']:
{'data': [0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0],
'datatype': [{'datatype': 'int32', 'name': 'index'},
{'datatype': 'float64', 'name': 'ra_tangent'},
{'datatype': 'float64', 'name': 'dec_tangent'},
{'datatype': 'float64', 'name': 'ra_min'},
{'datatype': 'float64', 'name': 'ra_max'},
{'datatype': 'float64', 'name': 'dec_min'},
{'datatype': 'float64', 'name': 'dec_max'},
{'datatype': 'float32', 'name': 'orientat'},
{'datatype': 'float64', 'name': 'x_tangent'},
{'datatype': 'float64', 'name': 'y_tangent'},
{'datatype': 'int32', 'name': 'nx'},
{'datatype': 'int32', 'name': 'ny'},
{'datatype': 'int32', 'name': 'skycell_start'},
{'datatype': 'int32', 'name': 'skycell_end'}],
'shape': []}
Note the lack of "byteorder" in the produced datatype.
rad/latest/reference_files/skycells.yaml
Line 90 in 666cc52
combined with how asdf handles datatype validation means a skycell reference files with inline storage results in a validation error.
Practically we never want a skycell reference file with inline storage but the current test models creates small arrays that combined with an array_inline_threshold (spacetelescope/roman_datamodels#681) results in an a model that cannot be saved.
produces a validation error:
Note the lack of "byteorder" in the produced datatype.
FWIW if we remove
byteorderfrom the schema, a similar validation error occurs when attempting to save to an internal block.I am leaning towards this being an asdf bug since I'm struggling to think why the datatype validation would care about byteorder and perhaps we should drop that field from https://github.com/asdf-format/asdf/blob/db93e309fc9ead732e0ada8be41bb0ec90c6aa5a/asdf/tags/core/ndarray.py#L16
Pinging @sydduckworth for input on this from the asdf side.