Skip to content

Commit

Permalink
add nthreads to build data list functions and plot argparser
Browse files Browse the repository at this point in the history
  • Loading branch information
Cleveland committed Feb 5, 2024
1 parent 7b3fb2b commit ade1405
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions opppy/interactive_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def get_interactive_plot_parser(self):
parser.add_argument('-p','--plot', dest='plot', help='re-open plot', nargs='?', type=bool, const=True, default=False)
parser.add_argument('-l','--labels', dest='legend_labels', help='specify the legend labels [line1_label, line2_label,...]', type=str, nargs='+')
parser.add_argument('-rs','--resize', dest='plot_size', help='specify the plot size [x_size, y_size]', type=float, nargs=2)
parser.add_argument('-nt','--nthreads', dest='nthreads', help='Number of threads to use during parsing', nargs='?', type=int, default=0)

add_plot_options(parser)
return parser
Expand Down
4 changes: 2 additions & 2 deletions opppy/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def thread_all(file_name, file_index, result_l):
print('')
print_dictionary_data(data)

def build_output_dictionary_list(file_lists, opppy_parser):
def build_output_dictionary_list(file_lists, opppy_parser, nthreads):
'''
append_pickle -
This function generates a opppy output dictionary
Expand All @@ -412,7 +412,7 @@ def build_output_dictionary_list(file_lists, opppy_parser):
# build a new dictionary
data = {}
data['version'] = __version__
append_output_dictionary(data, output_files, opppy_parser)
append_output_dictionary(data, output_files, opppy_parser, nthreads=nthreads)
dictionary_data.append(data)


Expand Down
4 changes: 2 additions & 2 deletions opppy/tally.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def thread_all(file_name, file_index, result_l):
print('')
print_tally_data(data)

def build_tally_dictionary_list(file_lists, opppy_parser):
def build_tally_dictionary_list(file_lists, opppy_parser, nthreads):
'''
append_pickle -
This function generates a opppy output dictionary
Expand All @@ -312,7 +312,7 @@ def build_tally_dictionary_list(file_lists, opppy_parser):
# build a new dictionary
data = {}
data['version'] = __version__
append_tally_dictionary(data, output_files, opppy_parser)
append_tally_dictionary(data, output_files, opppy_parser, nthreads=nthreads)
dictionary_data.append(data)


Expand Down

0 comments on commit ade1405

Please sign in to comment.