diff --git a/requirements.txt b/requirements.txt index 88ebc95..5f0ed34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,6 @@ pyyaml==6.0.1 python-dotenv==1.0.0 prefect==2.13.4 astropy==5.3.4 +gpcam==8.1.7 BaselineRemoval==0.1.6 -gpcam==8.1.7 \ No newline at end of file +griffe >= 0.49.0, <1.0.0 \ No newline at end of file diff --git a/saxswaxs_workflows/flows/file_handling.py b/saxswaxs_workflows/flows/file_handling.py index b8af909..e223e1c 100644 --- a/saxswaxs_workflows/flows/file_handling.py +++ b/saxswaxs_workflows/flows/file_handling.py @@ -285,7 +285,8 @@ def add_scan_tiled(scan_filepath): chunks=((1679,), (1475,)), ) - if scan_filepath(".edf"): + # if scan_filepath(".edf"): + if scan_filepath.endswith(".edf"): metadata = parse_txt_accompanying_edf(scan_filepath) else: metadata = {} diff --git a/saxswaxs_workflows/flows/file_watcher.py b/saxswaxs_workflows/flows/file_watcher.py index af564c6..47ca29d 100644 --- a/saxswaxs_workflows/flows/file_watcher.py +++ b/saxswaxs_workflows/flows/file_watcher.py @@ -23,23 +23,23 @@ logger.addHandler(logging.StreamHandler()) -# parameters = JSON.load("2017-10-17-gisaxs-horizontal-cut").value -parameters = JSON.load("2017-10-23-gisaxs-horizontal-cut").value +# # parameters = JSON.load("2017-10-17-gisaxs-horizontal-cut").value +# parameters = JSON.load("2017-10-23-gisaxs-horizontal-cut").value async def post_file_created(dataset_path): logger.info(dataset_path) input_file_uri = add_scan_tiled(dataset_path) input_file_uri = input_file_uri.replace(TILED_BASE_URI, "") - parameters["input_uri_data"] = input_file_uri - logger.info(f"Scheduling flows with {input_file_uri}") - await _schedule( - deployment_name="horizontal_cut_automatic_fit/automatic_cut_and_fit", - flow_run_name=input_file_uri, - parameters=parameters, - ) - # also schedule latent_space_reductions - # await schedule_latent_space_reduction(input_file_uri) + # parameters["input_uri_data"] = input_file_uri + # logger.info(f"Scheduling flows with {input_file_uri}") + # await _schedule( + # deployment_name="horizontal_cut_automatic_fit/automatic_cut_and_fit", + # flow_run_name=input_file_uri, + # parameters=parameters, + # ) + # # also schedule latent_space_reductions + # # await schedule_latent_space_reduction(input_file_uri) async def watch_directory():