-
Notifications
You must be signed in to change notification settings - Fork 168
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
feat: Add a tool for writing B-fields to disk in CSV format #1470
feat: Add a tool for writing B-fields to disk in CSV format #1470
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1470 +/- ##
==========================================
+ Coverage 48.46% 48.54% +0.07%
==========================================
Files 384 381 -3
Lines 21071 20785 -286
Branches 9702 9536 -166
==========================================
- Hits 10213 10090 -123
+ Misses 4130 4112 -18
+ Partials 6728 6583 -145
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
looks great 👍
Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvBFieldWriter.hpp
Outdated
Show resolved
Hide resolved
Is this good to go? There are still conversations unresolved. |
I think we're waiting for some comments from @timadye. |
Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvBFieldWriter.hpp
Outdated
Show resolved
Hide resolved
Okay, unless Tim has any comments on the outstanding issue I think this is good to go from my side. |
Sorry, I was away. I'll take a look today. |
Are you planning to include a CSV reading tool? Apart from providing another good format, that would be useful to test this by writing and reading back. |
Does this have a different interface compared to Does this difference follow through to the Python API? It would also be nice to have a Python example and/or test to be sure it works. Sorry for all the comments. |
Hi Tim, I do have some changes in the pipeline to the Python B-field writing examples, but I opted to keep them separate from this PR for the time being. I like the idea of having a CSV reader, and I can work on implementing one. Regarding the coordinate type enum, I agree that it might be useful to merge them, but there is also something to be said for embedding the capabilities of each writer into the class itself. |
@timadye @stephenswat can you advise if we can merge this? |
I still had one issue outstanding, here. I hope @stephenswat can check that. The definitive check would be to read the ATLAS B-field, write with this PR, and check the files have the same binning. If you are not able to do that, I can give it a go. |
4c35fbd
to
8e55fbc
Compare
I have incorporated Tim's patches, and marked him appropriately as a co-author of the commits. |
this conflicts now with #1510 happy to re-approve after the conflict is resolved |
Thanks @stephenswat! This looks good to me. I guess you will make the other changes in a separate PR, namely:
We discussed this in the Tuesday dev meeting and were happy to go ahead with this PR as-is. I could still test the output is correct on the ATLAS B-field. Should I do that now, or wait for you to resolve the conflict with #1510? |
Hi @stephenswat - can you resolve the conflict here? Then we should be able to get this in. |
New Acts examples tool that dumps a given B-field to CSV format, to complement the existing dumpers for Root formats. Co-authored-by: Tim Adye <[email protected]>
This allows us to conveniently use the new CSV B-field writer and dump, say, a solenoidal B-field for testing.
8e55fbc
to
c9d82cc
Compare
Conflict resolved. |
Let me test this now, and then I hope we can merge this sucker. |
📊 Physics performance monitoring for c9d82cc
Full report Vertexing ❌❌ Vertexing vs. mu ❌ IVF seeded ❌ IVF truth_smeared ❌ IVF truth_estimated CKF ❌❌ CKF seeded ❌ CKF truth_smeared ❌ CKF truth_estimated Ambiguity resolution ❌❌ seeded Truth tracking ❌❌ Truth tracking |
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.
I tested with the ATLAS B-field map, and it looks the same as the root input.
This PR adds a new example tool,
CsvBFieldWriter
, that dumps a B-field to disk in CSV format. The tool supports both grid-based and non-grid-based vector fields, it supports Cartesian and symmetrical cylindrical coordinates, and it supports user-specified ranges and bin counts.Comes with free Python bindings.