diff --git a/docs/source/c8_changes.rst b/docs/source/c8_changes.rst index 7bebf89c910244e32c986db1ca3a2e621eefc189..1f203f64afb3533ae0266e2d1791281397ff91a7 100644 --- a/docs/source/c8_changes.rst +++ b/docs/source/c8_changes.rst @@ -28,11 +28,12 @@ Change list .. code-block:: python - import os.path + import os import numpy as np - from astropy.io import fits + import numpy.typing as npt from astropy import table + from astropy.io import fits from csst_common.status import CsstStatus, CsstResult @@ -40,23 +41,26 @@ Change list return fits.getdata(file_path) - def _do_step_one(data: np.ndarray) -> np.ndarray: + def _do_step_one(data: npt.NDArray) -> npt.NDArray: reduced_data = np.fliplr(data) return reduced_data - def _do_step_two(data: np.ndarray) -> np.ndarray: + def _do_step_two(data: npt.NDArray) -> npt.NDArray: reduced_data = np.flipud(data) return reduced_data - def _do_step_three(data: np.ndarray, rc="/path/to/catalog") -> np.ndarray: + def _do_step_three(data: npt.NDArray, rc: str = "/path/to/catalog") -> npt.NDArray: trc = table.Table.read(rc) return data + np.mean(trc["ra"]) + np.mean(trc["dec"]) def base_msc_l1_mbi_image_distortion( - input_file, output_file, rc: str = "/path/to/gaia_dr3.fits", **kwargs + input_file: str, + output_file: str, + rc: str = "/path/to/gaia_dr3.fits", + **kwargs ) -> CsstResult: """your docstring here""" # read data @@ -71,11 +75,17 @@ Change list assert os.path.exists(output_file) # construct CsstResult result = CsstResult( - status=CsstStatus.PERFECT, file_list=[output_file, "an additional output file"] + status=CsstStatus.PERFECT, + file_list=[ + output_file, + "/path/to/result1.fits", + "/path/to/result2.fits", + ], ) return result + 导入模块 ---------