Closed zichenzachwang closed 4 months ago
hey @zichenzachwang, I need your help in resolving conflicts (in the future, please create a personal branch for PRs, rather than using your main
branch).
please change makeOTF to:
if lib.version and lib.version < (0, 7):
@otf_lib.function
def makeOTF(
ifiles: bytes,
ofiles: bytes,
lambdanm: int = 520,
dz: float = 0.102,
interpkr: int = 10,
bUserBackground: bool = False,
background: float = 90,
NA: float = 1.25,
NIMM: float = 1.3,
dr: float = 0.102,
krmax: int = 0,
bDoCleanup: bool = False,
) -> None:
"""Make OTF file(s) from `ifiles`, write to `ofiles`."""
else:
@otf_lib.function
def makeOTF(
ifiles: bytes,
ofiles: bytes,
lambdanm: int = 520,
dz: float = 0.102,
interpkr: int = 10,
bUserBackground: bool = False,
background: float = 90,
NA: float = 1.25,
NIMM: float = 1.3,
dr: float = 0.102,
krmax: int = 0,
bDoCleanup: bool = False,
b3Dout: bool = False,
) -> None:
"""Make OTF file(s) from `ifiles`, write to `ofiles`."""
and then resolve conflicts on the other docstrings
hey @zichenzachwang, I need your help in resolving conflicts (in the future, please create a personal branch for PRs, rather than using your
main
branch).please change makeOTF to:
if lib.version and lib.version < (0, 7): @otf_lib.function def makeOTF( ifiles: bytes, ofiles: bytes, lambdanm: int = 520, dz: float = 0.102, interpkr: int = 10, bUserBackground: bool = False, background: float = 90, NA: float = 1.25, NIMM: float = 1.3, dr: float = 0.102, krmax: int = 0, bDoCleanup: bool = False, ) -> None: """Make OTF file(s) from `ifiles`, write to `ofiles`.""" else: @otf_lib.function def makeOTF( ifiles: bytes, ofiles: bytes, lambdanm: int = 520, dz: float = 0.102, interpkr: int = 10, bUserBackground: bool = False, background: float = 90, NA: float = 1.25, NIMM: float = 1.3, dr: float = 0.102, krmax: int = 0, bDoCleanup: bool = False, b3Dout: bool = False, ) -> None: """Make OTF file(s) from `ifiles`, write to `ofiles`."""
and then resolve conflicts on the other docstrings
Hi Talley,
Thanks for mentioning that. I created a personal branch. Changes have been added. I also added to otf.py:
with CappedPSF(psf, max_otf_size) as _psf:
args = [
str.encode(_psf.path),
str.encode(outpath),
wavelength,
dzpsf,
fixorigin,
bUserBackground,
background,
na,
nimm,
dxpsf,
krmax,
cleanup_otf,
]
if not lib.lib.version or lib.lib.version >= (0, 7):
args += [skewed_decon]
lib.makeOTF(*args) # type: ignore
There is just one last issue with typo check. It tries to correct b3Dout argument name but I used it to be consistent with cudadecon.
Thanks @zichenzachwang
For the typo issue, add the string to the list of extend-ignore-identifiers-re
at the bottom of pyproject.toml
Got it. Ready to merge!
Allow 3D OTF generation after changes have been added to radial_interface.cpp in cudadecon