-
Notifications
You must be signed in to change notification settings - Fork 7
Incorporate virtual fit results into Session (#179) #212
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
Incorporate virtual fit results into Session (#179) #212
Conversation
7d74ce1 to
094c651
Compare
|
@arhowe00 This PR is coming in parallel to OpenwaterHealth/SlicerOpenLIFU#179 which probably @sadhana-r will end up reviewing. But this one should be merged first and is completed, so you can start reviewing it. Besides the new virtual fit result format, I lumped in a script I've been using from time to time to make sure we haven't broken the database. LMK if you have any questions or if you want to have a quick meeting to clarify what's going on with virtual fitting and all that. TY! |
|
Great job, I had just a few minor comments and questions. Also suggested adding checking the users table in your script. |
c890f29 to
8e18343
Compare
|
(The rebase required merging the dvc data changes in main -- it was just the stuff you added in #214 -- should be good now) |
| [1.1, 0, 0, 0], | ||
| [0, 1.2, 0, 0], | ||
| [0, 0, 1.3, 0], | ||
| [0, 0.05, 0, 1.4] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious -- why did you make the 4th row of this matrix like this, just to test, or is this an extra scaling transformation across all dimensions? I assume you apply this like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, you would apply it like that. I think typically you would want to make the last row [0,0,0,1] which is probably what you were expecting. In this case I wasn't thinking anything fancy... I just want to stick any old 4x4 array in here and have tests that the array data is handled correctly -- not caring about the interpretation as an "affine transform".
|
Note to self: Do not merge yet please! I want to finish off OpenwaterHealth/SlicerOpenLIFU#179 first since this is a breaking change for SlicerOpenLIFU, and I don't want to cause trouble for other work you guys are doing on SlicerOpenLIFU |
|
@arhowe00 I found a small issue and just pushed a fix, the commit message should explain it. Letting you know since you had already approved. Thanks! |
Virtual fit results take the form of a dictionary mapping target IDs to pairs `(approval, transforms)`, where: `approval` is a boolean indicating whether the virtual fit for that target has been approved, and `transforms` is a list of transducer transforms resulting from the virtual fit for that target. The idea is that the list of transforms would be ordered from best to worst, and should of course contain at least one transform.
This is a follow up to #179 updating all sessions in the dvc data to match the new format for virtual fit results
This is part of the ongoing example data curation, Issue #121 The script is pretty useful for catching little discrepancies between the DVC data and the openlifu library, so I am adding it under scripts/
Co-authored-by: Andrew Howe <arhowe00@gmail.com>
Virtual fit transforms were being read in as lists and not properly converted to arrays. Fixed, and added a test that would have caught the issue.
9914dbc to
324603e
Compare
Closes #179
Session.virtual_fit_resultsVirtual fit results take the form of a dictionary mapping target IDs
to pairs
(approval, transforms), where:approvalis a boolean indicating whether the virtual fit for that target has been approved, andtransformsis a list of transducer transforms resulting from the virtual fit for that target.The idea is that the list of transforms would be ordered from best to worst, and should of course
contain at least one transform.
standardize_databaseThis is a utility script for developers to read in and write back out the dvc database. It is useful for standardizing the format of the example dvc data, and also for checking that the database mostly still works.
I have been using this on my own to help catch little discrepancies that pop up between the example data and the openlifu library -- I figured it's probably good to version control it here under a
scripts/folder since it needs to evolve alongside the library.To use this script, install openlifu to a python environment and then run the script providing the database folder as an argument:
Parallel SlicerOpenLIFU PR
(todo)
Remaining to-do