mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
checking for periodicity now pushed to function
This commit is contained in:
parent
c088a87809
commit
0cc5529b08
2 changed files with 72 additions and 30 deletions
|
@ -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('.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue