PtyLab Documentation - API Documentations - #102
Conversation
…tyLab.py into initial_doc_changes
…ot faimliar with FPM.
|
HI @cliulucien, looks like some serious bugs. If you see them, please report it separately under issues and if you fix those, please do so with a separate PR tagging those issues. |
- implement dtype matching used by convert2single() - return linear and area overlap metrics from getOverlap() - use normalized probe-amplitude autocorrelation for area-overlap estimation
| The method requires JAX, which is imported when the function is | ||
| called. | ||
| """ | ||
| import jax |
There was a problem hiding this comment.
How did jax get here? If this requires some AD stuff, we need to rethink how to place this function correctly. Looking at the code below, we can use existing dependencies for this. Maybe if you could add this as an issue along with other issues/bugs you found, that would be great.
| Display the measured ptychogram stack on a logarithmic intensity scale. | ||
|
|
||
| The diffraction patterns are clipped to non-negative values, converted to | ||
| ``log10(I + 1)`` for visualization, and displayed with an interactive |
There was a problem hiding this comment.
We could use xp.log1p(I) to avoid adding this 1. Not as important but feel free to make that edit in the below code if you like
What and whyThis PR improves the API documentation for the main reconstruction engines Current finished module:
The main changes include:
The goal is to make the API reference useful for both users who want to How it was testedThe documentation was built locally with MkDocs and checked through the Docstrings were reviewed for:
Relevant reconstruction tests were also run while documenting and refactoring NotesThis PR mainly changes documentation and docstrings. Some implementation issues and cleanup opportunities were identified while Several |
| @@ -34,6 +34,7 @@ dev = [ | |||
| gpu = ["cupy-cuda12x[ctk]"] | |||
There was a problem hiding this comment.
Could you please change this line to gpu = ["cupy-cuda12x[ctk]; sys_platform != 'darwin'"]
There was a problem hiding this comment.
cupy does not support mac
| module-name = "PtyLab" | ||
| module-root = "" | ||
|
|
||
| [tool.uv] |
There was a problem hiding this comment.
Maybe also mention all the devices instead of just windows. Pyqt5 is an annoying dependency
[tool.uv]
# Platforms the lockfile must be installable on. Wheel-only packages (pyqt5-qt5,
# cupy, torch) are checked against each; uv falls back to older versions if needed.
required-environments = [
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'win32' and platform_machine == 'AMD64'",
"sys_platform == 'darwin' and platform_machine == 'arm64'",
]|
LGTM! |
No description provided.