------------------------------------------------------------- UPDATED CONVERSION PL SCRIPT -- 022303 -- requires perl, run under unix or cygwin 1. cd working dir with perl access 2. open cardiopro export file and remove first line of alpha text 3. close cardiopro file 4. ./zeroshifter.pl (enter filename of cardiopro export file) 5. zero shifted file has prefix adj-(oldfilename) SCRIPT :: $ more ./zero-shift.pl #!/usr/bin/perl print "Zero base shifter. Enter name of file to mod: "; $count = 0; $infile = ; chop $infile; open(IN, "<$infile"); open(OUT, ">adj-$infile"); while() { chop; @nums = split(/,/,); $nums[0] += 5; $count = $count + 1; print OUT join(",",$count,@nums)."\n"; } close(OUT); close(IN); ------------------------------------------------------------- CONVERTING CARDIOPRO EXPORT FILES TO NEATVIEW USABLE Having exported cardiopro to a comma separated value file, we are faced with a problem with the first field. The neattools csv readers require the first field to be an integer corresponding to the record number. Importing a cardiopro file into excel is fine as long as it does not have more than 65536 records. Anything over that and excel complains and falls apart As with the case of the 15 minute data recording, (corresponding to 253561 records) life gets too complicated for excel. SOLUTION 1. Get textpad http://www.textpad.com/download/ 2. Open cardiopro file 3. Remove first line alpha text header 4. Insert line numbers into each line (Global replace of start of line with incremental number) (make sure to include your comma in your replace regex :) ( "\i," without the quotes ) from the textpad helpfiles:: HOw to insert line numbers To insert consecutive line numbers at the start of each line: 1. From the Search menu, choose Replace; 2. In the Find What box type "^" (without the quotes); 3. In the Replace With box, type "\i " (without the quotes), if the line numbers start at 1, or "\i(100) ", if they start at 100, etc.; 4. Check the Regular Expression box; 5. Click Replace All. SHIFTING THE BASELINE: seatory: #!/usr/bin/perl seatory: while () { seatory: chop; seatory: @nums = split(/,/); seatory: map { $_++; } @nums; seatory: print join(",", @nums)."\n"; seatory: } seatory: then you can: seatory: hangon seatory: you only want to add 1 to the 2nd number seatory: make that "map" line: $nums[1]++; seatory: $nums[1] += 5; seatory: #!/usr/bin/perl while() { chop; @nums = split(/,/); $nums[1] += 5; print join(",", @nums)."\n"; } # ############################################## # file to std out # seatory: #!/usr/bin/perl open(FILE, ") { chop; @nums = split(/,/); $nums[1] += 5; print join(",", @nums)."\n"; } close(FILE); # ############################################## # input file to output file # seatory:#!/usr/bin/perl open(IN, "somefile"); while() { chop; @nums = split(/,/); $nums[1] += 5; print OUT join(",", @nums)."\n"; } close(OUT); close(IN);