umr-lops / xsar

Synthetic Aperture Radar (SAR) Level-1 GRD python mapper for efficient xarray/dask based processing
https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/
MIT License
28 stars 8 forks source link

Readers read twice in Dataset classes #158

Open yreynaud opened 1 year ago

yreynaud commented 1 year ago

I noticed that when we give a meta object as input of a sar dataset object, the reader is read twice. It is unnecessary to read two times same data whereas it has already been done. I tried to remove the use of BlockingActorProxy , and so add a specific __getattr__ method for Meta classes ( BaseMeta). But I faced recursion problems because at the end of the dataset class __init__, an update of the attributes of the datatree tries to fill the coverage (with the coverage property in the meta) that indirectly call to _bbox_ll. This last method wasn't found (recursion), I don't know why. It should be good to make the reader being read an only time.