Skip to content
Snippets Groups Projects
Commit 162bc90f authored by David P. Mayer's avatar David P. Mayer Committed by jlaura
Browse files

Remove half pixel shift from bin scripts in light of #127 (#136)

parent 3c276a43
No related branches found
No related tags found
No related merge requests found
......@@ -18,13 +18,13 @@ from plio.utils.utils import find_in_dict, split_all_ext
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('cnet_file', help='Path to an isis control network.')
parser.add_argument('cnet_file', help='Path to an ISIS control network.')
parser.add_argument('e_radius', type=float, help='The semimajor radius of a given target.')
parser.add_argument('eccentricity', type=float, help='The eccentricity of a given target.')
parser.add_argument('cub_list', help='Path to a list file of all cubes being used. This \
includes file paths an extnsions.')
includes file paths and extensions.')
parser.add_argument('out_gpf', help='Path to save location of gpf file and new ipf files.')
parser.add_argument('--adjusted', help='Flag for saving apriori values or adjusted values',
parser.add_argument('--adjusted', help='Flag to save adjusted values instead of a priori values.',
default=False, required = False)
return parser.parse_args()
......@@ -123,8 +123,8 @@ def fix_sample_line(record, serial_dict, cub_dict):
line_size = find_in_dict(cube, 'Lines')
sample_size = find_in_dict(cube, 'Samples')
new_line = record['l.'] - (int(line_size / 2.0)) - 1
new_sample = record['s.'] - (int(sample_size / 2.0)) - 1
new_line = record['l.'] - (int(line_size / 2.0)) - 0.5
new_sample = record['s.'] - (int(sample_size / 2.0)) - 0.5
return new_line, new_sample
......
......@@ -63,8 +63,8 @@ def line_sample_size(record, path):
break
line_size = int(line_size)/2.0 + record['l.'] + 1
sample_size = int(sample_size)/2.0 + record['s.'] + 1
line_size = int(line_size)/2.0 + record['l.'] + 0.5
sample_size = int(sample_size)/2.0 + record['s.'] + 0.5
return sample_size, line_size, img_index
def get_axis(file):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment