mirror of
https://github.com/pim-n/pg-rad
synced 2026-04-24 21:18:10 +02:00
rename test to example landscape. Fixes #51
This commit is contained in:
@ -29,9 +29,9 @@ def main():
|
|||||||
help="Build from a config file."
|
help="Build from a config file."
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--test",
|
"--example",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Load and run the test landscape."
|
help="Load and run an example landscape."
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--loglevel",
|
"--loglevel",
|
||||||
@ -48,9 +48,9 @@ def main():
|
|||||||
setup_logger(args.loglevel)
|
setup_logger(args.loglevel)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
if args.test:
|
if args.example:
|
||||||
test_yaml = """
|
example_yaml = """
|
||||||
name: Test landscape
|
name: Example landscape
|
||||||
speed: 8.33
|
speed: 8.33
|
||||||
acquisition_time: 1
|
acquisition_time: 1
|
||||||
|
|
||||||
@ -66,14 +66,14 @@ def main():
|
|||||||
sources:
|
sources:
|
||||||
test_source:
|
test_source:
|
||||||
activity_MBq: 100
|
activity_MBq: 100
|
||||||
position: [250, 100, 0]
|
position: [250, 30, 0]
|
||||||
isotope: Cs137
|
isotope: Cs137
|
||||||
gamma_energy_keV: 661
|
gamma_energy_keV: 661
|
||||||
|
|
||||||
detector: LU_NaI_3inch
|
detector: LU_NaI_3inch
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cp = ConfigParser(test_yaml).parse()
|
cp = ConfigParser(example_yaml).parse()
|
||||||
landscape = LandscapeDirector.build_from_config(cp)
|
landscape = LandscapeDirector.build_from_config(cp)
|
||||||
output = SimulationEngine(
|
output = SimulationEngine(
|
||||||
landscape=landscape,
|
landscape=landscape,
|
||||||
|
|||||||
Reference in New Issue
Block a user