ArfData#

class jinwu.core.ArfData(path: Path, header: Dict[str, Any], meta: Any, headers_dump: Any, energ_lo: np.ndarray = <factory>, energ_hi: np.ndarray = <factory>, specresp: np.ndarray = <factory>, columns: Tuple[str, ...] = ())[source]#

Bases: ArfBase

Concrete ARF data class with local behavior implementation.

Attributes Summary

Methods Summary

get_keyword_ci(key[, default])

大小写不敏感地从 header 中读取关键字(若 header 为 dict).

plot([ax, energy_unit, yscale, title])

rebin(factor)

validate()

通用层:仅检查路径与 header 存在性。子类会扩展。

Attributes Documentation

REQUIRED_COLUMNS_ARF = ['ENERG_LO', 'ENERG_HI', 'SPECRESP']#
REQUIRED_COLUMNS_RMF_MIN = ['ENERG_LO', 'ENERG_HI', 'MATRIX']#
REQUIRED_KEYS_ANY = [['TELESCOP'], ['INSTRUME'], ['DETNAM', 'DETNAME']]#
columns: Tuple[str, ...]#
energ_hi: ndarray#
energ_lo: ndarray#
header: Dict[str, Any]#
headers_dump: Any#
kind: ClassVar[Literal['arf']] = 'arf'#
meta: Any#
path: Path#
specresp: ndarray#
validation#

Methods Documentation

get_keyword_ci(key: str, default: Any | None = None) Any#

大小写不敏感地从 header 中读取关键字(若 header 为 dict).

返回关键字值或提供的 default。便于统一处理 FITS 关键字的大小写差异。

plot(ax: Any | None = None, *, energy_unit: str = 'keV', yscale: str = 'linear', title: str | None = None, **kwargs)[source]#
rebin(factor: int) ArfData[source]#
validate() ValidationReport[source]#

通用层:仅检查路径与 header 存在性。子类会扩展。