AllenNeuralDynamics / aind-ophys-utils

Repo for Ophys utils
MIT License
0 stars 0 forks source link

Track down how ophys_etl motion correction is doing non-rigid correction right now #26

Open arielleleon opened 12 months ago

arielleleon commented 12 months ago

Related work:

https://github.com/AllenInstitute/LearningmFISHTask1A_data_validation/issues/62 https://github.com/AllenInstitute/LearningmFISHTask1A_data_validation/issues/37


relevant NR params

param description (from suite2p docs)

nonrigid: (bool, default: True) whether or not to perform non-rigid registration, which splits the field of view into blocks and computes registration offsets in each block separately.

block_size: (two ints, default: [128,128]) size of blocks for non-rigid registration, in pixels. HIGHLY recommend keeping this a power of 2 and/or 3 (e.g. 128, 256, 384, etc) for efficient fft

snr_thresh: (float, default: 1.2) how big the phase correlation peak has to be relative to the noise in the phase correlation map for the block shift to be accepted. In low SNR recordings like one-photon, I’d recommend a larger value like 1.5, so that block shifts are only accepted if there is significant SNR in the phase correlation.

maxregshiftNR: (float, default: 5.0) maximum shift in pixels of a block relative to the rigid shift

example of all suite2p input args

{ "1Preg": false, "align_by_chan": 1, "allow_overlap": true, "anatomical_only": 0, "aspect": 1.0, "baseline": "maximin", "batch_size": 500, "bidi_corrected": false, "bidiphase": 0, "bin_duration": 3.7, "block_size": [ 128, 128 ], "bruker": false, "bruker_bidirectional": false, "cellprob_threshold": 0.0, "chan2_thres": 0.65, "classifier_path": 0, "combined": true, "connected": true, "data_path": [], "delete_bin": false, "denoise": false, "diameter": 12, "do_bidiphase": false, "do_registration": 1, "fast_disk": [], "flow_threshold": 1.5, "force_refImg": true, "force_sktiff": false, "frames_include": -1, "fs": 9.49, "functional_chan": 1, "h5py": "/allen/programs/mindscope/production/learning/prod0/specimen_1253737569/ophys_session_1266340054/ophys_experiment_1266500143/1266500143.h5", "h5py_key": "data", "high_pass": 100, "ignore_flyback": [], "inner_neuropil_radius": 2, "keep_movie_raw": false, "lam_percentile": 50.0, "look_one_level_down": false, "max_iterations": 20, "max_overlap": 0.75, "maxregshift": 0.2, "maxregshiftNR": 5, "mesoscan": false, "min_neuropil_pixels": 350, "move_bin": false, "movie_frame_rate": null, "movie_frame_rate_hz": 9.49, "multiplane_parallel": false, "nbinned": 1221, "nchannels": 1, "neucoeff": 0.7, "neuropil_extract": true, "nimg_init": 5000, "nonrigid": true, "norm_frames": true, "nplanes": 1, "nwb_driver": "", "nwb_file": "", "nwb_series": "", "output_dir": "/tmp/tmpkk5z8ytv", "output_json": "/tmp/tmpkk5z8ytv/Suite2P_output.json", "pad_fft": false, "prctile_baseline": 8.0, "pre_smooth": 0, "preclassify": 0.0, "reg_tif": true, "reg_tif_chan2": false, "retain_files": [ "*.tif", "ops.npy" ], "roidetect": false, "save_NWB": false, "save_folder": [], "save_mat": false, "save_path0": "/tmp/tmpgsvdywtt", "sig_baseline": 10.0, "smooth_masks": true, "smooth_sigma": 1.15, "smooth_sigma_time": 0.0, "snr_thresh": 1.2, "soma_crop": true, "sparse_mode": true, "spatial_hp": 42, "spatial_hp_detect": 25, "spatial_hp_reg": 42, "spatial_scale": 0, "spatial_taper": 40, "spikedetect": false, "subfolders": [], "subpixel": 10, "suite2p_version": "0.10.2", "tau": 1.0, "th_badframes": 1.0, "threshold_scaling": 0.75, "timestamp": true, "tmp_dir": null, "two_step_registration": false, "use_builtin_classifier": false, "win_baseline": 60.0 }