%load_ext autoreload
%autoreload 2

load_model_state[source]

load_model_state(model, path)

simfish_to_df[source]

simfish_to_df(sim_file, frame_idx=0)

load_sim_fish[source]

load_sim_fish(basedir, mrna_lvl=200, shape='cell3D', exp_strength='strong', cell_nr=0, shift=[-38, -38, -110])

big_fishq_to_df[source]

big_fishq_to_df(file_str)

rsfish_to_df[source]

rsfish_to_df(file_str)

basedir = '/groups/turaga/home/speisera/share_TUM/FishSIM/sim_density_fac1_2/'
img, gt_df, fq_nog_df, fq_gmm_df = load_sim_fish(basedir, 250, 'random', 'NR', 2)
plt.hist(gt_df['int'])
(array([29., 51., 69., 62., 41., 18.,  9., 11.,  0.,  1.]),
 array([ 2.90544835,  3.75645113,  4.6074539 ,  5.45845668,  6.30945946,
         7.16046223,  8.01146501,  8.86246779,  9.71347056, 10.56447334,
        11.41547612]),
 <BarContainer object of 10 artists>)
f_name = '../../../deepstorm/datasets/CodFish/smFISH_data_Titlow/detections/sgg_smFISH_4_spots.csv'
tiff = load_tiff_image(Path(f_name).parent.parent/'sgg_smFISH_4.tif')
print(tiff.shape)

df = big_fishq_to_df(f_name)
torch.Size([1, 25, 512, 512])
from decode_fish.funcs.plotting import *
from decode_fish.funcs.emitter_io import *

axes = plot_3d_projections(tiff[0], size=20)
axes[0].scatter(df['x'],df['y'], color='red', s=1)
axes[1].scatter(df['x'],df['z'], color='red', s=1)
axes[2].scatter(df['y'],df['z'], color='red', s=1)
axes[0].set_xlim(400,500)
axes[0].set_ylim(0,200)
(0.0, 200.0)

swap_psf_vol[source]

swap_psf_vol(psf, vol)

get_gaussian_psf[source]

get_gaussian_psf(size_zyx, radii)

load_psf[source]

load_psf(cfg)

load_psf_noise_micro[source]

load_psf_noise_micro(cfg)

load_post_proc[source]

load_post_proc(cfg)

get_dataloader[source]

get_dataloader(cfg)

load_all[source]

load_all(cfg, sl=False)

cfg = OmegaConf.load('../config/experiment/msp300_smFISH_3_6.yaml')
cfg = OmegaConf.load(default_conf)
psf = load_psf(cfg)
# psf.load_state_dict(torch.load(Path(cfg.output.save_dir)/'psf.pkl'))
torch.clamp_min(psf.psf_volume[0],0).sum()
tensor(15.7496, grad_fn=<SumBackward0>)
psf.psf_volume[0].max()
tensor(1., grad_fn=<MaxBackward1>)
from decode_fish.funcs.plotting import *
plot_3d_projections(psf.psf_volume[0])
array([<AxesSubplot:xlabel='x', ylabel='y'>,
       <AxesSubplot:xlabel='x', ylabel='z'>,
       <AxesSubplot:xlabel='y', ylabel='z'>], dtype=object)
!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.