Transfer the data from databroker into a correct format following the shape of 2D scan. This function is used at TES beamline for step scan. Save the new data dictionary to hdf5 file if needed. .. note:: It is recommended to read data from databroker into memory dire
(
run_id_uid,
fpath,
create_each_det=False,
fname_add_version=False,
completed_scans_only=False,
successful_scans_only=False,
file_overwrite_existing=False,
output_to_file=True,
save_scaler=True,
catalog=None,
)
| 2703 | |
| 2704 | |
| 2705 | def map_data2D_tes_tiled( |
| 2706 | run_id_uid, |
| 2707 | fpath, |
| 2708 | create_each_det=False, |
| 2709 | fname_add_version=False, |
| 2710 | completed_scans_only=False, |
| 2711 | successful_scans_only=False, |
| 2712 | file_overwrite_existing=False, |
| 2713 | output_to_file=True, |
| 2714 | save_scaler=True, |
| 2715 | catalog=None, |
| 2716 | ): |
| 2717 | """ |
| 2718 | Transfer the data from databroker into a correct format following the |
| 2719 | shape of 2D scan. |
| 2720 | This function is used at TES beamline for step scan. |
| 2721 | Save the new data dictionary to hdf5 file if needed. |
| 2722 | |
| 2723 | .. note:: |
| 2724 | |
| 2725 | It is recommended to read data from databroker into memory |
| 2726 | directly, instead of saving to files. This is ongoing work. |
| 2727 | |
| 2728 | Parameters |
| 2729 | ---------- |
| 2730 | run_id_uid : int |
| 2731 | ID or UID of a run |
| 2732 | fpath: str |
| 2733 | path to save hdf file |
| 2734 | create_each_det: bool, optional |
| 2735 | Do not create data for each detector if data size is too large, |
| 2736 | if set as False. This will slow down the speed of creating an hdf5 file |
| 2737 | with large data size. |
| 2738 | fname_add_version : bool |
| 2739 | True: if file already exists, then file version is added to the file name |
| 2740 | so that it becomes unique in the current directory. The version is |
| 2741 | added to <fname>.h5 in the form <fname>_(1).h5, <fname>_(2).h5, etc. |
| 2742 | False: then conversion fails. |
| 2743 | completed_scans_only : bool |
| 2744 | True: process only completed scans (for which ``stop`` document exists in |
| 2745 | the database). Failed scan for which ``stop`` document exists are considered |
| 2746 | completed even if not the whole image was scanned. If incomplete scan is |
| 2747 | encountered: an exception is thrown. |
| 2748 | False: the feature is disabled, incomplete scan will be processed. |
| 2749 | file_overwrite_existing : bool, keyword parameter |
| 2750 | This option should be used if the existing file should be deleted and replaced |
| 2751 | with the new file with the same name. This option should be used with caution, |
| 2752 | since the existing file may contain processed data, which will be permanently deleted. |
| 2753 | True: overwrite existing files if needed. Note, that if ``fname_add_version`` is ``True``, |
| 2754 | then new versions of the existing file will always be created. |
| 2755 | False: do not overwrite existing files. If the file already exists, then the exception |
| 2756 | is raised. |
| 2757 | output_to_file : bool, optional |
| 2758 | save data to hdf5 file if True |
| 2759 | catalog |
| 2760 | reference to databroker catalog |
| 2761 | |
| 2762 | Returns |
no test coverage detected