블로그 이미지
환무

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
  • total
  • today
  • yesterday
2018. 4. 12. 11:19 Study/Magnetic tweezers

%% data 읽어서 자석의 높이별로 구분


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%  Top level section 2: FX2_LOAD_RAW  %%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

if 1

    

    %%% This is the second section in a series of routines to analyze

    %%% force-extension data taken with the new multi bead code for MT

    %%% (J. P. Cnossen, D. Dulin and N. H. Dekker Rev Sci Instrum 85, (2014).)

    %%%

    %%% This section is used to load the data for the force-extension

    %%% measurements, namely the large matrix of position traces for different

    %%% magnet heights.

    %%%

    %%% The script assumes that you have determined the z-offsets previously and

    %%% loads them z-offsets from a file

    %%%

    %%% Author: Jan Lipfert

    %%% Date: 2013-09-16

    

    clear all; clc; close all;

    

    

    %%% Index for each data set

    DATA = 1;

    

    

    %%% Write here some descriptive text about your data

    %%% ---

    %%% Example of force extension data

    %%% 21 kbp DNA, M270 beads, 1 mm gap verticaly oriented magnets

    if DATA ==1

        traces_file = 'bead.txt';

        motors_file = 'bead_motors.txt';

        zoffsets_file = 'FX_offsets.txt';

        Nref = 1;

        F_IND = 1; %%% whether to use x or y (1=x, 2=y)

        freq = 60; %%% Acquisition frequency in Hz

    end

    %% 읽을 파일 및 자석의 정렬방향, 카메라 속도 설정 

   %% (우리 셋업은 x축 방향으로 자석 정렬, 60Hz로 이미지 취득)

    

    

    

    

    %%%--- Read in the previously determined z-offsets from file

    zoff_data = load(zoffsets_file);

    zoffsets = zoff_data(:,2);

    %% 1번 함수에서 만들어 둔 바닥면에 대한 정보 취득

    

    %%%--- Read in data ---

    data = load(traces_file);

    zmag = load(motors_file);

    

    Nbeads = 1;

    %% data 및 자석에 대한 정보 loading

    

    %%%--- Parse the bead data ---

    for i=1:Nbeads

        display(['Parsing data for bead ' num2str(i) ' of ' num2str(Nbeads)])

        bead(i).time = 1:length(data(:,1));

        bead(i).time = bead(i).time/freq;% ????????

        bead(i).x = data(:,1);

        bead(i).y = data(:,2);

        bead(i).z = data(:,3);

        

    end

    %% 시간 설정 및 data 할당

    

    %%% Subtract previously determined z-offsets

    if 1

        if length(zoffsets) == Nbeads

            for i=1:Nbeads

                %bead(i).z = bead(i).z - zoffsets(i);

                bead(i).z = zoffsets(i)- bead(i).z ; % max(z) -Z ; our setup

                %bead(i).z = (zoffsets(i)- bead(i).z)*0.878 ; % max(z) -Z ; our setup

            end

            display('Subtracted pre-determined z-offsets.')

        else

            display(['Number of beads in the big data file (' num2str(Nbeads) ') does not agree with the number of beads in the zoffset file (' num2str(length(zoffsets)) ')'])

        end

    end

    %% 읽어둔 바닥면 정보 이용하여 z축 길이 결정

    

end



'Study > Magnetic tweezers' 카테고리의 다른 글

FX4_ANALYZE_Lp_Lc  (0) 2018.04.12
FX3_ANALYZE  (0) 2018.04.12
FX1_DETERMINE_ZOFFSET  (0) 2018.04.12
force analysis Matlab code by Nynke Dekker lab(2014-Dec-3)  (0) 2018.04.12
장비 세부 내역  (0) 2018.04.06
posted by 환무