Source code for gaiaxpy.spectrum.generic_spectrum

"""
generic_spectrum.py
====================================
Module to represent a generic spectrum.
"""
from typing import Union


[docs] class Spectrum(object): """ Base spectrum. Contain only the source ID. """ def __init__(self, source_id: Union[str, int]): """ Initialise a spectrum. Args: source_id (str): Source identifier. Can be a Gaia source ID (long) or any other source identifier. """ self.source_id = source_id
[docs] def get_source_id(self): """ Get the source ID of the spectrum. Returns: str: Source identifier. """ return self.source_id