From bf660ea51d3094116f41d83f19bb7d9be96af752 Mon Sep 17 00:00:00 2001 From: DenisSch Date: Fri, 3 Apr 2020 10:54:35 -0400 Subject: [PATCH] Remove memory print #11 --- SingleCellDataExtraction.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/SingleCellDataExtraction.py b/SingleCellDataExtraction.py index 81c8507..446705c 100644 --- a/SingleCellDataExtraction.py +++ b/SingleCellDataExtraction.py @@ -9,7 +9,6 @@ import os import skimage.measure as measure from pathlib import Path -import tracemalloc @@ -132,15 +131,12 @@ def MaskZstack(mask_loaded,image,channel_names_loaded): #Iterate through the z stack to extract intensities list_of_chan = [] #Get the z channel and the associated channel name from list of channel names - tracemalloc.start() for z in range(len(channel_names_loaded)): #Run the data Prep function image_loaded_z = PrepareData(image,z) #Use the above information to mask z stack list_of_chan.append(MaskChannel(mask_loaded,image_loaded_z)) #Display memory monitoring --- next 3 lines can be commented - current, peak = tracemalloc.get_traced_memory() - print(f"Current memory usage is {current / 10**6}MB; Peak was {peak / 10**6}MB") print("Finished "+str(z)) #Convert the channel names list and the list of intensity values to a dictionary and combine with CellIDs and XY dat = pd.concat([IDs,pd.DataFrame(dict(zip(channel_names_loaded,list_of_chan)))],axis=1) @@ -191,18 +187,9 @@ def MultiExtractSingleCells(mask,image,channel_names,output): export single-cell data from image masks""" print("Extracting single-cell data for "+str(image)+'...') - #Start memory monitoring --- next line can be commented - tracemalloc.start() - # --- #Run the ExtractSingleCells function for this image ExtractSingleCells(mask,image,channel_names,output) - - #Display memory monitoring --- next 3 lines can be commented - current, peak = tracemalloc.get_traced_memory() - print(f"Current memory usage is {current / 10**6}MB; Peak was {peak / 10**6}MB") - tracemalloc.stop() - # --- #Print update im_full_name = os.path.basename(image)