Skip to content
Snippets Groups Projects
Commit 3dadc725 authored by Christopher Schmied's avatar Christopher Schmied
Browse files

Deconvolution switch Bug in deconvolution.bsh

parent 020aff0b
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,11 @@ import ij.Prefs; // calls imagej settings
import java.lang.Runtime;
import java.io.File;
import java.io.FilenameFilter;
runtime = Runtime.getRuntime();
System.out.println(runtime.availableProcessors() + " cores available for multi-threading");
Prefs.setThreads(7); // defines the number of threads allowed
Prefs.setThreads(7); // defines the number of threads allowed
print("Threads: "+Prefs.getThreads()); // prints thread setting in output
System.out.println( "Start to load Parameters:" );
......@@ -27,13 +27,12 @@ int parallel_timepoints = Integer.parseInt(System.getProperty( "parallel_timepoi
process_timepoint = System.getProperty( "process_timepoint" );
process_channel = System.getProperty( "process_channel" );
process_illumination = System.getProperty( "process_illumination" );
process_angle = System.getProperty( "process_angle" );
process_angle = System.getProperty( "process_angle" );
System.out.println( "-------------------------------------------------------" );
System.out.println( "General parameters: " );
System.out.println( "timepoint_processed = " + parallel_timepoints );
System.out.println( "process_timepoints = " + process_timepoint );
System.out.println( "process_timepoints = " + process_timepoint );
System.out.println( "process_channel = " + process_channel );
System.out.println( "process_illumination = " + process_illumination );
System.out.println( "process_angle = " + process_angle );
......@@ -66,7 +65,6 @@ psf_estimation = System.getProperty( "psf_estimation" );
iterations = System.getProperty( "iterations" );
deco_output_file_directory = System.getProperty( "deco_output_file_directory" );
System.out.println( "-------------------------------------------------------" );
System.out.println( "Deconvolution settings: " );
System.out.println( "imglib2_container = " + imglib2_container_deco );
......@@ -95,24 +93,24 @@ System.out.println( "-------------------------------------------------------" );
System.out.println( "Channel Settings: " );
// Channel setting for Deconvolution
// parses channels and takes from there the number of channels
// parses detections_to_extract_psf_for_channel
// parses detections_to_extract_psf_for_channel
channels = System.getProperty( "channels" );
System.out.println( "Channels = " + channels );
System.out.println( "Channels = " + channels );
detections_to_extract_psf_for_channel = System.getProperty( "detections_to_extract_psf_for_channel" );
System.out.println( "PSF: " + detections_to_extract_psf_for_channel );
// Splits channels and detections_to_extract_psf_for_channel
// Splits channels and detections_to_extract_psf_for_channel
String delims = "[,]";
String[] channel_token = channels.split(delims);
String[] psf_token = detections_to_extract_psf_for_channel.split(delims);
// Assembles channel_string
// Assembles channel_string
StringBuilder channel_string = new StringBuilder();
for (int channel=0; channel < channel_token.length; channel++ )
{
{
String channel_part = "detections_to_extract_psf_for_channel_" + channel_token[channel] + "=" + psf_token[channel] + " ";
channel_string.append( channel_part );
channel_string.append(" ");
......@@ -131,20 +129,20 @@ System.getProperty( "cudafourierconvolution = " + cudafourierconvolution );
System.out.println( "compute_on = " + compute_on );
System.out.println( "directory_cuda = " + directory_cuda );
System.out.println( "cudafourierconvolution = " + cudafourierconvolution );
String compute_string = "";
String cuda_settings = "";
if (compute_on.equalsIgnoreCase( "GPU (Nvidia CUDA via JNA)" ) )
{
System.out.println( "GPU deconvoultion selected" );
compute_string = "compute_on=[GPU (Nvidia CUDA via JNA)] ";
cuda_settings = "cuda_directory=" + directory_cuda + " " +
"select_native_library_for_cudafourierconvolution=" + cudafourierconvolution + " " +
"select_native_library_for_cudafourierconvolution=" + cudafourierconvolution + " " +
"gpu_1 ";
}
else if (compute_on.equalsIgnoreCase( "CPU (Java)" ) )
else if (compute_on.equalsIgnoreCase( "CPU (Java)" ) )
{
System.out.println( "CPU deconvoultion selected" );
compute_string = "compute_on=[" + compute_on + "] ";
......
......@@ -149,7 +149,7 @@ deconvolution: {
maximal_x_deco: '1019', # essential maybe automate
maximal_y_deco: '1941', # essential maybe automate
maximal_z_deco: '486', # essential maybe automate
detections_to_extract_psf_for_channel: '"beads"',
detections_to_extract_psf_for_channel: '"beads,beads"',
process_timepoint: '"Single Timepoint (Select from List)"',
process_angle: '"All angles"',
process_channel: '"All channels"',
......@@ -165,7 +165,7 @@ deconvolution: {
psf_size_y: '19',
psf_size_z: '25',
type_of_iteration: '"Efficient Bayesian - Optimization I (fast, precise)"',
bsh_file: "deconvolution_GPU.bsh"
bsh_file: "deconvolution.bsh"
}
hdf5_output: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment