DiamondLightSource / DiamondLightSource/httomo

Removed unused `self._block_start` and `self._chunk_start` private attributes of `DataSetBlock`

Open
#400 0 comments 0 reactions 0 assignees View on GitHub
minor
Dominant language
Python
Stars
10
Forks
5
Avg merge
5d 17h
Merged PRs (30d)
1

Description

These private attributes are not used anywhere in the `DataSetBlock` class: https://github.com/DiamondLightSource/httomo/blob/b28c2c3cdb2e2e086c9937b02a2aa563ca848941/httomo/runner/dataset.py#L62-L63

The parameter values `block_start` and `chunk_start` that they are defined from are used in the constructor for defining `self_chunk_index` and `self._global_index`, and that is the only place where those constructor parameters are needed, they're not needed in any other place in the `DataSetBlock` class.

Given that things can get confusing regarding the various pieces of info involved in a block (I got confused about what `self._block_start` and `self._chunk_start` were for in the context of padding), it feels like it makes sense to remove any unnecessary info on `DataSetBlock`. Therefore, I'm suggesting to remove `self._block_start` and `self._chunk_start` (unless there's a need for them that I am missing).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.