clatlan / cdiutils

A python package to help Coherent Diffraction Imaging (CDI) practitioners in their analysis.
MIT License
12 stars 7 forks source link

modes output not parsed from the parametre liste #44

Open Abd-zak opened 7 months ago

Abd-zak commented 7 months ago

The mode output file is always save to "mode.h5" without taking into account the gived name "reconstruction_file"

Suggestion: https://github.com/clatlan/cdiutils/blob/d2fb014663ec1bdeef35928b3954f056f573f7f2/cdiutils/process/pipeline.py#L766

        mode_output_file=self.params["cdiutils"]["metadata"]["reconstruction_file"]
        run_command = (
            f"cd {self.pynx_phasing_dir};"
            f"{pynx_analysis_path} candidate_*.cxi modes=1 "
            f"modes_output={mode_output_file}"
            " 2>&1 | tee mode_decomposition.log"
        )

https://github.com/clatlan/cdiutils/blob/d2fb014663ec1bdeef35928b3954f056f573f7f2/cdiutils/process/pipeline.py#L827

            if self.parameter_file_path is not None:
                pretty_print("Scan parameter file updated.")
                if self.backend == "bcdi":
                    update_parameter_file(
                        self.parameter_file_path,
                        {"reconstruction_files":
                            f"{self.pynx_phasing_dir}{mode_output_file}"}
                    )
                else:
                    update_parameter_file(
                        self.parameter_file_path,
                        {"reconstruction_file":
                            f"{self.pynx_phasing_dir}{mode_output_file}"}
                    )