-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bruno Quint
committed
Jul 20, 2017
1 parent
3ba0c96
commit 01736f0
Showing
6 changed files
with
255 additions
and
30 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
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,39 @@ | ||
#!python | ||
|
||
import os | ||
import sys | ||
import time | ||
|
||
import argparse | ||
import fp_tools | ||
|
||
|
||
# Parse command line arguments | ||
parser = argparse.ArgumentParser( | ||
description="Oversample the data-cube in the Z direction using linear " | ||
"interpolation.") | ||
|
||
parser.add_argument('input_cube', type=str, help="Input cube.") | ||
|
||
parser.add_argument('output_cube', type=str, help="Output cube.") | ||
|
||
parser.add_argument('oversample_factor', type=int, help="Oversample factor.") | ||
|
||
args = parser.parse_args() | ||
|
||
# Check before running | ||
if not os.path.exists(args.input_cube): | ||
print("\n Input file does not exists: %s\n Leaving now." % args.input_cube) | ||
sys.exit(1) | ||
|
||
if os.path.exists(args.output_cube): | ||
print("\n Output file exists: %s" % args.output_cube) | ||
print(" Delete it before running this.\n Leaving now.") | ||
sys.exit(1) | ||
|
||
# Running scripts | ||
fp_repeat = fp_tools.tools_3d.ZOversample(args.input_cube, args.output_cube, | ||
args.oversample_factor) | ||
|
||
fp_repeat.start() | ||
fp_repeat.join() |
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