%load_ext autoreload
%autoreload 2

free_mem[source]

free_mem()

center_crop[source]

center_crop(volume, zyx_ext)

smooth[source]

smooth(x, window_len=11, window='flat')

plot_tb_logs[source]

plot_tb_logs(exps, metric='Sim. Metrics/eff_3d', window_len=1)

gaussian_sphere[source]

gaussian_sphere(shape, radius, position)

filt_sim_vars[source]

filt_sim_vars(locs_sl, x_os_sl, y_os_sl, z_os_sl, ints_sl, int_mu, int_sig, min_fac)

tiff_imread[source]

tiff_imread(path)

helper function to read tiff file with pathlib object or str

load_tiff_image[source]

load_tiff_image(image_path:str)

Given tiff stack path, loads the stack and converts it to a tensor. If necessary adds a dimension for the batch size

gpu[source]

gpu(x)

Transforms numpy array or torch tensor torch torch.cuda.FloatTensor

cpu[source]

cpu(x)

Transforms torch tensor into numpy array

zip_longest_special[source]

zip_longest_special(*iterables)

class param_iter[source]

param_iter()

variable_col = param_iter()
variable_col.add('lr', 1e-3, 5e-3)
variable_col.add('lasso_mat', True, False)

par_prod = variable_col.param_product()
print(par_prod)

par_zip = variable_col.param_zip()
print(par_zip)
[{'lr': 0.001, 'lasso_mat': True}, {'lr': 0.001, 'lasso_mat': False}, {'lr': 0.005, 'lasso_mat': True}, {'lr': 0.005, 'lasso_mat': False}]
[{'lr': 0.001, 'lasso_mat': True}, {'lr': 0.005, 'lasso_mat': False}]
!nbdev_build_lib
Converted 00_models.ipynb.
Converted 01_psf.ipynb.
Converted 02_microscope.ipynb.
Converted 03_noise.ipynb.
Converted 04_pointsource.ipynb.
Converted 05_gmm_loss.ipynb.
Converted 06_plotting.ipynb.
Converted 07_file_io.ipynb.
Converted 08_dataset.ipynb.
Converted 09_output_trafo.ipynb.
Converted 10_evaluation.ipynb.
Converted 11_emitter_io.ipynb.
Converted 12_utils.ipynb.
Converted 13_train.ipynb.
Converted 15_fit_psf.ipynb.
Converted 16_visualization.ipynb.
Converted 17_eval_routines.ipynb.
Converted 18_predict_funcs.ipynb.
Converted index.ipynb.