Commit 60111732 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Initial draft

parent 6e733890
Pipeline #253494 failed with stage
in 1 minute and 36 seconds
......@@ -154,6 +154,13 @@ class Input(object):
utils.check_directory_exists_and_if_not_mkdir(path)
return path
@property
def final_result_directory(self):
""" The path to the directory where final result output will be stored """
path = os.path.join(self._outdir, "final_result")
utils.check_directory_exists_and_if_not_mkdir(path)
return path
@property
def webdir(self):
utils.check_directory_exists_and_if_not_mkdir(self._webdir)
......
......@@ -6,6 +6,7 @@ from ..utils import BilbyPipeError, convert_string_to_tuple, logger
from .dag import Dag
from .nodes import (
AnalysisNode,
FinalResultNode,
GenerationNode,
MergeNode,
PESummaryNode,
......@@ -105,6 +106,7 @@ def generate_dag(inputs):
plot_nodes_list = []
for merged_node in merged_node_list:
FinalResultNode(inputs, merged_node, dag=dag)
if inputs.create_plots:
plot_nodes_list.append(PlotNode(inputs, merged_node, dag=dag))
if inputs.single_postprocessing_executable:
......
from .analysis_node import AnalysisNode
from .final_result_node import FinalResultNode
from .generation_node import GenerationNode
from .merge_node import MergeNode
from .pe_summary_node import PESummaryNode
......
from ..node import Node
class FinalResultNode(Node):
def __init__(self, inputs, parent_node, dag):
super().__init__(inputs)
self.dag = dag
self.request_cpus = 1
self.job_name = f"{parent_node.label}_final_results"
self.setup_arguments(
add_ini=False, add_unknown_args=False, add_command_line_args=False
)
self.arguments.add("result", parent_node.result_file)
self.arguments.add("outdir", "final_result")
self.arguments.add("extension", self.inputs.result_format)
self.arguments.add("max-samples", 10000)
self.arguments.add_flag("lightweight")
self.arguments.add_flag("save")
self.process_node()
self.job.add_parent(parent_node.job)
@property
def executable(self):
return self._get_executable_path("bilby_result")
@property
def request_memory(self):
return "4 GB"
@property
def log_directory(self):
return self.inputs.data_analysis_log_directory
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