parameters: (self, data, factor)
return_statement: return data
docstring: changes frame resolution to "round((factor) * (original resolution))"
docstring_summary: changes frame resolution to "round((factor) * (original resolution))"
docstring_tokens: changes frame resolution to round (( factor ) * ( original resolution ))
function: def scale(self, data, factor):
  		'''
  			 changes frame resolution to "round((factor) * (original resolution))"
  		'''
  		# only same factor in every dim for now. how would it affect vel scaling?
  		# check for 2D
  		
  		scale = [factor, factor, factor, 1] #single frame
  		if self.dim==2:
  			scale[0] = 1
  		
  		# to ensure high/low ration stays the same
  		scale = np.round(np.array(data[DATA_KEY_LOW].shape) * scale )/np.array(data[DATA_KEY_LOW].shape)
  		if len(data[DATA_KEY_LOW].shape)==5: #frame sequence
  			scale = np.append([1],scale)
  			
  		#apply transform
  		#low = self.applyTransform(low, zoom_matrix)
  		#high = self.applyTransform(high, zoom_matrix)
  		
  		#changes the size of the frame. should work well with getRandomTile(), no bounds needed
  		for data_key in data:
  			if not self.data_flags[data_key]['isLabel']:
  				data[data_key]  = scipy.ndimage.zoom( data[data_key], scale, order=self.interpolation_order, mode=self.fill_mode, cval=0.0)
  		
  		#necessary?
  		data = self.special_aug(data, AOPS_KEY_SCALE, factor)
  		
  		return data
function_tokens: def scale ( self , data , factor ) : # only same factor in every dim for now. how would it affect vel scaling? # check for 2D scale = [ factor , factor , factor , 1 ] #single frame if self . dim == 2 : scale [ 0 ] = 1 # to ensure high/low ration stays the same scale = np . round ( np . array ( data [ DATA_KEY_LOW ] . shape ) * scale ) / np . array ( data [ DATA_KEY_LOW ] . shape ) if len ( data [ DATA_KEY_LOW ] . shape ) == 5 : #frame sequence scale = np . append ( [ 1 ] , scale ) #apply transform #low = self.applyTransform(low, zoom_matrix) #high = self.applyTransform(high, zoom_matrix) #changes the size of the frame. should work well with getRandomTile(), no bounds needed for data_key in data : if not self . data_flags [ data_key ] [ 'isLabel' ] : data [ data_key ] = scipy . ndimage . zoom ( data [ data_key ] , scale , order = self . interpolation_order , mode = self . fill_mode , cval = 0.0 ) #necessary? data = self . special_aug ( data , AOPS_KEY_SCALE , factor ) return data