@@ -680,8 +680,9 @@ def spline_warp_estimate(
680
680
if "creation_date" in self .correction :
681
681
datestring = datetime .fromtimestamp (
682
682
self .correction ["creation_date" ],
683
- ).strftime
684
- ("%m/%d/%Y, %H:%M:%S" ,)
683
+ ).strftime (
684
+ "%m/%d/%Y, %H:%M:%S" ,
685
+ )
685
686
logger .info (
686
687
"No landmarks defined, using momentum correction parameters "
687
688
f"generated on { datestring } " ,
@@ -1873,6 +1874,7 @@ def append_k_axis(
1873
1874
new_x_column : str = None ,
1874
1875
new_y_column : str = None ,
1875
1876
calibration : dict = None ,
1877
+ suppress_output : bool = False ,
1876
1878
** kwds ,
1877
1879
) -> tuple [pd .DataFrame | dask .dataframe .DataFrame , dict ]:
1878
1880
"""Calculate and append the k axis coordinates (kx, ky) to the events dataframe.
@@ -1892,6 +1894,8 @@ def append_k_axis(
1892
1894
momentum calibration. Defaults to config["momentum"]["ky_column"].
1893
1895
calibration (dict, optional): Dictionary containing calibration parameters.
1894
1896
Defaults to 'self.calibration' or config["momentum"]["calibration"].
1897
+ suppress_output (bool, optional): Option to suppress output of diagnostic information.
1898
+ Defaults to False.
1895
1899
**kwds: Keyword parameters for momentum calibration. Parameters are added
1896
1900
to the calibration dictionary.
1897
1901
@@ -1938,6 +1942,12 @@ def append_k_axis(
1938
1942
if len (kwds ) > 0 :
1939
1943
raise TypeError (f"append_k_axis() got unexpected keyword arguments { kwds .keys ()} ." )
1940
1944
1945
+ if "creation_date" in calibration and not suppress_output :
1946
+ datestring = datetime .fromtimestamp (calibration ["creation_date" ]).strftime (
1947
+ "%m/%d/%Y, %H:%M:%S" ,
1948
+ )
1949
+ logger .info (f"Using momentum calibration parameters generated on { datestring } " )
1950
+
1941
1951
try :
1942
1952
(df [new_x_column ], df [new_y_column ]) = detector_coordinates_2_k_coordinates (
1943
1953
r_det = df [x_column ],
0 commit comments