Various minor issues/improvements
Some points might be considered for improvements/additions:
- at https://juigitlab.esac.esa.int/python/ptr/-/blob/main/src/ptr/element.py#L126 : some values can be datetimes too (?).
- a strip() here https://juigitlab.esac.esa.int/python/ptr/-/blob/main/src/ptr/ptx.py#L250 would be nice to account for whitespaces in the text.
- block start/end can be brutally overwritten without any complaints (should it raise a ValueError if it is not an Element? or better try to adapt the type if possible...):
- the fact that sometimes one has to use edit or set_value might be confusing:
block["attitude"]["offsetAngles"]["xAngles"].set_value(" ".join(xangles.round(4).astype(str)))
block["attitude"]["offsetAngles"]["deltaTimes"].set_value(" ".join(np.array(dtimes).round(4).astype(str)))
block["attitude"]["offsetAngles"]["startTime"].edit(offset_start)
- dot-access to the children would be nice (i.e. if one can get startTime with .start one would expect to find also .attitude)
Edited by Benoit Seignovert