Package iceprod :: Package core :: Module functions
[hide private]
[frames] | no frames]

Module functions

source code

Module containing common functions

copyright (c) 2009 the icecube collaboration


Version: $Revision: $

Date: $Date: $

Author: Juan Carlos Diaz Velez <juancarlos@icecube.wisc.edu>

Functions [hide private]
 
removedirs(path) source code
 
find(pathlist, pattern, filetype='file')
Return a list of files that match a given pattern
source code
 
gethostname() source code
 
gethostid()
Get MAC of firt network interface.
source code
 
findjava(searchpath='/usr/java:/usr/local/java') source code
 
md5sum(filename, buffersize=4096)
Return md5 digest of file
source code
 
get_choice(choices, prompt='') source code
 
myputenv(name, value)
function to set environment variables
source code
 
copy(src, dest)
function to copy a local file
source code
 
wget(url, dest='./', cache=False, options=[])
wrapper for downloading from multiple protocols
source code
 
isurl(url)
Determine if this is a supported protocol
source code
 
getmemusage() source code
 
hoerandel_fluxsum(emin, dslope)
function to caculate CORSIKA fluxsum FLUXSUM is the integral in energy of the primary cosmic ray between the minimum and the maximum set energy.
source code
 
sendMail(cfg, subject, msg) source code
 
tail(logpath, chars=75)
Read log4cplus to write output logging
source code
Variables [hide private]
  logger = logging.getLogger('functions')
  __package__ = 'iceprod.core'
Function Details [hide private]

find(pathlist, pattern, filetype='file')

source code 

Return a list of files that match a given pattern

Parameters:
  • pathlist - base directory to start search from
  • pattern - pattern to match

gethostid()

source code 

Get MAC of firt network interface. Todo: Mac OS (Windows???)

hoerandel_fluxsum(emin, dslope)

source code 

function to caculate CORSIKA fluxsum FLUXSUM is the integral in energy of the primary cosmic ray between the minimum and the maximum set energy.

The cosmic ray energy spectrum is from Hoerandel polygonato model [Astrop. Phys. Vol 19, Issue 2, Pages 193-312 (2003)]. The maximum energy is assumed to be much higher than the minimum energy (the maximum energy actually is not explicitly used in this calculation). Note : DSLOPE = 0 for unweighted CORSIKA sample and = -1 for weighted CORSIKA sample.

tail(logpath, chars=75)

source code 

Read log4cplus to write output logging

Parameters:
  • logpath - path to logfile
  • chars - number of characters end of file
Returns:
last n characters in file