diag=True,
                                cantfilt=cantfilt)

    dir_obj.cant_corner_img = (0, 0, minval + stepval * derp_ind)
    print(dir_obj.cant_corner_img)
    derp_ind += 1

    return dir_obj


# Do processing
dir_objs = list(map(proc_dir, dirs))

### Stitch together final data and compare to modified gravity

final_dat = cu.Force_v_pos()
final_dat.load_dir_objs(dir_objs)
final_dat.stitch_data(numbins=200, cant_axis=SWEEP_AX, resp_axis=RESP_AX, showstitch=show_final_stitching, \
                      matchmeans=True, detrend=True, minmsq=True)



grav_dat = fcurve_obj.mod_grav_force(final_dat.bins*1e-6, sep=SEP, \
                                     alpha=ALPHA, yuklambda=YUKLAMBDA, rbead=RBEAD)
diag_grav_dat = fcurve_obj.mod_grav_force(final_dat.diagbins*1e-6, sep=SEP, \
                                     alpha=ALPHA, yuklambda=YUKLAMBDA, rbead=RBEAD)

grav_dat = signal.detrend(grav_dat)
diag_grav_dat = signal.detrend(diag_grav_dat)

wvnum = np.fft.rfftfreq(len(final_dat.force),
import grav_util as gu

import scipy.signal as signal
import scipy.optimize as optimize
import scipy.stats as stats

import sys

patch_asds = pickle.load(open('/home/charles/sshtemp/out_asds.p', 'rb'))

patchfreq = patch_asds['freqs']
patchasd = patch_asds[12.5]

### Load backgrounds

background_data = cu.Force_v_pos()
background_data.load('/force_v_pos/20170822_grav_background_sep10um_h15um.p')

bins = background_data.bins
force = background_data.force
errs = background_data.errs

diagbins = background_data.diagbins
diagforce = background_data.diagforce
diagerrs = background_data.diagerrs

wvnum = np.fft.rfftfreq(len(force), d=(bins[1] - bins[0]))
datfft = np.fft.rfft(force)
datasd = np.abs(datfft)

diagwvnum = np.fft.rfftfreq(len(diagforce), d=(diagbins[1] - diagbins[0]))
Ejemplo n.º 3
0
from scipy.optimize import minimize_scalar as minimize
import pickle as pickle

import image_util as imu

import warnings

warnings.filterwarnings("ignore")

###########################
# Script to analyze "gravity" data in which the cantilever is
# driven alongside the bead. The user can select the axis along
# which the cantilever is driven.
###########################

out_fvpos = cu.Force_v_pos()

filstring = 'Z9um'

# CHOOSE WHETHER TO LOOK AT VARIOUS BIAS OR VARIOUS CANT POS
bias = False
stagestep = True
stepind = 0

dirs = [
    11,
]
bdirs = [
    1,
]
subtract_background = False