diff --git a/cal_tools/cal_tools/agipdlib.py b/cal_tools/cal_tools/agipdlib.py index 639697e0ec9125bf59952f3ae0b5f4cb120ada26..b3d7acb2e3ca37b2ad5d56504038a20ffc7153da 100644 --- a/cal_tools/cal_tools/agipdlib.py +++ b/cal_tools/cal_tools/agipdlib.py @@ -110,7 +110,7 @@ class AgipdCorrections: :param force_hg_if_below: set to a value different to None/0 to force a pixels gain to high, if the pixel value is below the given value after high gain offset subtraction. - :param corr_bools: A dict with all of the correction booleans selected or + :param corr_bools: A dict with all of the correction booleans requested or available """ self.agipd_base = h5_data_path.format(channel) @@ -1348,7 +1348,7 @@ class AgipdCorrections: (self.low_edges, self.high_edges, self.signal_edges, self.dig_signal_edges)) - def initialize_from_db(self, dbparms, qm, corr_bools, only_dark=False): + def initialize_from_db(self, dbparms, qm, only_dark=False): """ Initialize calibration constants from the calibration database :param dbparms: a tuple containing relevant database parameters, @@ -1369,9 +1369,6 @@ class AgipdCorrections: :param qm: quadrant and module of the constants to load in Q1M1 notation - :param corr_bools: a dict with bools for applying corrections - and can be used here to avoid retrieving unneeded - calibration parameters (e.g SlopesPC or SlopesFF). :param only_dark: load only dark image derived constants. This implies that a `calfile` is used to load the remaining constants. Useful to reduce DB traffic and interactions diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index 4c2208aaa82b55f5b31544c518a4fd3f18115268..630132842040e8f86dae1c23fb668f7b1c2d265b 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -103,12 +103,12 @@ "# Dont apply any corrections if only_offset is requested \n", "if not only_offset:\n", " \n", - " # Dont apply PC correction of only FF is requested\n", - " if not only_slopesff:\n", + " # Apply PC correction only if requested\n", + " if slopespc:\n", " corr_bools[\"SlopesPC\"] = only_slopespc\n", " \n", - " # Dont apply FF correction of only PC is requested\n", - " if not only_slopespc:\n", + " # Apply FF correction only if requested\n", + " if slopesff:\n", " corr_bools[\"SlopesFF\"] = only_slopesff\n", " \n", " corr_bools[\"adjust_mg_baseline\"] = adjust_mg_baseline\n", @@ -494,7 +494,7 @@ " except IOError:\n", " return\n", " if not nodb:\n", - " when = agipd_corr.initialize_from_db(dbparms, qm, corr_bools, only_dark=(fileparms != \"\"))\n", + " when = agipd_corr.initialize_from_db(dbparms, qm, only_dark=(fileparms != \"\"))\n", " if fileparms != \"\" and not corr_bools[\"only_offset\"]:\n", " agipd_corr.initialize_from_file(fileparms, qm, with_dark=nodb)\n", " print(\"Initialized constants\")\n",