3333from astropy .coordinates .earth import EarthLocation
3434from astropy .time import Time
3535from dateutil .tz import gettz
36+ from deprecated .sphinx import deprecated
3637from matplotlib .patches import Rectangle
3738from scipy .ndimage import gaussian_filter
3839
8586 "obsInfoToDict" ,
8687 "getFieldNameAndTileNumber" ,
8788 "getAirmassSeeingCorrection" ,
88- "getFilterSeeingCorrection" ,
89+ "getFilterSeeingCorrection" , # deprecated
90+ "getBandpassSeeingCorrection" ,
8991 "getCdf" ,
9092 "getQuantiles" ,
9193 "digitizeData" ,
@@ -975,9 +977,34 @@ def getAirmassSeeingCorrection(airmass: float) -> float:
975977 return airmass ** (- 0.6 )
976978
977979
980+ @deprecated (
981+ reason = ". Will be removed after v28.0." ,
982+ version = "v27.0" ,
983+ category = FutureWarning ,
984+ )
978985def getFilterSeeingCorrection (filterName : str ) -> float :
979986 """Get the correction factor for seeing due to a filter.
980987
988+ Parameters
989+ ----------
990+ filterName : `str`
991+ The name of the filter, e.g. 'SDSSg_65mm'.
992+
993+ Returns
994+ -------
995+ correctionFactor : `float`
996+ The correction factor to apply to the seeing.
997+
998+ Raises
999+ ------
1000+ ValueError raised for unknown filters.
1001+ """
1002+ return getBandpassSeeingCorrection (filterName )
1003+
1004+
1005+ def getBandpassSeeingCorrection (filterName : str ) -> float :
1006+ """Get the correction factor for seeing due to a filter.
1007+
9811008 Parameters
9821009 ----------
9831010 filterName : `str`
@@ -993,16 +1020,28 @@ def getFilterSeeingCorrection(filterName: str) -> float:
9931020 ValueError raised for unknown filters.
9941021 """
9951022 match filterName :
996- case "SDSSg_65mm" :
1023+ case "SDSSg_65mm" : # LATISS
9971024 return (474.41 / 500.0 ) ** 0.2
998- case "SDSSr_65mm" :
1025+ case "SDSSr_65mm" : # LATISS
9991026 return (628.47 / 500.0 ) ** 0.2
1000- case "SDSSi_65mm" :
1027+ case "SDSSi_65mm" : # LATISS
10011028 return (769.51 / 500.0 ) ** 0.2
1002- case "SDSSz_65mm" :
1029+ case "SDSSz_65mm" : # LATISS
10031030 return (871.45 / 500.0 ) ** 0.2
1004- case "SDSSy_65mm" :
1031+ case "SDSSy_65mm" : # LATISS
10051032 return (986.8 / 500.0 ) ** 0.2
1033+ case "u_02" : # ComCam
1034+ return (370.697 / 500.0 ) ** 0.2
1035+ case "g_01" : # ComCam
1036+ return (476.359 / 500.0 ) ** 0.2
1037+ case "r_03" : # ComCam
1038+ return (619.383 / 500.0 ) ** 0.2
1039+ case "i_06" : # ComCam
1040+ return (754.502 / 500.0 ) ** 0.2
1041+ case "z_03" : # ComCam
1042+ return (866.976 / 500.0 ) ** 0.2
1043+ case "y_04" : # ComCam
1044+ return (972.713 / 500.0 ) ** 0.2
10061045 case _:
10071046 raise ValueError (f"Unknown filter name: { filterName } " )
10081047
0 commit comments