Commit ea67f634 authored by Martin Schorb's avatar Martin Schorb
Browse files

finalize almost ready

parent 4aeb0ec4
Pipeline #22443 failed with stage
in 31 seconds
......@@ -27,8 +27,6 @@ from utils import pages,launch_jobs
from utils import helper_functions as hf
# element prefix
label = "BDV_finalize"
parent = "finalize"
......@@ -77,9 +75,6 @@ def n5export_execute_gobutton(click,jsonfile):
if jsonfile is None:
raise PreventUpdate
out = dict()
out['state'] = 'wait'
out['logfile'] = ''
with open(jsonfile,'r') as f:
export_json = json.load(f)
......@@ -108,10 +103,17 @@ def n5export_execute_gobutton(click,jsonfile):
stackparams = requests.get(url).json()
res = (stackparams['currentVersion']['stackResolutionX'],stackparams['currentVersion']['stackResolutionY'],stackparams['currentVersion']['stackResolutionZ'])
res = [stackparams['currentVersion']['stackResolutionX'],stackparams['currentVersion']['stackResolutionY'],stackparams['currentVersion']['stackResolutionZ']]
out = dict()
out['state'] = 'launch'
out['logfile'] = ''
mkxml_p = launch_jobs.run(target='standalone',pyscript='filetypes/make_xml.py',
run_args=n5file+' '+str(res),target_args='')
params.processes[parent].extend(mkxml_p)
return True, 'Input data file does not exist.', out
......@@ -2,7 +2,7 @@ from pybdv.metadata import write_xml_metadata, write_n5_metadata, validate_attri
import sys
def make_render_xml(path, scale_factors, resolution, unit):
def make_render_xml(path, scale_factors = 3 * [[2, 2, 2]], resolution = [0.05, 0.015, 0.015], unit = 'micrometer'):
xml_path = path.replace('.n5', '.xml')
attrs = {'channel': {'id': None}}
......@@ -22,15 +22,8 @@ def make_render_xml(path, scale_factors, resolution, unit):
if __name__ == '__main__':
# I don't have write permissions here
# p = '/g/emcf/schorb/render-output/test-3D-downsampling.n5'
# p = './test-giovanna_rigid.n5'
p=sys.argv[1]
scale_factors = 3 * [[2, 2, 2]]
unit = 'micrometer'
resolution = [0.05, 0.015, 0.015]
make_render_xml(p, scale_factors, resolution, unit)
p = sys.argv[1]
res = sys.argv[2]
make_render_xml(p, resolution = res)
......@@ -302,7 +302,7 @@ def canceljobs(job_ids):
def run(target='standalone',pyscript='thispyscript',json='JSON',run_args=None,target_args=None,logfile='/g/emcf/schorb/render-output/render.out',errfile='/g/emcf/schorb/render-output/render.err'):
def run(target='standalone',pyscript='thispyscript',json='',run_args=None,target_args=None,logfile=os.path.join(params.render_log_dir,'render.out'),errfile=os.path.join(params.render_log_dir,'render.err')):
my_env = os.environ.copy()
os.chdir(workdir)
command = '../'+target
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment