brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

Xarray and scaling #69

Closed brisvag closed 3 years ago

brisvag commented 3 years ago

Migrated some stuff to xarray, so we now have named dimensions and dimension coordinates! It's mostly useless (for now) for the user interface, but it makes some code MUCH easier (see coordinate reordering stuff in PointBlock).

Another change from this PR that is instead very visible from the user side: scaling based on pixel size! Now everything is automagic for mrc and star files.

Smaller things: cleans up some old code and introduces a custom ParseError that makes debugging IO operations a bit easier.

brisvag commented 3 years ago

Closes #19 and fixes #67 .

brisvag commented 3 years ago

A thing to keep in mind: some stuff (ndim functionality, reshaping nonsense such as in TransformBlock) broke due to the use of xarray. I fixed some stuff, but others I will leave as is, since they are "legacy" code and should be either rewritten completely or moved to different places.

For now, I will remove the test where necessary (only TransformBlock has this issue).

codecov[bot] commented 3 years ago

Codecov Report

Merging #69 (84d49ec) into develop (bb34142) will increase coverage by 1.48%. The diff coverage is 71.02%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #69      +/-   ##
===========================================
+ Coverage    68.51%   70.00%   +1.48%     
===========================================
  Files           85       99      +14     
  Lines         1639     1960     +321     
===========================================
+ Hits          1123     1372     +249     
- Misses         516      588      +72     
Impacted Files Coverage Δ
peepingtom/__main__.py 0.00% <ø> (ø)
peepingtom/gui/__init__.py 0.00% <ø> (ø)
peepingtom/gui/gui.py 0.00% <ø> (ø)
peepingtom/gui/particle_selector.py 0.00% <0.00%> (ø)
peepingtom/io_/utils/angle_conversion.py 18.18% <18.18%> (ø)
peepingtom/io_/read/read.py 18.29% <22.72%> (-1.19%) :arrow_down:
peepingtom/depictors/viewer.py 28.12% <28.12%> (ø)
peepingtom/depictors/pyqtgraph/plotdepictor.py 35.00% <35.00%> (ø)
...eepingtom/depictors/pyqtgraph/classplotdepictor.py 38.46% <38.46%> (ø)
...ingtom/depictors/pyqtgraph/propertyplotdepictor.py 44.44% <44.44%> (ø)
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dc2201...84d49ec. Read the comment docs.