ePSIC-DLS / particlespy

Package for analysing particles in electron microscopy data sets.
GNU General Public License v3.0
19 stars 10 forks source link

Update particle save and load #46

Closed M0hsend closed 4 years ago

M0hsend commented 4 years ago

Updated save_plist and load_plist methods to include more properties (to fix issue #44). Some of the properties still messing since the corresponding set method is not defined in the particle class. Let me know @TomSlater if you want me to add those as well.

codecov[bot] commented 4 years ago

Codecov Report

Merging #46 into master will increase coverage by 2.90%. The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   72.97%   75.88%   +2.90%     
==========================================
  Files          14       13       -1     
  Lines         792      767      -25     
==========================================
+ Hits          578      582       +4     
+ Misses        214      185      -29     
Impacted Files Coverage Δ
ParticleSpy/particle_save.py 20.00% <0.00%> (-3.08%) :arrow_down:
ParticleSpy/particle_load.py 100.00% <100.00%> (ø)
TomSlater commented 4 years ago

Thanks for doing this Mohsen.

You had changed particle_io.py but that file wasn't being used. I'd annoyingly left it in from a previous version. The correct files used are particle_save.py and particle_load.py.

I updated the methods to just iterate over properties so there's a bit less code and they should catch all properties in the particle_list object or the saved file.

M0hsend commented 4 years ago

Great, definitely the better way of doing it! Thanks.

TomSlater commented 4 years ago

I think we can ignore the Travis failure and this PR should now be ready to merge. I'll add it to the next minor release.