Skip to content

[WIP] [io] fix NPYWriter&NPZWriter

payno requested to merge payno/nabu:fix_release_2020.3_npy_output into release_2020.3
  • fix sub-volume are saving in the same outputfile and overwrite the previous result.
    • I don't know who to include this in the existing code. We can create a 'start_index_end_index' .npy file and merge them at the end. But I don't know how we could merge them. Or we could create a file a rewrite it on each iteration. But I don't know how to detect the first sub volume... if possible (could bring issues for distribution...).
  • fix error: start_index missing original error was:
Processing sub-volume (0, 336)
Traceback (most recent call last):
  File "/nobackup/lbs191tmp1/tomwer/dev/orange3venv/bin/nabu", line 11, in <module>
    load_entry_point('nabu', 'console_scripts', 'nabu')()
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/resources/cli/reconstruct.py", line 104, in main
    R.reconstruct()
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/local_reconstruction.py", line 265, in reconstruct
    self._instantiate_pipeline_if_necessary(task, prev_task)
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/local_reconstruction.py", line 241, in _instantiate_pipeline_if_necessary
    self._instantiate_pipeline(current_task)
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/local_reconstruction.py", line 231, in _instantiate_pipeline
    phase_margin=task["phase_margin"]
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/fullfield_cuda.py", line 39, in __init__
    logger=logger, extra_options=extra_options, phase_margin=phase_margin
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/fullfield.py", line 66, in __init__
    self._init_pipeline()
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/fullfield.py", line 312, in _init_pipeline
    self._init_writer()
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/utils.py", line 20, in wrapper
    return func(*args, **kwargs)
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/fullfield.py", line 492, in _init_writer
    logger=self.logger, nx_info=nx_info
  File "/nobackup/lbs191tmp1/tomwer/dev/nabu/nabu/app/utils.py", line 93, in __init__
    self.writer = writer_cls(*writer_args, **writer_kwargs)
TypeError: __init__() got an unexpected keyword argument 'start_index'
Edited by payno

Merge request reports