Skip to content

Commit

Permalink
Merge branch 'master' of github.com:marianux/ecg-kit
Browse files Browse the repository at this point in the history
  • Loading branch information
marianux committed Mar 14, 2016
2 parents 50e661f + 46fdfda commit b95ed23
Show file tree
Hide file tree
Showing 105 changed files with 539 additions and 35 deletions.
14 changes: 7 additions & 7 deletions InstallECGkit.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ function InstallECGkit(bIgnoreUpdate)


% MAC compatibility alert
if( ismac() )
disp_string_framed('*red', 'MAC is not fully supported at the moment');
fprintf(1, 'If you think you can help, please contact us through the %s at the project %s.\n\n', ...
'<a href = "matlab: web(''https://groups.google.com/forum/#!forum/ecg-kit-users'', ''-browser'' )">forum</a>', ...
'<a href = "matlab: web(''http://marianux.github.io/ecg-kit/'', ''-browser'' )">ecg-kit web''s page</a>' );
return
end
% if( ismac() )
% disp_string_framed('*red', 'MAC is not fully supported at the moment');
% fprintf(1, 'If you think you can help, please contact us through the %s at the project %s.\n\n', ...
% '<a href = "matlab: web(''https://groups.google.com/forum/#!forum/ecg-kit-users'', ''-browser'' )">forum</a>', ...
% '<a href = "matlab: web(''http://marianux.github.io/ecg-kit/'', ''-browser'' )">ecg-kit web''s page</a>' );
% return
% end

backup_string = 'ecg-kit_backup';

Expand Down
14 changes: 8 additions & 6 deletions common/init_WFDB_library.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

WFDB_paths = { ...
['wfdb' filesep 'linux-amd64' filesep ] ...
['wfdb' filesep 'macosx-x86_64' filesep 'bin' ] ...
['wfdb' filesep 'macosx-x86_64' filesep ] ...
['wfdb' filesep 'windows-amd64' filesep 'bin' ] ...
};
WFDB_UNIX_idx = 1;
Expand All @@ -38,18 +38,20 @@
path_sep = ';';
bin_path = WFDB_paths{WFDB_WIN_idx};

elseif( ismac() )
path_OS_var = 'PATH';
libpath_OS_var = 'DYLD_LIBRARY_PATH';
path_sep = ':';
bin_path = [ WFDB_paths{WFDB_MAC_idx} 'bin'];
lib_path = [ WFDB_paths{WFDB_MAC_idx} 'lib'];

elseif( isunix() )
path_OS_var = 'PATH';
libpath_OS_var = 'LD_LIBRARY_PATH';
path_sep = ':';
bin_path = [ WFDB_paths{WFDB_UNIX_idx} 'bin'];
lib_path = [ WFDB_paths{WFDB_UNIX_idx} 'lib64'];

elseif( ismac() )
path_OS_var = 'PATH';
path_sep = ':';
bin_path = WFDB_paths{WFDB_MAC_idx};

else
warning('Unknown system architecture. WFDB library QRS detectors probably won''t work.')
path_OS_var = 'PATH';
Expand Down
Binary file added common/rdsign212.mexmaci64
Binary file not shown.
Binary file added common/readannot.mexmaci64
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/a2m
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/ad2m
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/ahaecg2mit
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/ann2rr
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/annxml
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/bxb
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/calsig
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/coherence
Binary file not shown.
2 changes: 1 addition & 1 deletion common/wfdb/macosx-x86_64/bin/cshsetwfdb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
setenv WFDB ". ${HOME}/database /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//database /cdrom http://www.physionet.org/physiobank/database"
setenv WFDB ". ${HOME}/database /Users/mariano/wfdb//database /cdrom http://www.physionet.org/physiobank/database"
# Change www.physionet.org above to your favorite mirror if you wish
setenv WFDBCAL wfdbcal
Binary file modified common/wfdb/macosx-x86_64/bin/ecgeval
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/edf2mit
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/epicmp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/fft
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/fir
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/gqfuse
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/gqpost
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/gqrs
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/heaxml
Binary file not shown.
8 changes: 4 additions & 4 deletions common/wfdb/macosx-x86_64/bin/hrfft
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ do
done

