<s> import numpy as np <EOL> from PIL import Image <EOL> import urllib2 <EOL> import zlib <EOL> import StringIO <EOL> import os <EOL> import sys <EOL> EM_BASE_PATH = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT:..>" ) ) <EOL> EM_UTIL_PATH = os . path . join ( EM_BASE_PATH , "<STR_LIT>" ) <EOL> EM_EMCA_PATH = os . path . join ( EM_BASE_PATH , "<STR_LIT>" ) <EOL> EM_DBCONFIG_PATH = os . path . join ( EM_BASE_PATH , "<STR_LIT>" ) <EOL> sys . path += [ EM_UTIL_PATH , EM_DBCONFIG_PATH , EM_EMCA_PATH ] <EOL> import emcaproj <EOL> import emcadb <EOL> import dbconfig <EOL> projdb = emcaproj . EMCAProjectsDB ( ) <EOL> proj = projdb . getProj ( '<STR_LIT>' ) <EOL> dbcfg = dbconfig . switchDataset ( proj . getDataset ( ) ) <EOL> db = emcadb . EMCADB ( dbcfg , proj ) <EOL> _ximagesz = <NUM_LIT> <EOL> _yimagesz = <NUM_LIT> <EOL> fid = open ( "<STR_LIT>" , "<STR_LIT:w>" ) <EOL> for zstart in range ( <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT:16> ) : <EOL> zend = min ( zstart + <NUM_LIT:16> , <NUM_LIT> ) <EOL> corner = [ <NUM_LIT> , <NUM_LIT> , zstart ] <EOL> resolution = <NUM_LIT:1> <EOL> dim = [ _ximagesz , _yimagesz , zend - zstart ] <EOL> print "<STR_LIT>" % ( corner , dim ) <EOL> cube = db . cutout ( corner , dim , resolution ) <EOL> print "<STR_LIT>" <EOL> cube . data . tofile ( fid ) <EOL> print "<STR_LIT>" </s>
