Commit 87517377 authored by emerit's avatar emerit
Browse files

replace netcdf by h5py, add missing third parties licences txt

parent f9be08b4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
- Python 3.9.* with pip
- ./scripts/pyaudio3dtools packages
- Numpy (pip install numpy)
- Netcdf4 (pip install netcdf4)
- H5py (pip install h5py)
- Scipy (pip install scipy) for ./scripts/pyaudio3dtools packages
- C/C++ compiler 
   - linux (ubuntu) :
+12 −11
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@

import numpy as np
import pyaudio3dtools
from netCDF4 import Dataset
import h5py
from typing import Tuple


@@ -48,13 +48,13 @@ def load(
    np.ndarray,
    np.ndarray,
]:
    hrtf = Dataset(filename, "r")
    Database_Name = hrtf.DatabaseName
    Listener_Short_Name = hrtf.ListenerShortName
    hrtf = h5py.File(filename, "r")
    Database_Name = hrtf.attrs["DatabaseName"]
    Listener_Short_Name = hrtf.attrs["ListenerShortName"]
    latencys = 0
    if "latencys" in hrtf.variables.keys():
        latencys = np.array(hrtf.variables["latencys"])
    Sampling_Rate = np.array(hrtf.variables["Data.SamplingRate"])
    if "latencys" in hrtf.keys():
        latencys = np.array(hrtf["latencys"])
    Sampling_Rate = np.array(hrtf["Data.SamplingRate"])
    if Sampling_Rate.size > 1:
        return (
            "",
@@ -70,9 +70,10 @@ def load(
        )
    Sampling_Rate = int(Sampling_Rate[0])
    ind_dir = 0
    Source_Position = np.array(hrtf.variables["SourcePosition"])
    Source_Position_hd5 = hrtf["SourcePosition"]
    Source_Position = np.array(Source_Position_hd5)
    unitToRad = [1.0, 1.0]
    Units = hrtf.variables["SourcePosition"].Units
    Units = str(Source_Position_hd5.attrs["Units"])
    if "degree" in Units:
        unitToRad[0] = np.pi / 180
        Units = Units.replace("degree,", "", 1)
@@ -95,8 +96,8 @@ def load(
            ind_dir_ptr[1] * unitToRad[1]
        )
        ind_dir = ind_dir + 1
    Data_Delay = np.array(hrtf.variables["Data.Delay"])
    Data_IR = np.array(hrtf.variables["Data.IR"])
    Data_Delay = np.array(hrtf["Data.Delay"])
    Data_IR = np.array(hrtf["Data.IR"])
    Data_IR_48khz = np.zeros(
        (
            Data_IR.shape[0],
+30 −0
Original line number Diff line number Diff line
Copyright (c) 2008 Andrew Collette and contributors
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.
+92 −0
Original line number Diff line number Diff line

Copyright Notice and License Terms for 
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------

HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 2006-2013 by The HDF Group.

NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.

All rights reserved.

Redistribution and use in source and binary forms, with or without 
modification, are permitted for any purpose (including commercial purposes) 
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 materials provided with the distribution.

3. In addition, redistributions of modified forms of the source or binary 
   code must carry prominent notices stating that the original code was 
   changed and the date of the change.

4. All publications or advertising materials mentioning features or use of 
   this software are asked, but not required, to acknowledge that it was 
   developed by The HDF Group and by the National Center for Supercomputing 
   Applications at the University of Illinois at Urbana-Champaign and 
   credit the contributors.

5. Neither the name of The HDF Group, the name of the University, nor the 
   name of any Contributor may be used to endorse or promote products derived 
   from this software without specific prior written permission from 
   The HDF Group, the University, or the Contributor, respectively.

DISCLAIMER: 
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS 
"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED.  In no 
event shall The HDF Group or the Contributors be liable for any damages 
suffered by the users arising out of the use of this software, even if 
advised of the possibility of such damage. 

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

Contributors:   National Center for Supercomputing Applications (NCSA) at 
the University of Illinois, Fortner Software, Unidata Program Center (netCDF), 
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip), 
and Digital Equipment Corporation (DEC).

-----------------------------------------------------------------------------

Portions of HDF5 were developed with support from the Lawrence Berkeley 
National Laboratory (LBNL) and the United States Department of Energy 
under Prime Contract No. DE-AC02-05CH11231.

-----------------------------------------------------------------------------

Portions of HDF5 were developed with support from the University of 
California, Lawrence Livermore National Laboratory (UC LLNL).  
The following statement applies to those portions of the product and must 
be retained in any redistribution of source code, binaries, documentation, 
and/or accompanying materials:

   This work was partially produced at the University of California, 
   Lawrence Livermore National Laboratory (UC LLNL) under contract 
   no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy 
   (DOE) and The Regents of the University of California (University) 
   for the operation of UC LLNL.

   DISCLAIMER: 
   This work was prepared as an account of work sponsored by an agency of 
   the United States Government. Neither the United States Government nor 
   the University of California nor any of their employees, makes any 
   warranty, express or implied, or assumes any liability or responsibility 
   for the accuracy, completeness, or usefulness of any information, 
   apparatus, product, or process disclosed, or represents that its use 
   would not infringe privately- owned rights. Reference herein to any 
   specific commercial products, process, or service by trade name, 
   trademark, manufacturer, or otherwise, does not necessarily constitute 
   or imply its endorsement, recommendation, or favoring by the United 
   States Government or the University of California. The views and 
   opinions of authors expressed herein do not necessarily state or reflect 
   those of the United States Government or the University of California, 
   and shall not be used for advertising or product endorsement purposes.
-----------------------------------------------------------------------------

+145 −0
Original line number Diff line number Diff line
Copyright Notice and License Terms for 
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------

HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 2006 by The HDF Group. 

NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by The Board of Trustees of the University of Illinois. 

All rights reserved.

Redistribution and use in source and binary forms, with or without 
modification, are permitted for any purpose (including commercial purposes) 
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 materials provided with the distribution.

3. Neither the name of The HDF Group, the name of the University, nor the 
   name of any Contributor may be used to endorse or promote products derived 
   from this software without specific prior written permission from 
   The HDF Group, the University, or the Contributor, respectively.

DISCLAIMER: 
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS 
"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO 
EVENT SHALL THE HDF GROUP OR THE CONTRIBUTORS BE LIABLE FOR ANY DAMAGES 
SUFFERED BY THE USERS ARISING OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
You are under no obligation whatsoever to provide any bug fixes, patches, or 
upgrades to the features, functionality or performance of the source code 
("Enhancements") to anyone; however, if you choose to make your Enhancements 
available either publicly, or directly to The HDF Group, without imposing a 
separate written license agreement for such Enhancements, then you hereby 
grant the following license: a non-exclusive, royalty-free perpetual license 
to install, use, modify, prepare derivative works, incorporate into other 
computer software, distribute, and sublicense such enhancements or derivative 
works thereof, in binary and source code form.

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

Limited portions of HDF5 were developed by Lawrence Berkeley National 
Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be
found here: COPYING_LBNL_HDF5 file in this directory or at 
http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. 

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

Contributors:   National Center for Supercomputing Applications (NCSA) at 
the University of Illinois, Fortner Software, Unidata Program Center 
(netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler 
(gzip), and Digital Equipment Corporation (DEC).

-----------------------------------------------------------------------------
 
Portions of HDF5 were developed with support from the Lawrence Berkeley 
National Laboratory (LBNL) and the United States Department of Energy 
under Prime Contract No. DE-AC02-05CH11231.

-----------------------------------------------------------------------------

Portions of HDF5 were developed with support from the University of 
California, Lawrence Livermore National Laboratory (UC LLNL).  
The following statement applies to those portions of the product and must 
be retained in any redistribution of source code, binaries, documentation, 
and/or accompanying materials:

   This work was partially produced at the University of California, 
   Lawrence Livermore National Laboratory (UC LLNL) under contract 
   no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy 
   (DOE) and The Regents of the University of California (University) 
   for the operation of UC LLNL.

   DISCLAIMER: 
   THIS WORK WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY AN AGENCY OF 
   THE UNITED STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT NOR 
   THE UNIVERSITY OF CALIFORNIA NOR ANY OF THEIR EMPLOYEES, MAKES ANY 
   WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY OR RESPONSIBILITY 
   FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, 
   APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE 
   WOULD NOT INFRINGE PRIVATELY- OWNED RIGHTS. REFERENCE HEREIN TO ANY 
   SPECIFIC COMMERCIAL PRODUCTS, PROCESS, OR SERVICE BY TRADE NAME, 
   TRADEMARK, MANUFACTURER, OR OTHERWISE, DOES NOT NECESSARILY CONSTITUTE 
   OR IMPLY ITS ENDORSEMENT, RECOMMENDATION, OR FAVORING BY THE UNITED 
   STATES GOVERNMENT OR THE UNIVERSITY OF CALIFORNIA. THE VIEWS AND 
   OPINIONS OF AUTHORS EXPRESSED HEREIN DO NOT NECESSARILY STATE OR REFLECT 
   THOSE OF THE UNITED STATES GOVERNMENT OR THE UNIVERSITY OF CALIFORNIA, 
   AND SHALL NOT BE USED FOR ADVERTISING OR PRODUCT ENDORSEMENT PURPOSES.

-----------------------------------------------------------------------------

HDF5 (Hierarchical Data Format 5)
Copyright (c) 2016, The Regents of the University of California, through 
Lawrence Berkeley National Laboratory (subject to receipt of any required 
approvals from the U.S. Dept. of Energy).

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 materials provided with the distribution.

3. Neither the name of the University of California, Lawrence Berkeley 
National Laboratory, U.S. Dept. of Energy 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 OWNER 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.

You are under no obligation whatsoever to provide any bug fixes, patches, 
or upgrades to the features, functionality or performance of the source 
code ("Enhancements") to anyone; however, if you choose to make your 
Enhancements available either publicly, or directly to Lawrence Berkeley 
National Laboratory, without imposing a separate written license agreement 
for such Enhancements, then you hereby grant the following license: 
a non-exclusive, royalty-free perpetual license to install, use, modify, 
prepare derivative works, incorporate into other computer software, 
distribute, and sublicense such enhancements or derivative works thereof, 
in binary and source code form.

-----------------------------------------------------------------------------
Loading