if [ x$PLOT = x ]; then
if [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt
if [ -x /Users/mariano/wfdb//bin/plt ]; then
PLOT=/Users/mariano/wfdb//bin/plt
elif [ -x /usr/local/bin/plt ]; then
PLOT=/usr/local/bin/plt
elif [ -x /usr/bin/plt ]; then
PLOT=/usr/bin/plt
elif [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d
elif [ -x /Users/mariano/wfdb//bin/plot2d ]; then
PLOT=/Users/mariano/wfdb//bin/plot2d
elif [ -x /usr/local/bin/plot2d ]; then
PLOT=/usr/local/bin/plot2d
elif [ -x /usr/bin/plot2d ]; then
Expand Down
8 changes: 4 additions & 4 deletions common/wfdb/macosx-x86_64/bin/hrlomb
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ done


if [ x$PLOT = x ]; then
if [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt
if [ -x /Users/mariano/wfdb//bin/plt ]; then
PLOT=/Users/mariano/wfdb//bin/plt
elif [ -x /usr/local/bin/plt ]; then
PLOT=/usr/local/bin/plt
elif [ -x /usr/bin/plt ]; then
PLOT=/usr/bin/plt
elif [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d
elif [ -x /Users/mariano/wfdb//bin/plot2d ]; then
PLOT=/Users/mariano/wfdb//bin/plot2d
elif [ -x /usr/local/bin/plot2d ]; then
PLOT=/usr/local/bin/plot2d
elif [ -x /usr/bin/plot2d ]; then
Expand Down
8 changes: 4 additions & 4 deletions common/wfdb/macosx-x86_64/bin/hrmem
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ do
done

if [ x$PLOT = x ]; then
if [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt
if [ -x /Users/mariano/wfdb//bin/plt ]; then
PLOT=/Users/mariano/wfdb//bin/plt
elif [ -x /usr/local/bin/plt ]; then
PLOT=/usr/local/bin/plt
elif [ -x /usr/bin/plt ]; then
PLOT=/usr/bin/plt
elif [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d
elif [ -x /Users/mariano/wfdb//bin/plot2d ]; then
PLOT=/Users/mariano/wfdb//bin/plot2d
elif [ -x /usr/local/bin/plot2d ]; then
PLOT=/usr/local/bin/plot2d
elif [ -x /usr/bin/plot2d ]; then
Expand Down
8 changes: 4 additions & 4 deletions common/wfdb/macosx-x86_64/bin/hrplot
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ do
done

if [ x$PLOT = x ]; then
if [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plt
if [ -x /Users/mariano/wfdb//bin/plt ]; then
PLOT=/Users/mariano/wfdb//bin/plt
elif [ -x /usr/local/bin/plt ]; then
PLOT=/usr/local/bin/plt
elif [ -x /usr/bin/plt ]; then
PLOT=/usr/bin/plt
elif [ -x /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d ]; then
PLOT=/Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//bin/plot2d
elif [ -x /Users/mariano/wfdb//bin/plot2d ]; then
PLOT=/Users/mariano/wfdb//bin/plot2d
elif [ -x /usr/local/bin/plot2d ]; then
PLOT=/usr/local/bin/plot2d
elif [ -x /usr/bin/plot2d ]; then
Expand Down
Binary file modified common/wfdb/macosx-x86_64/bin/hrstats
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/ihr
Binary file not shown.
Binary file removed common/wfdb/macosx-x86_64/bin/libwfdb.10.5.20.dylib
Binary file not shown.
Binary file removed common/wfdb/macosx-x86_64/bin/libwfdb.10.5.24.dylib
Binary file not shown.
Binary file removed common/wfdb/macosx-x86_64/bin/libwfdb.10.dylib
Binary file not shown.
Binary file removed common/wfdb/macosx-x86_64/bin/libwfdb.dylib
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/log10
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/lomb
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/m2a
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/makeid
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/md2a
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/memse
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/mfilt
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/mit2edf
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/mit2wav
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/mrgann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/mxm
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/nguess
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/nst
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/parsescp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/plotstm
Binary file not shown.
2 changes: 1 addition & 1 deletion common/wfdb/macosx-x86_64/bin/pnwlogin
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi
rm -f .pnwhome
if [ -z "${WFDB+xxx}" ]
then
WFDB=". /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//database http://physionet.org/physiobank/database"
WFDB=". /Users/mariano/wfdb//database http://physionet.org/physiobank/database"
fi
WFDB="$WFDB https://physionet.org/works/\
https://physionet.org/users/$PNWUSER/works/"
Expand Down
Binary file modified common/wfdb/macosx-x86_64/bin/pscgen
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/pschart
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/psfd
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/rdann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/rdedfann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/rdsamp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/readid
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/revise
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/rr2ann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/rxr
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sampfreq
Binary file not shown.
2 changes: 1 addition & 1 deletion common/wfdb/macosx-x86_64/bin/setwfdb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
WFDB=". ${HOME}/database /Users/admin/Documents/workspace/wfdb-app-toolbox/mcode/nativelibs/macosx/build//database /cdrom http://www.physionet.org/physiobank/database"; export WFDB
WFDB=". ${HOME}/database /Users/mariano/wfdb//database /cdrom http://www.physionet.org/physiobank/database"; export WFDB
: Change www.physionet.org above to your favorite mirror if you wish
WFDBCAL=wfdbcal; export WFDBCAL
Binary file modified common/wfdb/macosx-x86_64/bin/sigamp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sigavg
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/signame
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/signum
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/skewedit
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/snip
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sortann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sqrs
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sqrs125
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/stepdet
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sumann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/sumstats
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/tach
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/time2sec
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wabp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wav2mit
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdb-config
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdb2mat
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbcat
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbcollate
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbdesc
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbmap
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbsignals
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbtime
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wfdbwhich
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wqrs
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wrann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/wrsamp
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/xform
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/xmlann
Binary file not shown.
Binary file modified common/wfdb/macosx-x86_64/bin/xmlhea
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
1 change: 1 addition & 0 deletions common/wfdb/macosx-x86_64/lib/libwfdb.10.dylib
1 change: 1 addition & 0 deletions common/wfdb/macosx-x86_64/lib/libwfdb.dylib
186 changes: 186 additions & 0 deletions common/wfdb/macosx-x86_64/lib/ps/12lead.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
% file: 12lead.pro G. Moody 20 May 2000
% Last revised: 7 October 2000

% -----------------------------------------------------------------------------
% prolog for pschart output of 12-lead ECGs (based on pschart.pro)
% Copyright (C) 2000 George B. Moody

% This program is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation; either version 2 of the License, or (at your option) any later
% version.

% This program is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
% more details.

% You should have received a copy of the GNU General Public License along with
% this program; if not, write to the Free Software Foundation, Inc., 59 Temple
% Place - Suite 330, Boston, MA 02111-1307, USA.

% You may contact the author by e-mail ([email protected]) or postal mail
% (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software,
% please visit PhysioNet (http://www.physionet.org/).
% _____________________________________________________________________________

% Note: lines beginning with `%' and empty lines in this file are stripped by
% `pschart' before printing. Four lines immediately below begin with spaces
% and are not stripped.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If this message appears in your printout, you may be using a buggy version %
% of Adobe TranScript. Try using pschart with the -u option as a workaround. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

save 100 dict begin /pschart exch def

% printer resolution (dots per inch; reset by newpage, see below)
/dpi 300 def

% basic line width (may be reset by newpage)
/lw 0 def

% line width in mm for signals, grid lines, marker bars
/lwmm 0 def

% TM for text
/tm matrix currentmatrix def

% TM for graphics
/gm matrix currentmatrix def

% x mm: convert x (in mm) to Postscript points (assuming default scales)
/mm {72 mul 25.4 div}def

% n I: use italic font, n points
/I {/Times-Italic findfont exch scalefont setfont}def

% n R: use roman font, n points
/R {/Times-Roman findfont exch scalefont setfont}def

% n C: use courier (monospaced) font, n points
/C {/Courier findfont exch scalefont setfont}def

% x0 y0 x1 y1 xtick ytick grid: print a grid with the lower corner at (x0, y0),
% the upper corner at (x1, y1), and ticks at intervals of xtick and ytick (in
% mm); the units of x0, y0, x1, and y1 are printer coordinates.
/grid { newpath 0 setlinecap
/dy1 exch dpi 25.4 div mul def /dy2 dy1 5 mul def
/dx1 exch dpi 25.4 div mul def /dx2 dx1 5 mul def
/y1 exch def /x1 exch def /y0 exch def /x0 exch def
dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto
closepath stroke lw setlinewidth
y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for
x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for
[ lw dx1 lw sub lw dx1 2 mul lw sub lw dx1 lw sub lw dx1 lw sub ] dx1 2 mul
setdash
y0 dy1 add dy1 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for
[] 0 setdash
}bind def

% alternate grid
% prints a 1 mv (10 yticks) x 200 ms (5 xticks) "calibration pulse" at
% the beginning of each trace, and also prints marker bars at the times when
% the signals change.
/Grid { newpath 0 setlinecap
/dy1 exch dpi 25.4 div mul def /dy2 dy1 5 mul def
/dx1 exch dpi 25.4 div mul def /dx2 dx1 5 mul def
/y1 exch def /x1 exch def /y0 exch def /x0 exch def
/dx3 dx1 5 mul def /dx4 dx2 12.5 mul def
/dy3 y1 y0 sub 8 div def /dy4 dy1 10 mul def
/x2 x0 dx3 sub def /x3 x2 dx1 sub def /x4 x0 dx4 add def
/y2 y0 dy3 add def /y3 y2 dy4 add def
lw 5 mul setlinewidth
newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto
stroke
/y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def
newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def
stroke
/y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def
newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def
stroke
/y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def
newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def
x4 y3 moveto x4 y4 lineto
stroke
lw 2 mul setlinewidth
}bind def

% pn x y prpn: print page number, pn, centered on (x, y) (in mm).
/prpn { mm exch mm exch moveto 10 R /pn exch def /str 10 string def
pn str cvs stringwidth exch -.5 mul exch rmoveto
(- ) stringwidth exch neg exch rmoveto
(- ) show
% `str show' should be sufficient, but LaserWriters print extra spaces at end
pn str cvs show
( -) show } def

% str x y prco: print copyright message, str, beginning at (x, y) (in mm).
/prco { mm exch mm exch moveto
6 R (Copyright ) show
/Symbol findfont 6 scalefont setfont (\323) show
6 R show } def

% dpi newpage: start page, resolution dpi dots per inch
/newpage {/dpi exch def tm setmatrix newpath [] 0 setdash
1 setlinecap /lw lwmm mm def mark } def

% ss: set scales for plotting
/ss {72 dpi div dup scale /gm matrix currentmatrix def lw setlinewidth} def

% str t: print str starting at current position (label(str))
/t {tm setmatrix show gm setmatrix}def

% str b: print str ending at current position (rlabel(str))
/b {tm setmatrix dup stringwidth exch neg exch rmoveto currentpoint 3 -1 roll
show moveto gm setmatrix}def

% x y m: set current position to (x,y) (move(x,y))
/m {newpath moveto}def

% x y N: draw line segment from current position to (x,y), set current position
% to (x,y) (cont(x,y))
/N {rlineto currentpoint stroke moveto}bind def

% str z: decode str and draw connected line segments (see cont() in pschart.c)
/z {{counttomark 2 ge{79 sub rlineto}{126 exch sub}ifelse}forall
currentpoint stroke moveto}bind def

% default ordinate for annotation plotting
/ay 0 def

% y Ay: set ay
/Ay {/ay exch def}def

% ordinates for marker bars
/ya 0 def
/yb 0 def
/yc 0 def
/yd 0 def

% ya yb yc yd sb: set ordinates for marker bars
/sb {/yd exch def /yc exch def /yb exch def /ya exch def}def

% ya yb Sb: set ordinates for short marker bars
/Sb {/yb exch def /ya exch def /yc yb def /yd yb def}def

% x mb: draw marker bars at x
/mb { dup ya newpath moveto dup yb lineto dup yc moveto yd lineto
stroke}bind def

% str x a: plot str at (x, ay), with marker bars if defined
/a {ya yb ne {dup mb}if ay m t}bind def

% x A: plot a bullet (normal QRS annotation) at (x, ay)
/A {ya yb ne {dup mb}if ay m (\267) t}bind def

/endpschart {cleartomark showpage pschart end restore}def
Loading

0 comments on commit b95ed23

Please sign in to comment.