funkelab / daisy

Block-wise task scheduling for large nD volumes.
MIT License
25 stars 16 forks source link

Fixing block ID numbering with cantor number breaks compatibility #16

Closed trivoldus28 closed 3 months ago

trivoldus28 commented 4 years ago

In dev-0.3, the block_id is assigned directly the cantor number, which counts from 0. In a personal communication with Logan, he said that @funkey prefers to have the blocks counted from 1 instead. This would be an easy change, and personally I have been using the 1 offset for some time now without any problem.

The problem is that making the change now would break compatibility with the previous numbering system, and can be a problem for usages where block_id is stored in a DB and used (it is used extensively in my proofreading pipeline).

So I propose that we fix the block ID enumeration by adding 1 to the cantor number returned value, and bump the daisy versioning to dev-0.4. Thought?

funkey commented 4 years ago

Actually, I don't remember why I would want the block IDs to start with 1... ;) I guess it had something to do with computing the inverse, i.e., the coordinates of a block given the ID. But the 0-based indexing could be handled transparently, there.

@Lathomas42, do you see other reasons to have the block IDs start with 1?

pattonw commented 3 months ago

I don't think this has been a problem. We've been using regular cantor numbers for a while and there haven't been any arguments for 1 indexing