@@ -945,7 +945,7 @@ def depth_convert_cube(
945945 zmin : float | None = None ,
946946 zmax : float | None = None ,
947947 undefined : float = - 999.25 ,
948- method : Literal ["fft" , "linear" ] = "linear" ,
948+ method : Literal ["fft" , "linear" ] | None = None ,
949949 ) -> xtgeo .Cube :
950950 """Depth convert a cube (time to depth).
951951
@@ -964,13 +964,15 @@ def depth_convert_cube(
964964 for technical reasons.
965965
966966 """
967- warnings .warn (
968- "Default trace interpolation method will be set to 'fft' in the near "
969- "future. Explicitely set method='linear' to keep the same results: "
970- "vm.depth_convert_cube(incube, zinc, zmin, zmax, method='linear')." ,
971- category = FutureWarning ,
972- stacklevel = 2 ,
973- )
967+ if method is None :
968+ warnings .warn (
969+ "Default trace interpolation method will be set to 'fft' in the near "
970+ "future. Explicitly set method='linear' to keep the same results: "
971+ "vm.depth_convert_cube(incube, zinc, zmin, zmax, method='linear')." ,
972+ category = FutureWarning ,
973+ stacklevel = 2 ,
974+ )
975+ method = "linear"
974976
975977 return self ._domain_convert_cube (
976978 incube ,
@@ -989,7 +991,7 @@ def time_convert_cube(
989991 tmin : float | None = None ,
990992 tmax : float | None = None ,
991993 undefined : float = - 999.25 ,
992- method : Literal ["fft" , "linear" ] = "linear" ,
994+ method : Literal ["fft" , "linear" ] | None = None ,
993995 ) -> xtgeo .Cube :
994996 """Time convert a cube (depth to time).
995997
@@ -1008,13 +1010,15 @@ def time_convert_cube(
10081010 reasons.
10091011
10101012 """
1011- warnings .warn (
1012- "Default trace interpolation method will be set to 'fft' in the near "
1013- "future. Explicitely set method='linear' to keep the same results: "
1014- "vm.time_convert_cube(incube, tinc, tmin, tmax, method='linear')." ,
1015- category = FutureWarning ,
1016- stacklevel = 2 ,
1017- )
1013+ if method is None :
1014+ warnings .warn (
1015+ "Default trace interpolation method will be set to 'fft' in the near "
1016+ "future. Explicitly set method='linear' to keep the same results: "
1017+ "vm.time_convert_cube(incube, tinc, tmin, tmax, method='linear')." ,
1018+ category = FutureWarning ,
1019+ stacklevel = 2 ,
1020+ )
1021+ method = "linear"
10181022
10191023 return self ._domain_convert_cube (
10201024 incube ,
0 commit comments