Skip to content

Commit 1440000

Browse files
authored
Merge branch 'main' into main
2 parents c678550 + b6444a4 commit 1440000

File tree

7 files changed

+820
-9
lines changed

7 files changed

+820
-9
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ __pycache__
2020
# dist directory
2121
dist
2222
# Egg metadata
23-
*.egg-info
23+
*.egg-info
24+
# uv
25+
uv.lock
26+
# AI-based programming cache
27+
.claude
28+
.serena

TCFile/TCFile_class.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
66
import hdf5plugin
77
import re
88
import dask.array as da
9+
import warnings
910

1011
def TCFile(tcfname:str, imgtype, channel=0):
12+
warnings.warn(
13+
"TCFile function is deprecated and will be removed by the end of 2026. "
14+
"Please use TCFZarrStore from TCFile.zarr_store instead for a more flexible "
15+
"and standards-compliant zarr interface. "
16+
"Example: from TCFile.zarr_store import TCFZarrStore; store = TCFZarrStore('file.TCF')",
17+
DeprecationWarning,
18+
stacklevel=2
19+
)
1120
if imgtype == '3D':
1221
return TCFileRI3D(tcfname)
1322
if imgtype == '2DMIP':
@@ -16,7 +25,7 @@ def TCFile(tcfname:str, imgtype, channel=0):
1625
return TCFileBF(tcfname)
1726
if imgtype == '3DFL':
1827
return TCFileFL3D(tcfname, channel)
19-
raise ValueError('Unsupported imgtype: Supported imgtypes are "3D","2DMIP", and "BF"')
28+
raise ValueError('Unsupported imgtype: Supported imgtypes are "3D", "2DMIP", "BF", and "3DFL"')
2029

2130
class TCFileAbstract(Sequence):
2231
'''
@@ -247,9 +256,8 @@ def __getitem__(self, key: int) -> np.ndarray:
247256
class TCFileFL3D(TCFileAbstract):
248257
imgtype = '3DFL'
249258
data_ndim = 3
250-
channel = 0
251259

252-
def __init__(self, tcfname: str, channel=0):
260+
def __init__(self, tcfname: str, channel: int = 0):
253261
self.channel = channel
254262
super().__init__(tcfname)
255263
with h5py.File(self.tcfname) as f:

TCFile/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
from .TCFile_class import *
1+
from .TCFile_class import TCFile
2+
from .zarr_store import TCFZarrStore

0 commit comments

Comments
 (0)