def createWarmPicture(analyses): bounds = locality.GEO_BOUNDS gridData = getGridData(analyses, IMAGE_SIZE, bounds) pixels = _getPixels(gridData) buffer = StringIO.StringIO() _createPng(buffer, IMAGE_SIZE, pixels, has_alpha=True) disk.storeAtomicData(OUTPUT_FILENAME, buffer.getvalue())
def save(map, path): data = cPickle.dumps(map, protocol=2) disk.storeAtomicData(path, data)
def _storeData(url, basename, data): path = _getStoragePath(url, basename) disk.storeAtomicData(path, data)