|
101 | 101 | "source": [ |
102 | 102 | "## 3. Type Hints for Code Readability\n", |
103 | 103 | "\n", |
104 | | - "Since type hints are used extensively to improve code readability in accordance with [DTDT411. Style Guide](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/tutorials/4-developers/DTDV411_style.ipynb), DeepTrack2 introduces a few custom type hints for internal use, which are declared in the [types.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/types.py) module." |
| 104 | + "Since type hints are used extensively to improve code readability in accordance with [DTDV411_style.ipynb](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/tutorials/4-developers/DTDV411_style.ipynb), DeepTrack2 introduces a few custom type hints for internal use, which are declared in the [types.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/types.py) module." |
105 | 105 | ] |
106 | 106 | }, |
107 | 107 | { |
|
169 | 169 | "\n", |
170 | 170 | " In particular, the [core.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/core.py) module contains the `DeepTrackNode` class which is used to represent a node in a computation graph, which when used together with the `DeepTrackDataObject` class can store data and compute new data based on its dependencies and child nodes. These classes track dependencies and validate data with ID and index addresses. \n", |
171 | 171 | "\n", |
172 | | - " The [core.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/core.py) module also provides the base class for the [features.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/features.py) module, which is the largest module in DeepTrack2 in terms of code volume, and provides the base class for all other modules in the deeptrack directory; the only exceptions are [image.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/image.py) and [properties.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/properties.py).\n", |
| 172 | + " The [core.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/core.py) module also provides the base class for the [features.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/features.py) module, which is the largest module in DeepTrack2 in terms of code volume, and provides the base class for all other modules in the deeptrack directory; the only exceptions is [properties.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/properties.py).\n", |
173 | 173 | "\n", |
174 | 174 | "- [mie.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/mie.py) provides functions to perform Mie scattering calculations often used in simulations.\n", |
175 | 175 | "\n", |
176 | 176 | " In particular, it provides methods to compute coefficients for both spherical and stratified spherical harmonics, and to calculate the spherical harmonics of the Mie field with an iterative method.\n", |
177 | 177 | "\n", |
178 | | - "- [pint_definition.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/pint_definition.py)extends Pint's default definitions by introducing project-specific constants and unit modifications for flexible calculations in the context of DeepTrack2.\n", |
| 178 | + "- [pint_definition.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/pint_definition.py) extends Pint's default definitions by introducing project-specific constants and unit modifications for flexible calculations in the context of DeepTrack2.\n", |
179 | 179 | "\n", |
180 | 180 | "- [polynomials.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/backend/polynomials.py) provides a set of functions which compute Bessel and Riccati-Bessel polynomials and their derivatives.\n", |
181 | 181 | "\n", |
|
242 | 242 | "cell_type": "markdown", |
243 | 243 | "metadata": {}, |
244 | 244 | "source": [ |
245 | | - "The value of a `Property` has no datatype restrictions and can represent a constant, a function, a list, an `Image`, etc." |
| 245 | + "The value of a `Property` has no datatype restrictions and can represent a constant, a function, a list, etc." |
246 | 246 | ] |
247 | 247 | }, |
248 | 248 | { |
|
263 | 263 | "cell_type": "markdown", |
264 | 264 | "metadata": {}, |
265 | 265 | "source": [ |
266 | | - "## 7. Containers for Array-Like Structures\n", |
267 | | - "\n", |
268 | | - "The [image.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/image.py) module only contains a single class, namely `Image`. This class serves as a wrapper for array-like data and provides a unified interface for array operations and property management with NumPy and PyTorch compatibility.\n", |
269 | | - "\n", |
270 | | - "Several utility functions are also included, which can be used to manipulate `Image` objects within pipelines, such as image coercion to ensure a consistent type across a series of images, or padding to optimize Fast Fourier Transform performance." |
271 | | - ] |
272 | | - }, |
273 | | - { |
274 | | - "cell_type": "markdown", |
275 | | - "metadata": {}, |
276 | | - "source": [ |
277 | | - "\n", |
278 | | - "## 8. High-Level Modules\n", |
| 266 | + "## 7. High-Level Modules\n", |
279 | 267 | "\n", |
280 | 268 | "The remaoning modules jointly implement the main functionality of DeepTrack2, which is synthetic data generation using simulations." |
281 | 269 | ] |
|
303 | 291 | "cell_type": "markdown", |
304 | 292 | "metadata": {}, |
305 | 293 | "source": [ |
306 | | - "\n", |
307 | | - "## 9. Handle and Utility Modules\n", |
| 294 | + "## 8. Handle and Utility Modules\n", |
308 | 295 | "\n", |
309 | 296 | "The following modules play a mediating role between external libraries and DeepTrack2, such as integrating Pytorch classes or Numpy functions, as well as utilities for type consistency and radial center calculations." |
310 | 297 | ] |
|
313 | 300 | "cell_type": "markdown", |
314 | 301 | "metadata": {}, |
315 | 302 | "source": [ |
316 | | - "### 9.1. Numpy\n", |
| 303 | + "### 8.1. Numpy\n", |
317 | 304 | "The following modules provide handles to enable the use of NumPy functions with DeepTrack2 objects as well as mathematical utilities:\n", |
318 | 305 | "\n", |
319 | 306 | "- [elementwise.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/elementwise.py) provides handles to perform various elementary NumPy functions elementwise and sequentially when using `Feature` objects. For example, some of these functions include trigonometric, hyperbolic, rounding, exponents.\n", |
|
327 | 314 | "cell_type": "markdown", |
328 | 315 | "metadata": {}, |
329 | 316 | "source": [ |
330 | | - "### 9.2. Pytorch\n", |
| 317 | + "### 8.2. Pytorch\n", |
331 | 318 | "Located in the [pytorch](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/pytorch/) directory, there are two modules to facilitate PyTorch integration with DeepTrack2 objects:\n", |
332 | 319 | "\n", |
333 | 320 | "- [pytorch.data.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/pytorch/data.py) extends the PyTorch [Dataset](https://pytorch.org/tutorials/beginner/basics/data_tutorial.html) class to work with DeepTrack2 `Image` objects.\n", |
|
339 | 326 | "cell_type": "markdown", |
340 | 327 | "metadata": {}, |
341 | 328 | "source": [ |
342 | | - "### 9.3. Deeplay\n", |
| 329 | + "### 8.3. Deeplay\n", |
343 | 330 | "\n", |
344 | 331 | "The init file in [deeplay/\\_\\_init__.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/deeplay/__init__.py) enables users to import Deeplay from DeepTrack2 with:\n", |
345 | 332 | "\n", |
|
352 | 339 | "cell_type": "markdown", |
353 | 340 | "metadata": {}, |
354 | 341 | "source": [ |
355 | | - "### 9.4. Other Modules\n", |
| 342 | + "### 8.4. Other Modules\n", |
356 | 343 | "\n", |
357 | 344 | "- [utils.py](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/utils.py) provides various utilities to streamline common operations, ensuring type and argument consistency with various check methods and safe call.\n", |
358 | 345 | "\n", |
|
363 | 350 | "cell_type": "markdown", |
364 | 351 | "metadata": {}, |
365 | 352 | "source": [ |
366 | | - "## 10. Unit testing\n", |
| 353 | + "## 9. Unit testing\n", |
367 | 354 | "\n", |
368 | 355 | "The unit testing scripts are found in the [tests](https://github.com/DeepTrackAI/DeepTrack2/blob/develop/deeptrack/tests/) directory, and follow the same structure as the [deeptrack](https://github.com/DeepTrackAI/DeepTrack2/tree/develop/deeptrack) directory with a test script for each module." |
369 | 356 | ] |
|
0 commit comments