Commit bdeb29ce authored by Alex Breuer's avatar Alex Breuer

Added unit test HDF5 point sources.

parent bbb8fefe
......@@ -42,6 +42,9 @@
# NetCDF-files: Kinematic sources
*.nc filter=lfs diff=lfs merge=lfs -text
# HDF5 files: Point sources
*.h5 filter=lfs diff=lfs merge=lfs -text
# CDL-files (ASCII-versions of NetCDF files): Kinematic sources
*.cdl filter=lfs diff=lfs merge=lfs -text
......
[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)
To the extent possible under law, [Alexander Nikolas Breuer](http://dial3343.org) has waived all copyright and related or neighboring rights to the following work:
* `point_sources_2d_0.h5`
* `point_sources_2d_1.h5`
This work is published from: United States.
# Files for Source Input Unit Tests
This directory contains ASCII and binary HDF5 descriptions for unit tests of point sources.
```
./asciiToHdf5.sh
```
* Contact: Alex Breuer
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2018, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Converts the ASCII unit test sources to HDF5.
##
for base in point_sources_2d_0 point_sources_2d_1
do
args=""
for type in points scalings time_parameters time_pointers time_series
do
args="${args} ${base}_ascii/${type}.ascii -c ${base}_ascii/${type}.dmp"
done
rm ${base}.h5
h5import ${args} -o ${base}.h5 > /dev/null
done
PATH points
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 2 2
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
PATH scalings
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 2 5
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
PATH time_parameters
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 2 2
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
PATH time_pointers
INPUT-CLASS TEXTUIN
RANK 1
DIMENSION-SIZES 3
OUTPUT-CLASS UIN
OUTPUT-SIZE 64
OUTPUT-BYTE-ORDER LE
PATH time_series
INPUT-CLASS TEXTFP
RANK 1
DIMENSION-SIZES 8
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
0.2 0.7
0.25 -0.5
1.7 0.9
0.4 0.6
\ No newline at end of file
PATH points
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 4 2
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
PATH scalings
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 4 5
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
1.0 0.001
2.3 0.002
0.2 0.001
0.4 0.001
\ No newline at end of file
PATH time_parameters
INPUT-CLASS TEXTFP
RANK 2
DIMENSION-SIZES 4 2
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
PATH time_pointers
INPUT-CLASS TEXTUIN
RANK 1
DIMENSION-SIZES 5
OUTPUT-CLASS UIN
OUTPUT-SIZE 64
OUTPUT-BYTE-ORDER LE
0.0
0.1
0.2
0.1
0.15
0.0
0.3
0.2
0.0
0.3
0.4
0.5
0.0
0.2
0.5
\ No newline at end of file
PATH time_series
INPUT-CLASS TEXTFP
RANK 1
DIMENSION-SIZES 15
OUTPUT-CLASS FP
OUTPUT-SIZE 32
OUTPUT-ARCHITECTURE IEEE
OUTPUT-BYTE-ORDER LE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment