cherab / solps

Other
6 stars 5 forks source link

Minor fixes to mdsplus.py #6

Closed matteomoscheni closed 4 years ago

matteomoscheni commented 5 years ago

Hello everybody,

first of all, thank you for the great work! I have some minor fixes of mdsplus.py file:

**line 85: 'decode' is applied to an already decoded object => an error message is printed. It is sufficient to remove it.

**line 169: 'sim._total_rad' is to be substituted by 'sim.total_radiation' where "total_radiation" is one property of the sim-object. In this way the setter correctly works and a function 2d is stored in the field sim._total_rad.

Best regards!

Matteo

CnlPepper commented 5 years ago

Hi Matteo,

coincidentally I just spotted the total_radiation issue too. I'll make this change now. The change will be in the dev branch until we make another release.

Best regards,

Alex

CnlPepper commented 5 years ago

I'll leave the decode for now, I suspect someone added it for a reason. This whole part of the code is quite poor and needs a heavy refactor, it was a quick hack together to solve an immediate need.

CnlPepper commented 5 years ago

Ok looks like I was working off a stale copy of the file, I'll have to revert this change and re investigate.

CnlPepper commented 5 years ago

I've reverted the change, are you using the master or dev branch? If you are using master, please consider switching to development... I think it is in a better state, though not brilliant.

matteomoscheni commented 5 years ago

Thank you very much for both the advice and the effort!