def assignFiles(self,files): """from list of files work out which are which and assign Slice Also basic checking that all correspond to same redshift """ #default to no file present fdensity='' fxH='' fvx='' fvy='' fvz='' fdeltaT='' for file in files: param_dict=boxio.parse_filename(file) if (param_dict['type'] =='density'): fdensity=file elif (param_dict['type'] =='xh'): fxH=file elif (param_dict['type'] =='vx'): fvx=file elif (param_dict['type'] =='vy'): fvy=file elif (param_dict['type'] =='vz'): fvz=file elif (param_dict['type'] =='deltaT'): fdeltaT=file self.setFiles(fdensity,fxH,fvx,fvy,fvz,fdeltaT) return
def assignFiles(self, files): """from list of files work out which are which and assign Slice Also basic checking that all correspond to same redshift """ #default to no file present fdensity = '' fxH = '' fvx = '' fvy = '' fvz = '' fdeltaT = '' for file in files: param_dict = boxio.parse_filename(file) if (param_dict['type'] == 'density'): fdensity = file elif (param_dict['type'] == 'xh'): fxH = file elif (param_dict['type'] == 'vx'): fvx = file elif (param_dict['type'] == 'vy'): fvy = file elif (param_dict['type'] == 'vz'): fvz = file elif (param_dict['type'] == 'deltaT'): fdeltaT = file self.setFiles(fdensity, fxH, fvx, fvy, fvz, fdeltaT) return
def getRedshiftList(filenames): """ from Run filenames get the redshifts""" redshifts=[] for filename in filenames: param_dict=boxio.parse_filename(filename) redshifts.append(param_dict['z']) return redshifts
def getRedshiftList(filenames): """ from Run filenames get the redshifts""" redshifts = [] for filename in filenames: param_dict = boxio.parse_filename(filename) redshifts.append(param_dict['z']) return redshifts