Last active
January 7, 2017 15:27
-
-
Save wilbefast/cfa8e00ddf6da25154926d75f6e3ad70 to your computer and use it in GitHub Desktop.
For Alexia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VARIABLE LIST | |
midpoint_part1_TX = 0 | |
midpoint_part1_TZ = 0 | |
midpoint_part2_TX = 0 | |
midpoint_part2_TZ = 0 | |
midpoint_part3_TX = 0 | |
midpoint_part3_TZ = 0 | |
length_partl = 0 | |
length_part2 = 0 | |
length_part3 = 0 | |
rotateZ_partl = 0 | |
rotateZ_part2 = 0 | |
rotateZ_part3 = 0 | |
# FIT RANGE | |
midpoint_part1_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part1_TZ = fitRange(random.choice(seedList), 1, 0, 0.2, 0.01) | |
midpoint_part2_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part2_TZ = fitRange(random.choice(seedList), 1, 0, 0.2, 0.01) | |
midpoint_part3_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part3_TZ = fitRange(random.choice(seedList), 1, 0, 0.1, 0.01) | |
length_partl = fitRange(random.choice(seedList), 1, 0, 0.5, 2.5) | |
length_part2 = fitRange(random.choice(seedList), 1, 0, 0.1, 2) | |
length_part3 = fitRange(random.choice(seedList), 1, 0, 0.01, 1) | |
rotateZ_partl = fitRange(random.choice(seedList), 1, 0, 10, 60) | |
rotateZ_part2 = fitRange(random.choice(seedList), 1, 0, -45, 0) | |
rotateZ_part3 = fitRange(random.choice(seedList), 1, 0, 10, 45) | |
# OPS | |
op.par.value0 = midpoint_part1_TX | |
op.par.valuel = midpoint_partl_TZ | |
op.par.value2 = midpoint_part2_TX | |
op.par.value3 = midpoint_part2_TZ | |
op.par.value4 = midpoint_part3_TX | |
op.par.value5 = midpoint_part3_TZ | |
op.par.value6 = length_partl | |
op.par.value7 = length_part2 | |
op.par.value8 = length_part3 | |
op.par.value9 = rotateZ_partl | |
op.par.value10 = rotateZ_part2 | |
op.par.valuell = rotateZ_part3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def part1( ): | |
"This one only does the part one stuff " | |
midpoint_part1_TX = 0 | |
midpoint_part1_TZ = 0 | |
length_partl = 0 | |
rotateZ_partl = 0 | |
midpoint_part1_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part1_TZ = fitRange(random.choice(seedList), 1, 0, 0.2, 0.01) | |
op.par.value0 = midpoint_part1_TX | |
op.par.valuel = midpoint_partl_TZ | |
op.par.value6 = length_partl | |
op.par.value9 = rotateZ_partl | |
return | |
def part2( ): | |
"This one only does the part two stuff " | |
midpoint_part2_TX = 0 | |
midpoint_part2_TZ = 0 | |
length_part2 = 0 | |
rotateZ_part2 = 0 | |
midpoint_part2_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part2_TZ = fitRange(random.choice(seedList), 1, 0, 0.2, 0.01) | |
op.par.value3 = midpoint_part2_TX | |
op.par.value4 = midpoint_part2_TZ | |
op.par.value7 = length_part2 | |
op.par.value10 = rotateZ_part2 | |
return | |
def part3( ): | |
"This one only does the part three stuff " | |
midpoint_part3_TX = 0 | |
midpoint_part3_TZ = 0 | |
length_part3 = 0 | |
rotateZ_part3 = 0 | |
midpoint_part3_TX = fitRange(random.choice(seedList), 1, 0, 0.5, -0.4) | |
midpoint_part3_TZ = fitRange(random.choice(seedList), 1, 0, 0.2, 0.01) | |
op.par.value5 = midpoint_part3_TX | |
op.par.value6 = midpoint_part3_TZ | |
op.par.value8 = length_part3 | |
op.par.value11 = rotateZ_part3 | |
return | |
if doPart1: | |
part1() | |
if doPart2: | |
part2() | |
if doPart3: | |
part3() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#liste des choix possibles
varListNames = ['midpoint_part1_TX', 'midpoint_part1_TZ', 'midpoint_part2_TX', 'midpoint_part2_TZ', 'midpoint_part3_TX', 'midpoint_part3_TZ', 'length_part1',
'length_part2', 'length_part3', 'rotateZ_part1','rotateZ_part2', 'rotateZ_part3']
#evaluation du nombre de choix possibles
listLen = len(varListNames)
print (listLen)
choiceList = list(range(0,listLen))
samplesNum = random.choice(choiceList)