From 897baaf1a7fff737f7cbc476e93edcc6f414d03f Mon Sep 17 00:00:00 2001 From: caes Date: Wed, 29 Jun 2016 19:43:42 -0400 Subject: [PATCH] renamed raw lightcurve data --- .../{raw_lightcurves.csv => lightcurves.csv} | 0 .../{raw_lightcurves.tab => lightcurves.tab} | 0 scripts/round_time.pl | 41 ------------------- 3 files changed, 41 deletions(-) rename data/STORM/raw/{raw_lightcurves.csv => lightcurves.csv} (100%) rename data/STORM/raw/{raw_lightcurves.tab => lightcurves.tab} (100%) delete mode 100755 scripts/round_time.pl diff --git a/data/STORM/raw/raw_lightcurves.csv b/data/STORM/raw/lightcurves.csv similarity index 100% rename from data/STORM/raw/raw_lightcurves.csv rename to data/STORM/raw/lightcurves.csv diff --git a/data/STORM/raw/raw_lightcurves.tab b/data/STORM/raw/lightcurves.tab similarity index 100% rename from data/STORM/raw/raw_lightcurves.tab rename to data/STORM/raw/lightcurves.tab diff --git a/scripts/round_time.pl b/scripts/round_time.pl deleted file mode 100755 index 5122ccc..0000000 --- a/scripts/round_time.pl +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/local/bin/perl -use feature say; -use utf8; -use feature qw/switch/; -open(my $file,$ARGV[0]) or die("could not open file"); - -$keep = 1; -# Add two because need to read more digits for rounding. -$keep += 2; -$throw = 5 - $keep; - -<$file>; -while (<$file>) { - $_ =~ /^.{8}\s+([0-9]{4})\s+([0-9]{5})\.([0-9]{$keep})[0-9]{$throw}(.*)/; - $Ī» = $1; - $tš“ƒ = $2; # characteristic - $tšœ€ = $3; # mantissa - $vals = $4; - if ($tšœ€ =~ /([0-9])([0-9])([0-9])/) { - $tšœ€ = $1; - given($2) { - when (/[6-8]/) { $tšœ€ += 1; } - when (/5/) { $tšœ€ += 1 if (!($2 == 0)); } - } - if ($tšœ€ > 9) { - $tš“ƒ += 1; - $tšœ€ = 0; - } - # For rounding when even rules - #say $2 % 2; - #if (!($2%2 == 0) ) { - # $tšœ€ = $tšœ€ + 1; - #} - } - else { - die "Malformed data encountered"; - } - say "$Ī»\t$tš“ƒ.$tšœ€$vals"; -} -close($file); -