From 6ffba77e07fa5d4dd477925bc0e224b313a39fbe Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <pedro.gonnet@durham.ac.uk>
Date: Tue, 30 Apr 2013 11:19:37 +0000
Subject: [PATCH] remove IC and replace with download script.

Former-commit-id: 7ebb39e3b5f1b3af7d1040046fd8963f13f4f544
---
 examples/CosmoVolume/extract.m | 40 ----------------------------------
 examples/CosmoVolume/getIC.sh  |  2 ++
 2 files changed, 2 insertions(+), 40 deletions(-)
 delete mode 100644 examples/CosmoVolume/extract.m
 create mode 100644 examples/CosmoVolume/getIC.sh

diff --git a/examples/CosmoVolume/extract.m b/examples/CosmoVolume/extract.m
deleted file mode 100644
index a362560d25..0000000000
--- a/examples/CosmoVolume/extract.m
+++ /dev/null
@@ -1,40 +0,0 @@
-
-% Remove any old data
-!rm -f *.txt
-
-% Loop over the input files
-range = [ Inf , -Inf ];
-avg = [ 0 , 0 , 0 ];
-count = 0;
-shift = [ 0 0 0 ];
-
-% Get the file name
-fname = 'snap_023_z000p503.hdf5';
-
-% Get the coordinates
-coord = double( h5read( fname , '/PartType0/Coordinates' )' );
-coord = coord - repmat( shift , size( coord , 1 ) , 1 );
-
-% Get the smoothing lengths
-h = double( h5read( fname , '/PartType0/SmoothingLength' ) );
-
-% Remove entries with too large smoothing lengths
-% ind = (h < 150);
-% coord = coord(ind,:);
-% h = h(ind);
-
-% Save the data
-save Coordinates.txt -ascii -double -append coord
-save SmoothingLength.txt -ascii -double -append h
-
-% Get some statistics
-count = size( coord , 1 );
-avg = sum( coord , 1 ) / count;
-range(1) = min( range(1) , min(min(coord)) );
-range(2) = max( range(2) , max(max(coord)) );
-    
-% Display some statistics
-disp( sprintf( 'read %i particles' , count ) );
-disp( sprintf( 'range of coords is [ %e , %e ]' , range(1) , range(2) ) );
-disp( sprintf( 'range of h is [ %e , %e ]' , min(h) , max(h) ) );
-disp( sprintf( 'avg position is [ %e , %e , %e ]' , avg(1) , avg(2) , avg(3) ) );
diff --git a/examples/CosmoVolume/getIC.sh b/examples/CosmoVolume/getIC.sh
new file mode 100644
index 0000000000..ebee5e63d5
--- /dev/null
+++ b/examples/CosmoVolume/getIC.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+wget http://www.dur.ac.uk/pedro.gonnet/cosmoVolume.hdf5
-- 
GitLab