-
Notifications
You must be signed in to change notification settings - Fork 57
Add feature method "get_backend" + unittesting #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
giovannivolpe
merged 1 commit into
gv/final/features
from
mg/features/features-get_backend
Jul 5, 2025
Merged
Add feature method "get_backend" + unittesting #360
giovannivolpe
merged 1 commit into
gv/final/features
from
mg/features/features-get_backend
Jul 5, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
giovannivolpe
added a commit
that referenced
this pull request
Jul 11, 2025
* Update features.py * Update features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Value Update test_features.py Update features.py Update test_features.py Update features.py * Update test_features.py * remove __gpu_compatible__ * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update aberrations.py * Update optics.py * Update image.py * Update holography.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update features.py * Update test_features.py * Update test_features.py * Update features.py * Update features.py * Update test_features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update _config.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update _config.py * Update features.py * Update features.py * Update features.py * Updated the documentation of features/__sub__ (#356) * updated documentation of features/__sub__ * minor changes * remove blank * Update documentation of features/__pow__ (#359) * Update documentation of features/__pow__ * Update * u --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Update features.py * Update features.py * Update features.py * Update features.py * added get_backend() as a feature method + unittesting to switch and get backend (#360) * Update features.py * Update test_features.py * Sequences restructuring (#345) * features: added to_sequential() * refactoring: SequentialProperty * typo in type hint * added dependency support for the set methods. * docs for to_sequential() * Update features.py * Update features.py * Add files via upload * edits Update sequences.py Update properties.py Update sequences.py Update sequences.py Update DTAT341_sequences.ipynb * Update test_properties.py * Update properties.py * u * Update properties.py * Update test_properties.py * Update properties.py * Update __init__.py * Update properties.py * Update properties.py * Update features.py * Update features.py * Update sequences.py * documentation and type hints * import Optional, Dict * missing comma... * current attributes * fix: typo in docstring. * documentation for sequences * typo * Update sequences.py * : * future import * documentation * DTAT306: Added SequentialProperty Example. (#350) * Added SequentialProperty example * typo * set length & index in seqprop __init__ * variable rename: sequence_step <- sequence_index * variable rename: sequence_step <- sequence_index * Update test_properties.py with new variable name * update documentation of SequentialProperty * variable name change: current and initialization * Update test_properties.py * Update features.py * Update sequences.py * sampling rule in init. * attributes * Update properties.py * Update features.py * Update properties.py * Update test_sequences.py * Revert "Update test_sequences.py" This reverts commit 503ea57. * Update properties.py * Update test_sequences.py * sequentialproperty docs * markov chain example in properties tutorial * Update seq_prop names * Update features.py * Update properties.py * Update properties.py * Update properties.py * Update properties.py * Update properties.py * Update properties.py * removed duplicate method * added example in docs * Updated tutorial with new names and examples * Update unit test * Update test_properties.py * Variable name changes * Update test_sequences.py * sequentialproperty docs * markov chain example in properties tutorial * new sequentialproperty attribute names * removed duplicate method * added example in docs * Updated tutorial with new names and examples * Update unit test * Update test_properties.py * docs: example of to_sequential() * create_action in __init__ * Added Previous() to SequentialProperty * Removed previous from backend.core * removed upsample from unit tests * Specific imports * u * sequences type hints * Updated SequentialProperty example * comma * Update __init__.py * Update features.py * Update DTAT306_properties.ipynb * Update DTAT306_properties.ipynb * Update DTAT341_sequences.ipynb * Update DTAT306_properties.ipynb * Update properties.py * Update test_properties.py * Update test_properties.py * Update features.py * Update features.py * Update optics.py * Update sequences.py * Update properties.py * Update test_sequences.py * Update features.py --------- Co-authored-by: Giovanni Volpe <giovanni.volpe@physics.gu.se> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update features.py * Update augmentations.py * Update types.py * Update utils.py * Update types.py * Update test_features.py * Update test_utils.py * Update DTAT387_types.ipynb * u * Update types.py * Update DTAT301_features.ipynb * Update DTAT387_types.ipynb * Update DTAT306_properties.ipynb * Update DTAT301_features.ipynb * Update DTAT306_properties.ipynb * Update DTAT341_sequences.ipynb * Update features.py * Added more documentation for features/__rsub__ (#363) * Added more documentation for features/__rsub__ * Update features.py --------- Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Added more documentation for features/__mul__ (#364) * Added more documentation for features/__mul__ * Update features.py --------- Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Added more documentation to features/__rmul__ (#365) * Update features.py * Polish documentationof feature/__pow__ (#366) * Update documentation of features/__pow__ * Update * u * Polish 1. remove >>> 2. remove blank * u * u * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Add documentation of features/__rpow__ (#367) * Add documentation of features/__rpow__ * u * u * u * u * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * polishing of sources initial polishing of sources * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * features: __truediv__ (#362) * implemented truediv and rtruediv * docstring clarification * removed white spaces and updated example * example update * Implemented feedback * Update features.py --------- Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update base.py * al/features/__rtruediv__ polishing (#369) * removed update(), added dynamic example for rtruediv * Update features.py * Update features.py --------- Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update features.py * features: __floordiv__ (#368) * added __floordiv__ * docs * Implemented feedback from Mirja * minor adjustments * updated example * Update features.py --------- Co-authored-by: mirjagranfors <mirja98granfors@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update features.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Update base.py * Features: ChannelFirst2d (#361) * documented channel2d func * unit tests: channelfirst2d * type hints * Update features.py * NDArray type hint * included Image type hint and xp usage * unit test checks for torch_available * Update features.py * u * docs * linebreak * docs * Update test_features.py * Update test_features.py * deprecation warning & tests * Added support for Image objects * Tests for image objects * docs * tests and axis compatibility * fix for repeated calls * revert changes to upscale * Implemented feedback --------- Co-authored-by: Giovanni Volpe <giovanni.volpe@physics.gu.se> * Update features.py * Create __init__.py * Create test_base.py * Update test_base.py * Update DTAT391A_sources.base.ipynb * Delete interface_v2.mp4 * Update DTAT391B_sources.folder.ipynb * Update folder.py * Update test_features.py * Update folder.py * Update folder.py * Update folder.py * Update folder.py * Create test_folder.py * Update test_folder.py * Update folder.py * Update folder.py * Update test_folder.py * Add docs of /features/__gt__ (#372) * add docs of feature/__gt__ * u * u code example * polish --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Add docs of /features/__rgt__ (#373) * Add docs of features/__rgt__ * fix typo * polish * fix error * u * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Add docs of /features/__lt__ (#374) * add docs of /features/__lt__ * u --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Add docs of /features/__rlt__ (#375) * add docs of /features/__rlt__ * u * u * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update features.py * Add docs of /features/__le__ (#376) * add docs 0f /featuers/__le__ * u --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Update features.py * Add docs of /features/__rle__ (#377) * add docs of /features/__rle__ * u * u * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Update features.py * Update features.py * add docs of /features/__ge__ (#378) Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Update features.py * Add docs of /features/__rge__ (#379) * add docs 0f /features/__rge__ * u * u * right , * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * Add docs of /features/__xor__ (#382) * add docs of /features/__xor__ * remove blank spaces --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Add docs of /features/__rand__ (#381) * add docs of /features/__rand__ * Update features.py --------- Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> * add docs of /features/__and__ (#380) Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> * Update features.py * Update __init__.py * Update rng.py * Update README.md * Update DTAT391B_sources.folder.ipynb * Update features.py * Update aberrations.py * Update mie.py * Update pint_definition.py * Update polynomials.py * Update units.py * Update radialcenter.py * Update features.py * Update data.py * Update statistics.py * Update scatterers.py * Update optics.py * Update noises.py * Update math.py * Update image.py * Update elementwise.py * Update holography.py --------- Co-authored-by: Mirja Granfors <95694095+mirjagranfors@users.noreply.github.com> Co-authored-by: Jiacheng Huang <31703396+JChonpca@users.noreply.github.com> Co-authored-by: Jiacheng Huang <chonpcaacpnohc@gmail.com> Co-authored-by: Alex <95913221+Pwhsky@users.noreply.github.com> Co-authored-by: mirjagranfors <mirja98granfors@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the method "get_backend" to Features, which returns the current backend of the feature.
Added a simple unit test that switches the backend of the feature between NumPy and PyTorch and verifies the change using "get_backend".