Skip to content

Commit 6649849

Browse files
committed
comply with nfpp 0_2_0 imports, update data path and add a few more setting to the config file
1 parent aaf2acc commit 6649849

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

code/phasor_plot_analysis_batch_processing.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from napari_flim_phasor_plotter.filters import apply_binning
1111
from napari_flim_phasor_plotter._reader import read_stack
12-
from napari_flim_phasor_plotter._widget import make_flim_phasor_plot, manual_label_extract, smooth_cluster_mask
12+
from napari_flim_phasor_plotter.widgets import make_flim_phasor_plot, manual_label_extract, smooth_cluster_mask
1313

1414
from utilities import ellipse_vertices, format_metadata, set_plot_zoom_position, add_segmentation_metadata
1515
import time
@@ -23,9 +23,9 @@
2323
# Inputs
2424

2525
# Main folder path (each folder contains a zarr file and an xml file)
26-
main_folder_path = Path("/home/pol_haase/mazo260d/Data/I227_Lifetime_Unmixing_of_Dyes_with_Overlapping_Sprectra/Batch_Processing")
26+
main_folder_path = Path("../embryos_data/")
2727

28-
# Additional metadata in case the xml file is not available
28+
# Additional manual metadata if xml file was not available (not the case)
2929
z_pixel_size = 0.5*1e-6 # in m
3030
pixel_size_unit = 'm'
3131
time_resolution_per_slice = 0.663 # in seconds
@@ -282,7 +282,7 @@
282282
# Convert the segmentation result to a Dask array
283283
chunk_shape = summed_intensity_stack.chunksize
284284
cluster_labels_image_timelapse_dask = da.from_array(cluster_labels_image_timelapse_post_processed, chunks=chunk_shape)
285-
285+
286286
if store_phasor_mask:
287287
cluster_mask_timelapse = np.expand_dims(cluster_mask_timelapse.astype(summed_intensity_stack.dtype), axis=0)
288288
cluster_mask_timelapse_dask = da.from_array(cluster_mask_timelapse, chunks=chunk_shape)
@@ -307,6 +307,14 @@
307307
# Writing to the file
308308
with open(file_path, 'w') as file:
309309
file.write(f"sample_name = {sample_name}\n")
310+
file.write(f"data shape = {data.shape}\n")
311+
file.write(f"laser_frequency = {laser_frequency} MHz\n")
312+
file.write(f"x_pixel_size = {metadata_timelapse['PhysicalSizeX']} {metadata_timelapse['PhysicalSizeXUnit']}\n")
313+
file.write(f"y_pixel_size = {metadata_timelapse['PhysicalSizeY']} {metadata_timelapse['PhysicalSizeYUnit']}\n")
314+
file.write(f"z_pixel_size = {metadata_timelapse['PhysicalSizeZ']} {metadata_timelapse['PhysicalSizeZUnit']}\n")
315+
file.write(f"time_resolution = {metadata_timelapse['TimeIncrement']} {metadata_timelapse['TimeIncrementUnit']}\n")
316+
file.write(f"microtime_resolution = {metadata_single_timepoint['TimeIncrement']} {metadata_single_timepoint['TimeIncrementUnit']}\n")
317+
file.write(f"channel_names = {channel_names}\n")
310318
file.write(f"center = {center}\n")
311319
file.write(f"major-axis = {major}\n")
312320
file.write(f"minor-axis = {minor}\n")

0 commit comments

Comments
 (0)