(dp0 S'src' p1 (lp2 S'#!/usr/bin/python -i\nimport sys\nimport pickle\nimport random\nconfirm_next_step = True\n\n# this little can will hold \n# * all the settings, \n# * all results and intermediate results\n# * as well as this script itself\n# and then it will be written, to an output file\ncan = {} # the FACT can \ncan[\'settings\'] = {} # a subspace for holdind all settings\ncan[\'results\'] = {} # a subspace for holding all results... or similar stuff\ncan[\'logbook\'] = [] # a list of statements ... human readable logbook\ncan[\'src\'] = [] # this script and other sources\n\n# store this scipt in the list of sources.\ncan[\'src\'].append( open(sys.argv[0], \'r\').read() )\n\n# declare filenames to work with:\ncan[\'settings\'][\'data_file_names\'] = [\'/media/daten_platte/FACT/data/20120229_144.fits.gz\']\ncan[\'settings\'][\'calib_file_names\'] = [\'/media/daten_platte/FACT/data/20120229_132.drs.fits.gz\']\n# we even tell the can, where we are going to store it\ncan[\'settings\'][\'outfile_name\'] = \'./can.pkl\' # <-- no list ... simple string\n\n\n# put the settings for all the extractors and similar data processors \n# into the settings\ncan[\'settings\'][\'SlidingAverage\'] = [8]\ncan[\'settings\'][\'DRSSpikes\'] = []\ncan[\'settings\'][\'GlobalMaxFinder\'] = [40,200]\ncan[\'settings\'][\'AmplitudeCleaner\'] = [45,18,\'return_bool_mask=False\']\n\n# prepare some space in the can, for the results of this script\ncan[\'results\'][\'areas\'] = []\ncan[\'results\'][\'sizes\'] = []\n# and make some shortcuts\nareas = can[\'results\'][\'areas\']\nsizes = can[\'results\'][\'sizes\']\n\n# this loop will loop over all events, out of all data files in the can,\n# so the analysis loop doesn\'t even know, there are more files involved.\n# of course in the logbook the opening and closing will be stored\nfor data in range(100):\n if True:\n\n size = 0\n for i in range(data):\n size += data\n \n area = random.randint(0,data)\n if area > 4:\n areas.append( area )\n sizes.append( size )\n # we suddenly realize, that we would like to store\n # the event IDs of events, which are have no survivors\n # we should scroll up ... before the loop and declare an empty list\n # like: can[\'results\'][\'no_survivor_ids\'] = []\n # but imagine we are writing a function, which is beeing called inside the loop\n # and this function has no possibility to declare that ...\n # well then this function can still put new things inside the can!\n else:\n if \'no_survivor_ids\' not in can[\'results\']:\n can[\'results\'][\'no_survivor_ids\'] = [data]\n else:\n can[\'results\'][\'no_survivor_ids\'].append(data)\n \n if confirm_next_step:\n user_input = raw_input("\'q\'-quit, \'r\'-run, anything else goes one step")\n number=None\n try:\n number=int(user_input)\n except:\n number=None\n if user_input.find(\'q\') != -1:\n sys.exit(0)\n elif user_input.find(\'r\') != -1:\n confirm_next_step = False\n elif number!=None:\n run += number\n\n# Now our analysis is done and we save the can\noutput = open(can[\'settings\'][\'outfile_name\'], \'wb\')\npickle.dump(can, output)\noutput.close()' p3 asS'logbook' p4 (lp5 sS'results' p6 (dp7 S'sizes' p8 (lp9 I64 aI121 aI196 aI225 aI256 aI289 aI361 aI400 aI441 aI484 aI625 aI676 aI729 aI784 aI841 aI900 aI961 aI1024 aI1089 aI1156 aI1225 aI1296 aI1369 aI1444 aI1521 aI1600 aI1681 aI1849 aI1936 aI2025 aI2116 aI2209 aI2304 aI2401 aI2704 aI2809 aI2916 aI3025 aI3136 aI3364 aI3481 aI3600 aI3721 aI3844 aI3969 aI4096 aI4225 aI4356 aI4489 aI4624 aI4761 aI4900 aI5041 aI5184 aI5329 aI5476 aI5625 aI5776 aI5929 aI6084 aI6241 aI6400 aI6561 aI6889 aI7056 aI7225 aI7396 aI7569 aI7744 aI7921 aI8100 aI8281 aI8464 aI8649 aI8836 aI9025 aI9216 aI9409 aI9604 aI9801 asS'no_survivor_ids' p10 (lp11 I0 aI1 aI2 aI3 aI4 aI5 aI6 aI7 aI9 aI10 aI12 aI13 aI18 aI23 aI24 aI42 aI50 aI51 aI57 aI82 asS'areas' p12 (lp13 I5 aI10 aI10 aI13 aI15 aI6 aI10 aI20 aI13 aI5 aI22 aI20 aI21 aI18 aI14 aI29 aI25 aI21 aI13 aI10 aI12 aI16 aI10 aI28 aI32 aI36 aI12 aI9 aI23 aI43 aI7 aI35 aI42 aI30 aI49 aI26 aI16 aI42 aI10 aI32 aI17 aI13 aI40 aI49 aI24 aI29 aI61 aI65 aI14 aI7 aI37 aI53 aI24 aI57 aI20 aI30 aI19 aI67 aI21 aI75 aI57 aI77 aI35 aI76 aI66 aI55 aI11 aI15 aI73 aI47 aI15 aI81 aI12 aI11 aI16 aI53 aI28 aI86 aI68 aI39 assS'settings' p14 (dp15 S'AmplitudeCleaner' p16 (lp17 I45 aI18 aS'return_bool_mask=False' p18 asS'outfile_name' p19 S'./can.pkl' p20 sS'data_file_names' p21 (lp22 S'/media/daten_platte/FACT/data/20120229_144.fits.gz' p23 asS'SlidingAverage' p24 (lp25 I8 asS'calib_file_names' p26 (lp27 S'/media/daten_platte/FACT/data/20120229_132.drs.fits.gz' p28 asS'DRSSpikes' p29 (lp30 sS'GlobalMaxFinder' p31 (lp32 I40 aI200 ass.