-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from lmh91/docs
Update Documentation
- Loading branch information
Showing
30 changed files
with
264 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ build/ | |
site/ | ||
src/ssd_tutorial.ipynb | ||
src/ssd_tutorial.jl | ||
src/tutorial.md | ||
src/tutorial.md | ||
src/man/primitives.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# ## Volume Primitives | ||
|
||
using SolidStateDetectors | ||
import SolidStateDetectors.ConstructiveSolidGeometry as CSG | ||
using SolidStateDetectors.ConstructiveSolidGeometry: ClosedPrimitive | ||
using SolidStateDetectors.ConstructiveSolidGeometry: Box | ||
using Plots | ||
T = Float64; | ||
|
||
# ### List of YAML example configuration files for Primitives | ||
# Under `SolidStateDetectors.jl/examples/example_primitive_files` there | ||
# are some examples how to define the different primitives | ||
# via the YAML format: | ||
|
||
path_to_example_primitives_config_files = joinpath(dirname(dirname(pathof(SolidStateDetectors))), "examples", "example_primitive_files") | ||
example_primitives_config_filenames = readdir(path_to_example_primitives_config_files) | ||
for fn in example_primitives_config_filenames | ||
println(fn) | ||
end | ||
|
||
# ### Box | ||
cfn = joinpath(path_to_example_primitives_config_files, "Box.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
box = CSG.Geometry(T, cfn) | ||
plot(box) | ||
|
||
# ### Cone: | ||
# #### Tube | ||
cfn = joinpath(path_to_example_primitives_config_files, "Tube.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
cone = CSG.Geometry(T, cfn) | ||
plot(cone) | ||
|
||
# #### VaryingTube | ||
cfn = joinpath(path_to_example_primitives_config_files, "Cone.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
cone = CSG.Geometry(T, cfn) | ||
plot(cone) | ||
|
||
# ### Ellipsoid | ||
# #### Sphere | ||
cfn = joinpath(path_to_example_primitives_config_files, "Sphere.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
ellipsoid = CSG.Geometry(T, cfn) | ||
plot(ellipsoid) | ||
|
||
# ### Torus | ||
cfn = joinpath(path_to_example_primitives_config_files, "Torus.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
torus = CSG.Geometry(T, cfn) | ||
plot(torus, zlims = [-6,6], camera = (40, 55)) | ||
|
||
# ### Prism | ||
# #### Hexagonal Prism | ||
cfn = joinpath(path_to_example_primitives_config_files, "HexagonalPrism.yaml") | ||
print(open(f -> read(f, String), cfn)) | ||
|
||
# Load the primitive from the configuration file via `CSG.Geometry` | ||
prism = CSG.Geometry(T, cfn) | ||
plot(prism) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.