技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
wcs-nddata【数据与研究】Operate Astropy FITS WCS and NDData/CCDData workflows, including pixel-world conversion, WCS validation, masks, uncertainties, units, and metadata.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when an Astropy task centers on the relationship between image-like array pixels and physical/world coordinates, or on carrying image data together with masks, uncertainties, units, metadata, and WCS.
astropy.wcs.WCS object.all_pix2world, all_world2pix, pixel_to_world,
world_to_pixel, world_to_array_index, or array_index_to_world.wcslint.NDData, NDDataArray, NDDataRef, or CCDData.StdDevUncertainty,
VarianceUncertainty, InverseVariance, a unit, metadata, or a WCS object.CCDData.read, CCDData.write, to_hdu, FITS BUNIT, mask/uncertainty HDUs,
or WCS-preserving slicing/cutouts are part of the task.../tables-io/SKILL.md.fits2bitmap, or
convolution is the main topic; use ../visualization-convolution/SKILL.md.SkyCoord catalog matching, IERS, or
EarthLocation dominate after the WCS conversion step; use
../time-coordinates/SKILL.md.../units-constants/SKILL.md.../cli-config-data/SKILL.md.WCS, array,
NDData, CCDData, or a world-coordinate object.origin, or distortion-pipeline control.pixel_n_dim, world_n_dim, array_shape, pixel_shape,
world_axis_physical_types, and world_axis_units before assuming axis order.world_to_array_index or
world_to_array_index_values, not rounded world_to_pixel outputs.relax, fix,
translate_units, naxis, and preserve_units matter.WCS(header) is the normal FITS-WCS constructor. It accepts headers,
dict-like header cards, or a filename, and can also create an empty WCS with
naxis=.pixel_to_world and world_to_pixel return and consume Astropy
world objects such as SkyCoord or Quantity when the WCS describes those
axes.origin argument.all_pix2world and all_world2pix include detector, SIP, lookup
table, and core WCS corrections when present; pass origin=0 for NumPy-style
pixels or origin=1 for FITS/DS9-style coordinates.wcs_pix2world and wcs_world2pix omit SIP and table-lookup distortion;
use them only when that distinction is intentional.array_index_to_world and world_to_array_index use NumPy array order
(row, column, ...); pixel_to_world and world_to_pixel use pixel order
(x, y, ...).preserve_units=True when the original header units are the
required output/input units..celestial, .sub(...), slicing, or SlicedLowLevelWCS when a cube or
higher-dimensional WCS must be reduced or cut out.NDData as a lightweight container for data, uncertainty, mask,
wcs, meta, unit, and optional PSF information.NDDataRef or NDDataArray when slicing, arithmetic helpers, or
ndarray-like behavior are needed.CCDData for 2D image data that should read/write FITS naturally; a unit
is required, and a FITS BUNIT card is used when reading/writing units.True means invalid or
ignored.StdDevUncertainty, VarianceUncertainty, or InverseVariance.NDData/CCDData when possible. For CCDData
loaded from FITS, WCS keywords are converted to a WCS object automatically.Cutout2D with a WCS when the cutout must update CRPIX and
keep pixel/world consistency; confirm distortion limitations first.wcslint,
NDData/CCDData, FITS round-trips, and cutouts.wcslint as diagnostic. Its output can identify suspicious WCS cards,
but a successful lint does not replace a numeric round-trip check for the
user’s specific coordinate convention.FITSFixedWarning or FITS verification warnings, state which
warning was inspected and why ignoring it is safe for the task.CCDData workflows, verify that data shape, mask shape, uncertainty
shape, unit, and WCS metadata survived the read/write/slice/cutout step.WCS, convert a pixel
to world and back, and check agreement within a small tolerance.all_pix2world against wcs_pix2world only to explain the difference, not to
demand equality.wcslint smoke: write a temporary FITS file with simple WCS cards and confirm
that the CLI runs and reports WCS diagnostics without mutating the file.NDData/CCDData smoke: construct data with a mask, unit, metadata,
StdDevUncertainty, and WCS; then slice or FITS round-trip and assert the
critical attributes remain present.CCDData image.