LightcurveDataBase#
- class jinwu.core.LightcurveDataBase(path: Path, header: Dict[str, Any], meta: Any, headers_dump: Any, time: np.ndarray | None = None, time_raw: np.ndarray | None = None, time_rel: np.ndarray | None = None, value: np.ndarray | None = None, timezero: float = 0.0, timezero_obj: Time | None = None, dt: np.ndarray | float | None = None, bin_lo: np.ndarray | None = None, bin_hi: np.ndarray | None = None, bin_width: np.ndarray | None = None, binning: Literal['uniform', 'variable', 'unknown'] = 'unknown', tstart: float | None = None, tseg: float | None = None, error: np.ndarray | None = None, is_rate: bool = False, counts: np.ndarray | None = None, rate: np.ndarray | None = None, counts_err: np.ndarray | None = None, rate_err: np.ndarray | None = None, err_dist: Literal['poisson', 'gauss'] | None = None, gti_start: np.ndarray | None = None, gti_stop: np.ndarray | None = None, quality: np.ndarray | None = None, fracexp: np.ndarray | None = None, backscal: np.ndarray | float | None = None, areascal: np.ndarray | float | None = None, telescop: str | None = None, timesys: str | None = None, mjdref: float | None = None, exposure: float | None = None, bin_exposure: np.ndarray | None = None, region: RegionArea | None = None, columns: Tuple[str, ...] = (), ratio: float | None = None)[source]#
Bases:
OgipTimeSeriesBasePure field-only base dataclass for lightcurve data.
Attributes Summary
Methods Summary
extract_gti(hdul)Extension point: parse GTI from an opened HDUList and return list of (start, stop) tuples.
get_keyword_ci(key[, default])大小写不敏感地从 header 中读取关键字(若 header 为 dict).
validate()通用层:仅检查路径与 header 存在性。子类会扩展。
Attributes Documentation
- CRITICAL_KEYS = ['TIMESYS', 'TIMEUNIT']#
- OPTIONAL_KEYS = ['OBJECT', 'OBS_ID', 'MJDREF', 'MJDREFI', 'MJDREFF', 'TIMEZERO', 'TREFPOS', 'DATE-OBS']#
- REQUIRED_COLUMNS_ANY = [['TIME']]#
- REQUIRED_KEYS = ['TELESCOP', 'INSTRUME', 'TIMESYS', 'TIMEUNIT']#
- region: RegionArea | None#
- validation#
Methods Documentation
- extract_gti(hdul: Any) list | None#
Extension point: parse GTI from an opened HDUList and return list of (start, stop) tuples.
Default implementation searches for an extension named ‘GTI’ (case-insensitive) and, if present, returns a list of (START, STOP) pairs. Readers should call this to populate event objects’ GTI field.
- get_keyword_ci(key: str, default: Any | None = None) Any#
大小写不敏感地从 header 中读取关键字(若 header 为 dict).
返回关键字值或提供的 default。便于统一处理 FITS 关键字的大小写差异。
- validate() ValidationReport#
通用层:仅检查路径与 header 存在性。子类会扩展。