Skip to content

Commit

Permalink
construct subtractor in factory(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
jklynch committed Sep 1, 2020
1 parent 5e6155b commit 8bf1143
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pdf_workers/dark_subtractor_tiff_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def my_filename(out, my_samplename, my_iter):


##def export_subtracted_tiff_series(header, file_path, *args, **kwargs):
def export_subtracted_tiff_series(name, doc, export_dir, my_sample_name):
def export_subtracted_tiff_series(name, doc, export_dir, my_sample_name, subtractor):
print(f"export_subtracted_tiff_series name: {name}")
out = []
subtractor = DarkSubtraction("pe1c_image")
##subtractor = DarkSubtraction("pe1c_image")
##my_samplename = None
file_written_list = []
export_dir_path = Path(export_dir) / Path(my_sample_name)
Expand Down Expand Up @@ -235,13 +235,15 @@ def main():


def start(export_dir, kafka_bootstrap_servers, kafka_topics):
def factory(name, start_doc, export_dir):
def factory(name, start_doc, export_dir_):
my_sample_name = start_doc["md"]
subtractor = DarkSubtraction("pe1c_image")
return [
partial(
export_subtracted_tiff_series,
export_dir=export_dir,
export_dir=export_dir_,
my_sample_name=my_sample_name,
subtractor=subtractor
)
], []

Expand Down

0 comments on commit 8bf1143

Please sign in to comment.