Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding stub methods to LightCurve that child classes must implement. #67

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/resspect/feature_extractors/light_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ def __init_subclass__(cls):

FEATURE_EXTRACTOR_REGISTRY[cls.__name__] = cls

def fit(self, band: str) -> np.ndarray:
"""
Extract features for one filter.

Parameters
----------
band: str
Choice of broad band filter

Returns
-------
np.ndarray
"""
raise NotImplementedError()

def fit_all(self):
"""
Performs feature extraction for all filters independently and concatenate results.
Populates self.features.
"""
raise NotImplementedError()

def _get_snpcc_photometry_raw_and_header(
self, lc_data: np.ndarray,
sntype_test_value: str = "-9") -> Tuple[np.ndarray, list]:
Expand Down
Loading