Last change
on this file since 102 was
19,
checked in by gostiaux, 15 years ago
|
the private files have been moved down to the root folder
|
File size:
1000 bytes
|
Rev | Line | |
---|
[8] | 1 | %'read_imatext': reads the .civ file for image documentation (obsolete)
|
---|
| 2 | % fileinput: name of the documentation file
|
---|
| 3 | % time: matrix of times for the set of images
|
---|
| 4 | %pxcmx: scale along x in pixels/cm
|
---|
| 5 | %pxcmy: scale along y in pixels/cm
|
---|
| 6 | function [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext(fileinput);
|
---|
| 7 | error=0;%default
|
---|
| 8 | time=[]; %default
|
---|
| 9 | TimeUnit='s';
|
---|
| 10 | mode='pairs';
|
---|
| 11 | npx=[]; %default
|
---|
| 12 | npy=[]; %default
|
---|
| 13 | pxcmx=1;%default
|
---|
| 14 | pxcmy=1;%default
|
---|
| 15 | if exist(fileinput,'file')~=2, error=2, return;end;%input file does not exist
|
---|
| 16 | dotciv=textread(fileinput);
|
---|
| 17 | sizdot=size(dotciv);
|
---|
| 18 | if ~isequal(sizdot(1)-8,dotciv(1,1));
|
---|
| 19 | error=1; %inconsistent number of bursts
|
---|
| 20 | end
|
---|
| 21 | nbfield=sizdot(1)-8;
|
---|
| 22 | npx=(dotciv(2,1));
|
---|
| 23 | npy=(dotciv(2,2));
|
---|
| 24 | pxcmx=(dotciv(6,1));% pixels/cm in the .civ file
|
---|
| 25 | pxcmy=(dotciv(6,2));
|
---|
| 26 | % nburst=dotciv(3,1); % nbre of bursts
|
---|
| 27 | abs_time1=dotciv([9:nbfield+8],2);
|
---|
| 28 | dtime=dotciv(5,1)*(dotciv([9:nbfield+8],[3:end-1])+1);
|
---|
| 29 | timeshift=[abs_time1 dtime];
|
---|
| 30 | time=cumsum(timeshift,2); |
---|
Note: See
TracBrowser
for help on using the repository browser.