fiedl / hole-ice-scripts Goto Github PK
View Code? Open in Web Editor NEWExample scripts for the hole-ice extension of clsim in the IceCube simulation framework.
Example scripts for the hole-ice extension of clsim in the IceCube simulation framework.
When running the propagation script in zeuthen (#9), the random-number generator is not found.
[2022-09-09 17:24:37] fiedl@kepler00 ~/icecube/hole-ice-scripts
▶ ~/icecube/icetray-build/env-shell.sh
▶ scripts/generate_photons.py
Traceback (most recent call last):
File "scripts/generate_photons.py", line 63, in <module>
main()
File "scripts/generate_photons.py", line 16, in main
random_number_generator = phys_services.I3SPRNGRandomService(
AttributeError: module 'icecube.phys_services' has no attribute 'I3SPRNGRandomService'
Originally posted by @fiedl in #9 (comment)
There is an icetray docker image.
https://hub.docker.com/r/icecube/icetray
https://github.com/wipacrepo/docker-icecube-icetray
Would this work here?
https://github.com/icecube/icetray has a lot of trailing whitespace.
Disable "strip whitespace on save" bundle in textmate
Remove whitespace from git stage
https://stackoverflow.com/a/45486981/2066546
[2022-09-10 22:25:38] fiedl@fiedl-mbp ~/icecube/icetray fiedl/hole-ice-2022 ⚡ 79f9588ad
▶ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -
▶ git checkout .
I'm trying to build and run the icetray framework on an M1 Mac.
Framework Repository: https://github.com/icecube/icetray
Framework Documentation: https://docs.icecube.aq/icetray/main/
macOS Guide:
https://github.com/icecube/icetray/blob/main/cmake/resources/docs/supported_platforms/osx.rst
https://docs.icecube.aq/icetray/main/projects/cmake/supported_platforms/osx.html
mutagen
After building icetray in zeuthen (#9), run the propagation script there:
[2022-09-09 17:50:55] fiedl@kepler00 ~/icecube/hole-ice-scripts
▶ ~/icecube/icetray-build/env-shell.sh
▶ scripts/generate_photons.py
▶ scripts/propagate_photons.py
FATAL (clsim): No matching OpenCL devices. Devices: Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz Selection: UseCPUs=False, UseGPUs=True, UseOnlyDeviceNumber=None.
Originally posted by @fiedl in #4 (comment)
In #6 (comment) sieht es so aus, als werden die Photonen in verschiedene Richtungen emittiert, obwohl ich einen schmalen Öffnungswinkel von 0.001 Grad angegeben habe.
[2022-09-07 23:20:27] fiedl@fiedl-mbp ~/icecube/hole-ice-scripts master ⚡ 75cd293
▶ docker-compose run icetray scripts/generate_photons.py
▶ docker-compose run icetray scripts/propagate_photons.py
[2022-09-07 23:30:27] fiedl@fiedl-mbp ~/icecube/hole-ice-scripts master ⚡ 75cd293
▶ source ~/py3/bin/activate && ~/icecube/icetray-build/env-shell.sh
▶ steamshovel data/propagated_photons.i3
I have prepared minimal scripts to generate and propagate photons with clsim.
However, no photons are recorded.
[2022-08-10 11:16:50] fiedl@fiedl-mbp ~/icecube
▶ git clone [email protected]:fiedl/hole-ice-scripts.git
[2022-08-11 19:15:43] fiedl@fiedl-mbp ~/icecube/hole-ice-scripts master ⚡ 1971bc1
▶ docker-compose run icetray scripts/generate_photons.py
▶ docker-compose run icetray scripts/propagate_photons.py
number of PhotonSeriesMap entries: 0
This is the clsim configuration from scripts/propagate_photons.py
:
tray.Add(
clsim.I3CLSimMakePhotons,
GCDFile = DETECTOR_GEOMETRY_FILE,
UseCPUs = True,
UseGPUs = False,
UseI3PropagatorService = False,
OutputMCTreeName = None,
PhotonSeriesName = 'PhotonSeriesMap',
MCPESeriesName = None,
RandomService = tray.context['I3RandomService'],
IceModelLocation = os.path.expandvars('$I3_SRC/ice-models/resources/models/ICEMODEL/spice_bfr-v2'),
UseCascadeExtension = False,
DisableTilt = False,
DoNotParallelize = True,
DOMOversizeFactor = 1.0,
DOMEfficiency = 1.0,
HoleIceParameterization = os.path.expandvars('$I3_SRC/ice-models/resources/models/ANGSENS/angsens/as.nominal'), # no hole-ice approximation
UnWeightedPhotons = True,
UnWeightedPhotonsScalingFactor = 1.0,
StopDetectedPhotons = False,
SaveAllPhotons = True,
SaveAllPhotonsPrescale = 1.0,
PhotonHistoryEntries = 10
)
A minimal showcase would be:
Later, this can be extended to incorporate hole ice.
The first step would be to generate the photons to propagate.
I3CLSimMediumCylinder
➝ https://github.com/icecube/icetray/commit/3dc1b2c14394ee44d0497ab92db5c5aad4e431a0I3CLSimHoleIceCylinder < I3CLSimMediumCylinder
I3CLSimCableCylinder < I3CLSimMediumCylinder
How to reproduce:
scripts/propagate_photons.py
locally:[2022-09-08 00:12:29] fiedl@fiedl-mbp ~/icecube/hole-ice-scripts master ⚡ f823690
▶ source ~/py3/bin/activate && ~/icecube/icetray-build/env-shell.sh
▶ scripts/generate_photons.py
▶ scripts/propagate_photons.py
Traceback (most recent call last):
File "/Users/fiedl/icecube/hole-ice-scripts/scripts/propagate_photons.py", line 92, in <module>
main()
File "/Users/fiedl/icecube/hole-ice-scripts/scripts/propagate_photons.py", line 28, in main
tray.Add(
File "/Users/fiedl/icecube/icetray-build/lib/I3Tray.py", line 107, in Add
return method(_type, _name, **kwargs)
File "/Users/fiedl/icecube/icetray-build/lib/I3Tray.py", line 224, in AddSegment
return _segment(self, _name, **kwargs)
File "/Users/fiedl/icecube/icetray-build/lib/icecube/clsim/traysegments/I3CLSimMakePhotons.py", line 302, in I3CLSimMakePhotons
converters = setupPropagators(RandomService, clsimParams,
File "/Users/fiedl/icecube/icetray-build/lib/icecube/clsim/traysegments/common.py", line 430, in setupPropagators
openCLDevices = configureOpenCLDevices(
File "/Users/fiedl/icecube/icetray-build/lib/icecube/clsim/traysegments/common.py", line 13, in configureOpenCLDevices
from icecube.clsim import I3CLSimOpenCLDevice
ImportError: cannot import name 'I3CLSimOpenCLDevice' from 'icecube.clsim' (/Users/fiedl/icecube/icetray-build/lib/icecube/clsim/__init__.py)
This script does work when running in docker (#2), but fails when running locally (#1).
To connect to the zeuthen gpu machine for debugging requires
ssh warp-zeuthen.desy.de
ssh ice-wgs-gpu
How can I do this without entering my password? The server does not accept my ssh key.
I'm trying to propagate some photons with clsim and visualize their path with steamshovel.
clsim does provide example scripts for that. However, they do fail when run against acurrent icetray build.
[2022-08-10 14:42:06] fiedl@faustaff-010-020-007-137 ~/icecube/icetray-build
▶ ./env-shell.sh
[2022-08-10 14:43:25] fiedl@faustaff-010-020-007-137 ~/icecube/icetray/clsim/resources/scripts/photonPaths main 6ce97c3a7
▶ ./generateTestFlashes.py --gcd ~/icecube/gcd/GeoCalibDetectorStatus_IC86.55697_corrected_V2.i3.gz
▶ ./applyCLSim.py -i test_flashes.i3
using input file test_flashes.i3
output dir is
output file is test_flashes_clsim.i3
storing I3Photons
FATAL (icetray): Module/service "I3XMLSummaryServiceFactory" not registered with I3_MODULE() or I3_SERVICE_FACTORY() (I3Factory.h:91 in FactoryFn I3Factory<I3ServiceFactory, boost::function<boost::shared_ptr<I3ServiceFactory> (const I3Context &)>>::Create(std::string) const [Product = I3ServiceFactory, FactoryFn = boost::function<boost::shared_ptr<I3ServiceFactory> (const I3Context &)>])
Traceback (most recent call last):
File "/Users/fiedl/icecube/icetray/clsim/resources/scripts/photonPaths/./applyCLSim.py", line 114, in <module>
tray.AddService("I3XMLSummaryServiceFactory","summary",
File "/Users/fiedl/icecube/icetray-build/lib/I3Tray.py", line 176, in AddService
super(I3Tray, self).AddService(_type, _name)
RuntimeError: Module/service "I3XMLSummaryServiceFactory" not registered with I3_MODULE() or I3_SERVICE_FACTORY() (in FactoryFn I3Factory<I3ServiceFactory, boost::function<boost::shared_ptr<I3ServiceFactory> (const I3Context &)>>::Create(std::string) const [Product = I3ServiceFactory, FactoryFn = boost::function<boost::shared_ptr<I3ServiceFactory> (const I3Context &)>])
Maybe, the example scripts are just outdated.
In order to visualize the photon paths, I'm trying to display them in steamshovel.
I'm trying to get the hole-ice code from 2018 working with current icetray.
The hole-ice code from 2018 consists of:
As a first step, fetch the kernel code from 2018 and try to apply it to current clsim.
The clsim hole-ice code used in the 2018 thesis The Effect of Hole Ice on the Propagation and Detection of Light in IceCube (arxiv | pdf | latex | github) can be found in this fork of clsim: https://github.com/fiedl/clsim
To have a look at the git diff
between the standard clsim of that time and the hole-ice clsim, open the diff on github:
Or show that diff locally:
[2022-09-10 15:17:33] fiedl@fiedl-mbp ~/icecube
▶ git clone [email protected]:fiedl/clsim.git
[2022-09-10 15:17:33] fiedl@fiedl-mbp ~/icecube/clsim sf/hole-ice-2018 32215a5
▶ git diff --ignore-all-space 3703cb2a..sf/hole-ice-2018
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.