Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate downsampled TIFFs as an artifact of motion correction #483

Open
2 tasks
danielsf opened this issue Apr 18, 2022 · 0 comments
Open
2 tasks

Comments

@danielsf
Copy link
Contributor

danielsf commented Apr 18, 2022

In this Mindscope QC issue

AllenInstitute/brain_observatory_qc#16

it was decided that a side-by-side TIFF downsampled to 2Hz comparing pre- and post-motion correction movies should be produced as an automatic artifact of our motion correction pipeline in addition to the downsampled webms currently being produced.

Tasks

  • Add code to create downsampled TIFFs to the suite2p_registration pipeline code

Validation

  • Motion correction runs and automatically produces the requested TIFF

The code we want should call some form of

ophys_etl/modules/video/side_by_side_video

with the pre-motion correction file specified as left_side_video_path and the post-motion correction file as right_side_video_path

For other parameters, here is an example of a config I used to generate the example videos that the scientists approved

{
  "input_frame_rate_hz": 6.0,
  "kernel_size": 2,
  "kernel_type": "mean",
  "left_video_path": "/allen/programs/braintv/production/neuralcoding/prod55/spe
cimen_734689833/ophys_session_806855673/ophys_experiment_806928824/806855673_pla
ne1.h5",
  "log_level": "INFO",
  "lower_quantile": 0.0,
  "n_parallel_workers": 5,
  "output_frame_rate_hz": 2.0,
  "output_path": "/allen/programs/mindscope/workgroups/surround/motion_correctio
n_labeling_2022/806928824/806928824_2Hz_side_by_side_with_reticle.tiff",
  "quality": 7,
  "reticle": true,
  "right_video_path": "/allen/programs/mindscope/workgroups/surround/motion_corr
ection_labeling_2022/806928824/806928824_motion_corrected_video.h5",
  "speed_up_factor": 1,
  "upper_quantile": 1.0,
  "video_dtype": "uint16"
}

input_frame_rate_hz should be changed to whatever the actual frame rate of the input movie is.
n_parallel_workers should not be set higher than the number of cores we expect in our production motion correction jobs (16? check the slurm submission scripts for an actual motion correction job)

I'm not sure what the output file path should be. Probably you can just copy the name of the .webm file we are already producing and change the extension to .tiff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant