(header, xpidIx) = ( ( 'i_mcl', 'i_fcl', 'i_mrs', 'i_frs', 'i_atc', 'i_rac', 'i_ref', ' i_ren', 'i_grp' ), (1, 2, 3, 4, 5, 6, 7, 8, 10) ) fmt = [ '*', '*', '*', '*', '*', '*', '*', '*', AOI, '*', 'rto', 'npy' ] outLabels = ('TTI', 'TTO', 'WOP', 'RAP', 'MNX', 'POE', 'CPT', 'DER') ############################################################################### # Load landscape and drive ############################################################################### (drive, land) = ( drv.driveSelector(DRV, AOI, popSize=25e3), lnd.landSelector('SPA') ) (gene, fldr) = (drive.get('gDict'), drive.get('folder')) xpPat = aux.getXPPattern(SET) ############################################################################### # Iterate through experiments ############################################################################### EXPS = aux.EXPS exp = EXPS[0] for exp in EXPS: ########################################################################### # Setting up paths ########################################################################### (PT_ROT, PT_IMG, PT_DTA, PT_PRE, PT_OUT, PT_MTR) = aux.selectPath( USR, SET, fldr, exp )
(USR, SET, DRV, AOI, EXP) = ( 'dsk', 'homing', 'ASD', 'HLT', 'E_099_099_027_096_000_007_011_011_010_04' ) JOBS = 4 else: (USR, SET, DRV, AOI, EXP) = ( sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5] ) JOBS = 8 ############################################################################### # Setting up paths and style ############################################################################### EXPS = aux.EXPS for exp in EXPS: (drive, land) = ( drv.driveSelector(DRV, AOI, popSize=aux.POP_SIZE), lnd.landSelector('SPA') ) (gene, fldr) = (drive.get('gDict'), drive.get('folder')) (PT_ROT, PT_IMG, PT_DTA, PT_PRE, PT_OUT, PT_MTR) = aux.selectPath( USR, SET, fldr, exp ) PT_IMG = PT_IMG + 'preTraces/' monet.makeFolder(PT_IMG) ########################################################################### # Style ########################################################################### (CLR, YRAN) = (drive.get('colors'), (0, drive.get('yRange'))) STYLE = { "width": .3, "alpha": .5, "dpi": 250, "legend": True, "aspect": .25, "colors": CLR, "xRange": aux.XRAN, "yRange": YRAN
import compress_pickle as pkl import MoNeT_MGDrivE as monet if monet.isNotebook(): (USR, SET, DRV, AOI) = ('lab', 'shredder', 'AXS', 'TRS') else: (USR, SET, DRV, AOI) = (sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) ############################################################################### XP_NPAT = aux.XP_HOM if SET == 'homing': XP_NPAT = aux.XP_SHR ############################################################################### EXPS = aux.EXPS exp = EXPS[0] ############################################################################### (drive, land) = (drv.driveSelector(DRV, AOI, popSize=11000), lnd.landSelector('SPA')) (gene, fldr) = (drive.get('gDict'), drive.get('folder')) (PT_ROT, PT_IMG, PT_DTA, PT_PRE, PT_OUT, PT_MTR) = aux.selectPath(USR, SET, fldr, exp) tS = datetime.now() monet.printExperimentHead( PT_DTA, PT_OUT, tS, aux.XP_ID + ' PstFraction [{}:{}:{}]'.format(DRV, exp, AOI)) ############################################################################### # Mean Max introgression ############################################################################### if SET == 'homing': fReplace = 'E_048_078_076_079_007_011_011_100_0166666_12-HLT_00_rto.npy' rats = np.load(path.join(PT_OUT, fReplace)) print("Mean(Max) = {:.3f}".format(1 - np.mean([min(i) for i in rats]))) ###############################################################################
if monet.isNotebook(): (SET, DRV, SUB, IMG) = ('shredder', 'AXS', 'preGrids', True) else: (SET, DRV, SUB, IMG) = (sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) EXPS = ('001', ) # EXPS = ('000', '002', '004', '006', '008') ############################################################################### # Paths ############################################################################### (LAB_BASE, DSK_BASE) = ( 'lab:/RAID5/marshallShare/yLinked2/', '/home/chipdelmal/Documents/WorkSims/YDR/' ) # Create structure in local computer ------------------------------------------ geneFldr = drv.driveSelector(DRV, 'ECO').get('folder') (PT_SET_S, PT_SET_T) = [path.join(i, SET) for i in (LAB_BASE, DSK_BASE)] (PT_DRV_S, PT_DRV_T) = [path.join(i, geneFldr) for i in (PT_SET_S, PT_SET_T)] [monet.makeFolder(i) for i in (PT_SET_T, PT_DRV_T)] ############################################################################### # Paths ############################################################################### CPY_STR = 'scp -r {} {}' (i, exp) = (0, EXPS[0]) for (i, exp) in enumerate(EXPS): if IMG=="True": (PT_WRK_S, PT_WRK_T) = [ path.join(i, exp, 'img') for i in (PT_DRV_S, PT_DRV_T) ] (PT_S, PT_T) = [path.join(i, SUB) for i in (PT_WRK_S, PT_WRK_T)] PT_T = path.split(PT_T)[0]
import YDR_gene as drv import YDR_land as lnd import MoNeT_MGDrivE as monet from cv2 import imread, imwrite, hconcat, vconcat if monet.isNotebook(): (USR, SET, DRV, QNT) = ('dsk', 'homing', 'ASD', '50') else: (USR, SET, DRV, QNT) = (sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) (AOI, EXPS) = (aux.DATA_PST, aux.EXPS) exp = EXPS[0] for exp in EXPS: # ######################################################################### # Setup paths and drive # ######################################################################### (drive, land) = (drv.driveSelector(DRV, AOI[0]), lnd.landSelector('SPA')) (gene, fldr) = (drive.get('gDict'), drive.get('folder')) (PT_ROT, PT_IMG, PT_DTA, PT_PRE, PT_OUT, PT_MTR) = aux.selectPath(USR, SET, fldr, exp) PT_IMG_P = PT_IMG + 'preTraces/' (PT_IMG_I, PT_IMG_O) = (PT_IMG + 'pstTraces/', PT_IMG + 'pstGrids/') monet.makeFolder(PT_IMG_O) tS = datetime.now() monet.printExperimentHead(PT_IMG_I, PT_IMG_O, tS, aux.XP_ID + ' PstGrids [{}:{}]'.format(DRV, exp)) # Get files --------------------------------------------------------------- NODE_NUM = len(land) imgListPre = sorted(glob('{}*E*{}*{}*.png'.format(PT_IMG_P, 'ECO', '*'))) imgLists = [ sorted(glob('{}E_*{}*{}*{}.png'.format(PT_IMG_I, i, '*', QNT))) for i in AOI