checking for periodicity now pushed to function

This commit is contained in:
P.M. Sutter 2013-04-25 18:13:24 -05:00
parent c088a87809
commit 0cc5529b08
2 changed files with 72 additions and 30 deletions

View file

@ -20,6 +20,7 @@
# classes and routines used to support scripts
import os
from numpy import abs
LIGHT_SPEED = 299792.458
@ -188,6 +189,15 @@ def getStackSuffix(zMin, zMax, rMin, rMax, dataPortion, customLine=""):
return "z"+str(zMin)+"-"+str(zMax)+"_"+str(rMin)+"-"+str(rMax)+\
"Mpc"+customLine+"_"+dataPortion
def getPeriodic(sample):
periodicLine = ""
if sample.dataType != "observation":
if sample.numSubvolumes == 1: periodicLine += "xy"
if abs(sample.zBoundaryMpc[1] - sample.zBoundaryMpc[0] - \
sample.boxLen) <= 1.e-1:
periodicLine += "z"
return periodicLine
def my_import(name):
mod = __import__(name)
components = name.split('.')