This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def customDeen(frame0, | |
frame1, | |
blockOne, | |
algorithmType = 'basic', | |
minMaxKernel = (15,15), | |
minMaxLowLimit = 10, | |
cliplimit = 2.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def minMaxFilter(img, filterSize, minContrast): | |
""" | |
After R.Adrian, J.Westerweel, "Particle image velocimetry", Cambridge | |
university press, 2011. See ch.6.1.2, p.248-250. | |
Parameters: img (ndarray) - image to be filtered | |
filterSize (ndarray) - a 1x2 numpy array of the filter height | |
and width correspondingly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% this code was copied from https://tex.stackexchange.com/a/516102 | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
\usepackage[bigfiles]{pdfbase} | |
\ExplSyntaxOn | |
\NewDocumentCommand\embedvideo{smm}{ | |
\group_begin: | |
\leavevmode | |
\tl_if_exist:cTF{file_\file_mdfive_hash:n{#3}}{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Different functions to get pairwise distance in cubic box with PBC | |
Args: | |
positions: the positions of particles, shape (N, dim) | |
box (int or float): the size of the box | |
Return: | |
np.ndarray: the pair-wise distances, shape (N, N) | |
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numba | |
import xarray as xr | |
@numba.jit(nopython=True) | |
def lowess_1d(y, x, alpha=2. / 3., it=10): | |
"""lowess(x, y, f=2./3., iter=3) -> yest | |
Lowess smoother: Robust locally weighted regression. | |
The lowess function fits a nonparametric regression curve to a scatterplot. | |
The arrays x and y contain an equal number of elements; each pair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Problem: the candidate may already be linked. Need to register the candidate | |
and update both if the candidate has a better link. | |
Created on Wed Feb 22 12:08:02 2017 | |
@author: yosef, based on attempt by lillyverso | |
""" |
NewerOlder