{"id":38684052,"url":"https://github.com/fusion-energy/openmc_source_plotter","last_synced_at":"2026-02-10T11:06:08.404Z","repository":{"id":44557867,"uuid":"431979282","full_name":"fusion-energy/openmc_source_plotter","owner":"fusion-energy","description":"A Python package for extracting and plotting the locations, directions, energy distributions of OpenMC source particles","archived":false,"fork":false,"pushed_at":"2024-05-10T21:36:38.000Z","size":157,"stargazers_count":12,"open_issues_count":6,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T18:58:59.264Z","etag":null,"topics":["coordinates","direction","energy","gamma","openmc","particle","plot","source"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fusion-energy.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":null,"dei":null}},"created_at":"2021-11-25T21:18:23.000Z","updated_at":"2025-09-30T18:25:54.000Z","dependencies_parsed_at":"2024-03-05T02:50:31.482Z","dependency_job_id":null,"html_url":"https://github.com/fusion-energy/openmc_source_plotter","commit_stats":{"total_commits":92,"total_committers":3,"mean_commits":"30.666666666666668","dds":"0.021739130434782594","last_synced_commit":"82656ef2d92249c08e5f46b4e68fcbec91dc328c"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/fusion-energy/openmc_source_plotter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fopenmc_source_plotter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fopenmc_source_plotter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fopenmc_source_plotter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fopenmc_source_plotter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fusion-energy","download_url":"https://codeload.github.com/fusion-energy/openmc_source_plotter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fopenmc_source_plotter/sbom","scorecard":{"id":414436,"data":{"date":"2025-08-11","repo":{"name":"github.com/fusion-energy/openmc_source_plotter","commit":"b755b12bc7753c9bf8de0fa72593dd279bcc1e83"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/black.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/black.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/black.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/black.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/black.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/black.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_with_install.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/ci_with_install.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci_with_install.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/ci_with_install.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/lint.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/openmc_source_plotter/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/black.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/black.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/ci_with_install.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/ci_with_install.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/ci_with_install.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/lint.yaml:23","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:31","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   8 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/black.yml:1","Warn: no topLevel permission defined: .github/workflows/ci_with_install.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yaml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:27:44.753Z","repository_id":44557867,"created_at":"2025-08-18T23:27:44.754Z","updated_at":"2025-08-18T23:27:44.754Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["coordinates","direction","energy","gamma","openmc","particle","plot","source"],"created_at":"2026-01-17T10:19:09.373Z","updated_at":"2026-01-17T10:19:09.519Z","avatar_url":"https://github.com/fusion-energy.png","language":"Python","readme":"[![CI with install](https://github.com/fusion-energy/openmc_source_plotter/actions/workflows/ci_with_install.yml/badge.svg?branch=main)](https://github.com/fusion-energy/openmc_source_plotter/actions/workflows/ci_with_install.yml)\n\n[![Upload Python Package](https://github.com/fusion-energy/openmc_source_plotter/actions/workflows/python-publish.yml/badge.svg)](https://github.com/fusion-energy/openmc_source_plotter/actions/workflows/python-publish.yml)\n\nA Python package for plotting the positions, directions or energy distributions of OpenMC sources.\n\n# Installation\n\nYou will need to have OpenMC version 0.14.0 or newer installed first.\n\n```bash\npip install openmc_source_plotter\n```\n\n# Features\n\nThe package provides three plotting functions that can plot source data from openmc objects.\n- ```plot_source_energy```\n- ```plot_source_position```\n- ```plot_source_direction```\n- ```plot_gamma_emission```\n \nAdditionally the package provides a convienient method of sampling particles\n- ```sample_initial_particles```\n\n\n# Example plots\n\nBelow are some basic examples, for more examples see the [examples folder](https://github.com/fusion-energy/openmc_source_plotter/tree/main/examples) for example usage scripts.\n\n\n## Plot of energy distribution of the source\n\n:link:[Link](https://github.com/fusion-energy/openmc_source_plotter/blob/main/examples/example_plot_source_energy.py) to example script.\n\n![openmc particle source energy plot](https://user-images.githubusercontent.com/8583900/143615694-a3578115-f8a2-4971-bf26-458177b4f113.png)\n\n## Plot of energy distribution of two sources\n\n:link:[Link](https://github.com/fusion-energy/openmc_source_plotter/blob/main/examples/example_plot_two_source_energies.py) to example script.\n\n![openmc particle source energy plot](https://user-images.githubusercontent.com/8583900/151376414-fb1555eb-61d1-4c82-bc4d-a05f62819c5d.png)\n\n## Plot direction of particles\n\n:link:[Link](https://github.com/fusion-energy/openmc_source_plotter/blob/main/examples/example_plot_source_direction.py) to example script.\n\n![openmc particle source direction plot](https://user-images.githubusercontent.com/8583900/143615706-3b3a8467-0233-42d6-a66c-d536c80a01d8.png)\n\n\n## Plot position of particles\n\n:link:[Link](https://github.com/fusion-energy/openmc_source_plotter/blob/main/examples/example_plot_source_position.py) to example script.\n\n\n![openmc particle source position plot](https://user-images.githubusercontent.com/8583900/179424915-bee56a87-6214-46ef-8625-92b8f4cbd1b3.png)\n\n## Plot labeled gamma lines from material\n\n:link:[Link](https://github.com/fusion-energy/openmc_source_plotter/blob/main/examples/example_gamma_spec_plot.py) to example script.\n\n![gamma spec with labels](examples/gamma_spec.png)\n\n\n## Extract particle objects\n\nA list of ```openmc.Particle``` objects can be obtained using ```model.sample_initial_particles()``` or ```openmc.SourceBase.sample_initial_particles()```\n\n```python\nimport openmc\nfrom openmc_source_plotter import sample_initial_particles\n\nsettings = openmc.Settings()\nsettings.particles = 1\nsettings.batches = 1\nmy_source = openmc.IndependentSource()\nmy_source.energy = openmc.stats.muir(e0=14080000.0, m_rat=5.0, kt=20000.0)\nsettings.source = my_source\nmaterials = openmc.Materials()\nsph = openmc.Sphere(r=100, boundary_type=\"vacuum\")\ncell = openmc.Cell(region=-sph)\ngeometry = openmc.Geometry([cell])\n\nmodel = openmc.Model(geometry, materials, settings)\n\nparticles = sample_initial_particles(this=model, n_samples=10)\n\nprint(particles)\n\u003e\u003e\u003e[\u003cSourceParticle: neutron at E=1.440285e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.397691e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.393681e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.470896e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.460563e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.420684e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.413932e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.412428e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.464779e+07 eV\u003e, \u003cSourceParticle: neutron at E=1.391648e+07 eV\u003e]\n\nprint(particles[0].E)\n\u003e\u003e\u003e1.440285e+07\n```\n\n## Related packages\n\nTokamak sources can also be plotted using the [openmc-plasma-source](https://github.com/fusion-energy/openmc-plasma-source) package\n\n![openmc_source_plotter_openmc-plasma-source_tokamak](https://user-images.githubusercontent.com/8583900/187487894-ba0bd025-46f2-4c7d-8b15-3d260aed47a0.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusion-energy%2Fopenmc_source_plotter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusion-energy%2Fopenmc_source_plotter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusion-energy%2Fopenmc_source_plotter/lists"}