Browse Source

changed legend in bleach correction

Giovanni Galizia 1 year ago
parent
commit
7d0d79ebc9

+ 2 - 1
log2list_examples/create_measurement_list_VTK2021.py

@@ -16,8 +16,9 @@ LE_loadExp = 3
 # Mother of all Folders of your dataset
 # On Windows, if you copy paths from the file explorer, make sure the string below is always of the form r"......"
 #STG_STG_STG_MotherOfAllFolders = r"/home/ajay/Nextcloud/VTK_2021/bee/HS_210521_test"
-STG_STG_STG_MotherOfAllFolders = r"/Users/galizia/Documents/DATA/VTK_test/YT_VTK"
+#STG_STG_STG_MotherOfAllFolders = r"/Users/galizia/Documents/DATA/VTK_test/YT_VTK"
 #STG_STG_STG_MotherOfAllFolders = r"/Users/galizia/Documents/DATA/HS_210521_test"
+STG_STG_STG_MotherOfAllFolders = r"/Users/galizia/Nextcloud/VTK_2021/Bee_alarm_2022"# 01_DATA
 
 
 # path of the "Data" folder in VIEW organization containing the data

+ 1 - 1
view/idl_translation_core/bleach_correction.py

@@ -184,7 +184,7 @@ def show_fitlogdecay(lineIn, fittedout_blue, fittedout_green, t, weights, opt_pa
     fig.canvas.set_window_title(measurement_label)
     ax1 = fig.add_subplot(2,1,1) # (2,1,1)
     ax2 = fig.add_subplot(2,1,2)
-    ax1.set_title('Fitlogdecay')
+    ax1.set_title('Fitlogdecay: ' + measurement_label)
     ax2.set_title('weights')
     ax2.plot(t, weights, 'k--',
           label='weights')

+ 2 - 1
view/python_core/bleach_corr/__init__.py

@@ -85,6 +85,7 @@ class UniformBleachCompensator(BaseBleachCompensator):
         super().__init__(flags, p1_metadata, movie_size)
         self.background_frames = p1_metadata.background_frames
         self.show_results = not flags["VIEW_batchmode"]
+        self.measurement_label = p1_metadata['ex_name']
 
     def apply(self, stack_xyt: np.ndarray, area_mask: np.ndarray):
 
@@ -106,7 +107,7 @@ class UniformBleachCompensator(BaseBleachCompensator):
         curve = np.nanmean(F_by_F0_txy_masked, axis=(1, 2))
 
         # apply bleach correction to curve and return the parameters A, K and C
-        fitted_curve, (A, K, C) = fitlogdecay(lineIn=curve, weights=self.weights, showresults=self.show_results)
+        fitted_curve, (A, K, C) = fitlogdecay(lineIn=curve, weights=self.weights, showresults=self.show_results, measurement_label=self.measurement_label)
 
         # converting to xyt as it is easier to subtract a trace from all pixels in this format
         F_by_F0_xyt = np.moveaxis(F_by_F0_txy, source=0, destination=-1)