-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from duncanmmacleod/hdf5
Added support for handling HDF5 files created by Omicron.exe
- Loading branch information
Showing
7 changed files
with
183 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) Duncan Macleod (2018) | ||
# | ||
# This file is part of LIGO-Omicron. | ||
# | ||
# LIGO-Omicron is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# LIGO-Omicron is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with LIGO-Omicron. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""Merge HDF5 files into one | ||
""" | ||
|
||
import os.path | ||
import argparse | ||
|
||
from omicron import (io, __version__) | ||
|
||
__author__ = 'Duncan Macleod <duncan.macleod@ligo.org>' | ||
|
||
parser = argparse.ArgumentParser(description=__doc__) | ||
parser.add_argument('-V', '--version', action='version', version=__version__) | ||
parser.add_argument('filename', nargs='+', help='file to merge') | ||
parser.add_argument('output', help='output file name') | ||
parser.add_argument('-d', '--remove-input', action='store_true', default=False, | ||
help='remove input files after writing output, ' | ||
'default: %(default)s') | ||
|
||
args = parser.parse_args() | ||
io.merge_hdf5_files(args.filename, args.output) | ||
|
||
# remove input files | ||
if args.remove_input: | ||
for f in args.filename: | ||
if os.path.samefile(f, args.output): | ||
continue | ||
os.remove(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ lalsuite | |
dqsegdb | ||
gwpy | ||
htcondor | ||
h5py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ | |
'dqsegdb', | ||
'gwpy', | ||
'python-ligo-lw >= 1.4.0', | ||
'h5py', | ||
] | ||
tests_require = [ | ||
'pytest', | ||
|