SPHtoGrid
Package to map SPH particle data to a cartesian grid
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.2%) to scientific vocabulary
Repository
Package to map SPH particle data to a cartesian grid
Basic Info
Statistics
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
- Releases: 22
Metadata Files
README.md
| Documentation | Build Status | Licence |Citation |
|:-----------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:| :-----------------------------------------------------------------------------------------------:| :-----------------------------------------------------------------------------------------------:|
|
|
|
|
SPHtoGrid.jl
This package maps SPH quantities to a cartesian grid or a healpix sphere. It is based on Smac by Klaus Dolag und Smac2 by Julius Donnert.
Please see the Documentation for details.
Quickstart
You can map SPH data to a grid using the function sphMapping:
```julia function sphMapping(Pos::Array{<:Real}, HSML::Array{<:Real}, M::Array{<:Real}, Rho::Array{<:Real}, BinQuant::Array{<:Real}, Weights::Array{<:Real}=Rho; param::mappingParameters, kernel::AbstractSPHKernel, showprogress::Bool=true, parallel::Bool=false, reduceimage::Bool=true, returnbothmaps::Bool=false, dimensions::Int=2, calcmean::Bool=false, sort_z::Bool=false)
[...]
end ```
Define parameters for mapping
To map the data you need to define the mapping parameters via the mappingParameters object.
One way to set this up is by defining the limits of the map as
julia
par = mappingParameters(xlim=[xmin, xmax],
ylim=[ymin, ymax],
zlim=[zmin, zmax],
Npixels=200)
or give a center position and the size in each direction
julia
par = mappingParameters(center=[x0, y0, z0],
x_size=x_size,
y_size=y_size,
z_size=z_size,
Npixels=200)
Instead of Npixels you can also give the keyword argument pixelSideLength if you prefer to define your image that way.
Select Kernel
You also need to choose the kernel you used in the simulation. For this you need to install the package SPHKernels.jl. You can currently use these kernels:
julia
k = Cubic()
k = Quintic()
k = WendlandC4()
k = WendlandC6()
k = WendlandC8()
Please see the SPHKernels docs for more details.
Mapping
With the setup done you can now map (e.g.) density of your data using the function above as:
julia
image = sphMapping(x, hsml, m, rho, rho, param=par, kernel=k)
Replacing the second rho with any other quantity would map that quantity of course.
Please note: This function doesn't do any unit conversion for you, so you need to convert to the desired units beforehand. You can do this e.g. with GadgetUnits.jl.
Image now contains a 2D array with the binned data and can easily be plotted with imshow() from any plotting package of your choosing.
The keyword parallel = true causes the run to use multiple processors. For this you need to start julia with julia -p <N> where <N> is the number of processors in your machine, or define
```julia using Distributed addprocs(8)
now you can load SPHtoGrid
using SPHtoGrid ```
Conserved quantities
Particles are mapped to a grid while also conserving the particle volume, following the algorithm described in Dolag et. al. 2006.
Owner
- Name: Ludwig
- Login: LudwigBoess
- Kind: user
- Location: Munich
- Repositories: 20
- Profile: https://github.com/LudwigBoess
I'm a PhD student at the University Observatory Munich working on cosmological MHD simulations.
GitHub Events
Total
- Create event: 4
- Commit comment event: 2
- Release event: 1
- Delete event: 2
- Issue comment event: 3
- Push event: 7
- Pull request event: 3
Last Year
- Create event: 4
- Commit comment event: 2
- Release event: 1
- Delete event: 2
- Issue comment event: 3
- Push event: 7
- Pull request event: 3
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 304
- Total Committers: 6
- Avg Commits per committer: 50.667
- Development Distribution Score (DDS): 0.405
Top Committers
| Name | Commits | |
|---|---|---|
| LudwigBoess | l****s@u****e | 181 |
| Ludwig Boess | d****g@c****e | 79 |
| Ludwig | 3****s@u****m | 17 |
| Ludwig Böss | l****s@o****e | 11 |
| github-actions[bot] | 4****]@u****m | 11 |
| Julia Package Butler | 5 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 10
- Total pull requests: 122
- Average time to close issues: 6 months
- Average time to close pull requests: 14 days
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 4.1
- Average comments per pull request: 0.51
- Merged pull requests: 91
- Bot issues: 0
- Bot pull requests: 42
Past Year
- Issues: 0
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 6 days
- Issue authors: 0
- Pull request authors: 3
- Average comments per issue: 0
- Average comments per pull request: 0.57
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- LudwigBoess (9)
- JuliaTagBot (1)
Pull Request Authors
- LudwigBoess (81)
- github-actions[bot] (39)
- lucasvalenzuela (4)
- dependabot[bot] (2)
- stevengj (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 4 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 22
juliahub.com: SPHtoGrid
Package to map SPH particle data to a cartesian grid
- Documentation: https://docs.juliahub.com/General/SPHtoGrid/stable/
- License: GPL-3.0
-
Latest release: 0.5.2
published over 1 year ago
Rankings
Dependencies
- actions/checkout v2 composite
- davidanthoff/julia-pkgbutler releases/v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite
- actions/checkout v2 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-docdeploy releases/v1 composite
- JuliaRegistries/TagBot v1 composite