Skip to content

Commit

Permalink
changed default json location
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Feb 16, 2022
1 parent 99a2191 commit 6f6e5f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 8 additions & 3 deletions src/pyMBIR_UI/recon_HFIR_script_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import os
import json

STOP_FILE_NAME = "OVER.txt"


def main():

Expand Down Expand Up @@ -147,12 +149,15 @@ def main():

print('Starting MBIR..')
rec_mbir = np.float32(MBIR(proj_data, count_data, proj_params, miscalib, vol_params, rec_params))
import pyqtgraph as pg
pg.image(rec_mbir);
pg.QtGui.QApplication.exec_()
#import pyqtgraph as pg
#pg.image(rec_mbir);
#pg.QtGui.QApplication.exec_()
if input_dict["write_op"] == True:
dxchange.write_tiff_stack(rec_mbir, fname=input_dict["op_path"], start=z_start, overwrite=True)

# when done write stop file in batch mode
#if input_dict["running_mode"] == "batch":


if __name__ == "__main__":
main()
8 changes: 5 additions & 3 deletions src/pyMBIR_UI/reconstruction_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def run(self):
self.dictionary_of_arguments = dictionary_of_arguments

logging.info(f"-> Saving config file to be called from command line script")
with open("/home/j35/config_to_test_batch_mode.json", 'w') as json_file:
home_folder = os.path.abspath("~/")
json_file_name = os.path.join(home_folder, "config_batch_mode.json" )
with open(json_file_name, 'w') as json_file:
json.dump(dictionary_of_arguments, json_file)

current_location = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -175,8 +177,8 @@ def run(self):
proc = subprocess.Popen(['python',
script_exe,
'--input_json',
"/home/j35/config_to_test_batch_mode.json",
],
json_file_name,
],
shell=False)
self.batch_process_id = proc

Expand Down

0 comments on commit 6f6e5f1

Please sign in to comment.