{"id":19327760,"url":"https://github.com/favreau/nuonmodelvisualizer","last_synced_at":"2025-07-16T17:32:22.344Z","repository":{"id":231149748,"uuid":"769171751","full_name":"favreau/NuonModelVisualizer","owner":"favreau","description":"Visualizer for the Particles Composition and Interactions Using the Nuon Model publication","archived":false,"fork":false,"pushed_at":"2024-04-04T19:17:50.000Z","size":17810,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T06:33:22.904Z","etag":null,"topics":["cern","cern-root","magnetic-fields","particle-physics","physics","scientific-visualization","visualization"],"latest_commit_sha":null,"homepage":"https://www.scirp.org/journal/paperinformation?paperid=124395","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/favreau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null}},"created_at":"2024-03-08T13:46:09.000Z","updated_at":"2024-04-19T06:27:17.000Z","dependencies_parsed_at":"2024-04-04T20:42:57.458Z","dependency_job_id":null,"html_url":"https://github.com/favreau/NuonModelVisualizer","commit_stats":null,"previous_names":["favreau/nuonmodelvisualizer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/favreau/NuonModelVisualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favreau%2FNuonModelVisualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favreau%2FNuonModelVisualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favreau%2FNuonModelVisualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favreau%2FNuonModelVisualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/favreau","download_url":"https://codeload.github.com/favreau/NuonModelVisualizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favreau%2FNuonModelVisualizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265527547,"owners_count":23782480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cern","cern-root","magnetic-fields","particle-physics","physics","scientific-visualization","visualization"],"created_at":"2024-11-10T02:18:40.498Z","updated_at":"2025-07-16T17:32:22.297Z","avatar_url":"https://github.com/favreau.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuon Model Visualizer\nVisualizer for the [Particles Composition and Interactions Using the Nuon Model](https://www.scirp.org/journal/paperinformation?paperid=124395) publication\n\n![___](./doc/images/NuonModelVisualizerBanner.png)\n\n## Introduction\n\nThis collaborative project emerged from an informal interaction with [Rene Brun](https://root.cern/about/project_founders/#Ren%C3%A9%20Brun), Senior physicist and CERN honorary member, following the publication of his groundbreaking work, [Particles Composition and Interactions Using the Nuon Model](https://www.scirp.org/journal/paperinformation?paperid=124395). Our collaboration ignited after I delivered a [presentation at CERN](https://indico.cern.ch/event/1253917/), delving into the realms of visualization and exploration within the EPFL Blue Brain Project. Specifically, I showcased the innovative capabilities of the [Blue Brain BioExplorer](https://github.com/BlueBrain/BioExplorer).\n\nThe Nuon Model Visualization, a pivotal aspect of our collaboration, capitalizes on BioExplorer custom graphical objects to compute magnetic fields derived from a set of 3D points and charges. This implementation, tailored for both CPU and GPU, heralds a paradigm shift in visualizing high-energy particle collisions, bringing us closer to a tangible representation of reality.\n\nTo bring this vision to life, the Nuon Model Visualizer seamlessly integrates with [ROOT](https://root.cern/) through its Python interface. By extracting collision data from ROOT, the visualizer accurately positions particles and dynamically renders magnetic interactions within the event.\n\nOne of the key enablers of our rapid progress was the modular architecture of BioExplorer. This framework facilitated efficient development, allowing us to achieve significant milestones in a matter of days.\n\nWhile our journey is ongoing, I'm thrilled to unveil the first glimpses of this innovative approach to exploring the intricacies of high-energy physics. Stay tuned for further developments as we continue to push the boundaries of scientific visualization and exploration.\n\n![___](./doc/images/event_00000.gif)\n\nFollow the [rabbit hole](https://particle-physics.netlify.app/) if you want to see more!\n\n## Deployment from source\n\nIn your favorite Python virtual environment, run:\n```bash\npip install .\n```\n\n## Deployment using Docker\n\nThe Nuon Model Visualizer and the Blue Brain BioExplorer binaries are publicly available as docker images. The Blue Brain BioExplorer is designed to run in distributed mode, and is composed of 3 modules: A [server](https://hub.docker.com/r/bluebrain/bioexplorer), a [python SDK](https://hub.docker.com/r/bluebrain/bioexplorer-python-sdk), and a [web user interface](https://hub.docker.com/r/bluebrain/bioexplorer-ui). This means that there are 3 docker images to be downloaded on run. Those images can of course run on different machines.\n\n**Note:** The Nuon Model Visualizer, as well as the Blue Brain BioExplorer are NOT a web application. They use web technologies for the user interface but run as a single session system that requires one back-end instance per user. There is no limitation in the number of user interface instances that can connect to the back-end, but they will all be sharing the same session.\n\nIn this example, we will expose the server on port 5000, the python SDK jupyter notebooks on port 5001, and the user interface on port 5002. One is free to change those ports at will.\n\n### Server\n\n```bash\ndocker run -ti --rm -p 5000:8200 bluebrain/bioexplorer\n```\n\n### Python SDK\n\n```bash\ndocker run -ti --rm -p 5001:8888 favreau/nuon-model-visualizer\n```\n\nNote that a local folder can be specified to access personal notebooks:\n\n```bash\ndocker run -ti --rm -p 5001:8888 -v \u003cmy_notebooks_folder\u003e:/app/NuonModelVisualizer/notebooks favreau/nuon-model-visualizer\n```\n\n### Web User Interface\n\n```bash\ndocker run -ti --rm -p 5002:8080 bluebrain/bioexplorer-ui\n```\n\n## Example\n\n```python\nfrom bioexplorer import BioExplorer\nfrom nuon_model_visualizer import NuonModelVisualizer\n\n# Connect to the BioExplorer server\nbe_url = 'localhost:5000'\nbe = BioExplorer(be_url)\ncore = be.core_api()\n\n# Initialize Nuon Model Visualizer from ROOT file\nnmv = NuonModelVisualizer(\n    bio_explorer=be,\n    root_proton_file='keep_findall_64004.root',\n    root_collision_file='collide_298792_events.root')\n\n# Set magnetic field parameters\nnmv.set_field_parameters(\n    cutoff_distance=50, sampling_rate=0.25,\n    gradient_shading=False, gradient_offset=0.01, epsilon=1.5, \n)\n\n# Select event ID\nevent_id = 0\n\n# Render event for a given timestamp\nnmv.render_event(\n    event_id=event_id, voxel_size=0.1,\n    magnetic=True, colormap='nuons.1dt', value_range=[-0.005, 0.1]\n)\n```\n\nThe example [notebook](./notebooks/events_collide.ipynb) demonstrates how to send the ROOT data to the BioExplorer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavreau%2Fnuonmodelvisualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffavreau%2Fnuonmodelvisualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavreau%2Fnuonmodelvisualizer/lists"}