Skip to content
Snippets Groups Projects
Commit c53c8530 authored by Philipp Oleynik's avatar Philipp Oleynik
Browse files

local path function added

parent 075dd062
No related branches found
No related tags found
No related merge requests found
import numpy as np
import socket
def mk_energy_grid(*, channels_per_decade=256, min_energy=0.01, max_energy=1.0E5):
......@@ -29,3 +30,23 @@ def mk_energy_grid(*, channels_per_decade=256, min_energy=0.01, max_energy=1.0E5
energy_bin_widths[i] = energy_bin_high - energy_bin_low
return number_of_energy_steps, energy_midpoints, energy_upper_cuts, energy_bin_widths
def get_basepath():
"""
Returns the base path for the Geant4 data using the local hostname.
:return: path to the Geant4 data tree
"""
path = ""
local_host = socket.gethostname()
if local_host.find('spicule') >= 0:
path = "/home/phil/Work/Calibration/"
elif local_host.find('philyra') >= 0:
path = "/home/phil/Work/Calibration/"
elif local_host.find('pleione') >= 0:
path = "/home/pholey/Geant4/"
elif local_host.find('dione') >= 0:
path = "/home/pholey/Geant4/"
elif local_host.find('dione') >= 0:
path = "/home/pholey/Geant4/"
return path
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment