ofgulban / bvbabel

A lightweight Python library for reading & writing BrainVoyager file formats.
MIT License
19 stars 11 forks source link

Create vtc_masked #51

Closed jorievanharen closed 7 months ago

jorievanharen commented 7 months ago

Added misc function to efficiently load masked .vtc files. Masking happens at the level of the binary readout (reducing memory consumption, and increasing speed).

ofgulban commented 7 months ago

Ah cool. Actually, now thinking about it, maybe it is better to populate misc with such functions rather than the scripts I have put there now. E.g. import bvbabel.misc.read_vtc_msk , I am guessing that you are using is like this right?

jorievanharen commented 7 months ago

Yes I use it in this way. I found that the function (even though I tried to keep it minimalistic) has become a bit more complicated than the general io functions. This is the reason I placed it in misc - as it hampers readability a bit. However such a function is quite useful when reading in what otherwise would be tens to hundreds of gigabytes of multiple .vtc files. I don't really know what the best placement of these functions would be, maybe a sub directory in misc with extended_io.

ofgulban commented 7 months ago

Got it. I think it is fine for now to keep in under misc. I will think deeper how to organize if/when these misc functions grow.