Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
b60c91f1
Commit
b60c91f1
authored
Sep 16, 2023
by
BO ZHANG
🏀
Browse files
tweaks
parent
305ae41e
Pipeline
#1212
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/source/c8_changes.rst
View file @
b60c91f1
...
...
@@ -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
.nda
rray) -> np
.nda
rray:
def _do_step_one(data: np
t.NDA
rray) -> np
t.NDA
rray:
reduced_data = np.fliplr(data)
return reduced_data
def _do_step_two(data: np
.nda
rray) -> np
.nda
rray:
def _do_step_two(data: np
t.NDA
rray) -> np
t.NDA
rray:
reduced_data = np.flipud(data)
return reduced_data
def _do_step_three(data: np
.nda
rray, rc
=
"/path/to/catalog") -> np
.nda
rray:
def _do_step_three(data: np
t.NDA
rray, rc
: str =
"/path/to/catalog") -> np
t.NDA
rray:
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
导入模块
---------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment