Models
Data models
- class FileConfigModel(*, default: bool = False, id: str = '', name: str = '', description: str = '', vars: dict[str, float | str] = {}, file: str)[source]
Bases:
BaseModelPydantic model for transmission curve configuration.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class EmissionConfigModel(*, path: str = '', temperatures: list[~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffbb47bdb50>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'exclusiveMinimum': '0.0 K', 'physType': 'temperature'})]] = [<Quantity 283. K>], blackbody_fractions: list[~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Fraction of the pupil that behaves as a pure black body.', metadata=[Ge(ge=0.0), Le(le=1.0)])]] = <factory>, files: list[~pydiet.server.models.dataconfig.FileConfigModel] = [])[source]
Bases:
BaseModelPydantic model for emission curve set configuration.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class TransmissionConfigModel(*, path: str = '', files: list[FileConfigModel] = [])[source]
Bases:
BaseModelPydantic model for transmission curve set configuration.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class SiteConfigModel(*, default: bool = False, id: str, name: str, description: str, path: str, altitude: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba8453da0>], transmission: ~pydiet.server.models.dataconfig.TransmissionConfigModel, emission: ~pydiet.server.models.dataconfig.EmissionConfigModel)[source]
Bases:
BaseModelPydantic model for the observing site data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class TelescopeConfigModel(*, default: bool = False, id: str, name: str, description: str, path: str, collecting_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba863e0f0>], obstruction_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba8453fe0>], transmission: ~pydiet.server.models.dataconfig.TransmissionConfigModel, emission: ~pydiet.server.models.dataconfig.EmissionConfigModel)[source]
Bases:
BaseModelPydantic model for the telescope data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DetectorConfigModel(*, path: str, gain: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba84643e0>], ron: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba84641a0>], scale: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba863deb0>], transmission: ~pydiet.server.models.dataconfig.TransmissionConfigModel, emission: ~pydiet.server.models.dataconfig.EmissionConfigModel)[source]
Bases:
BaseModelPydantic model for the detector data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpticsConfigModel(*, path: str, transmission: TransmissionConfigModel, emission: EmissionConfigModel)[source]
Bases:
BaseModelPydantic model for the intrument optics data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class FiltersConfigModel(*, path: str, transmission: TransmissionConfigModel, emission: EmissionConfigModel)[source]
Bases:
OpticsConfigModelPydantic model for the intrument filters data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class InstrumentConfigModel(*, default: bool = False, id: str, name: str, description: str, path: str, wavelength_range: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffbb7c02690>], obstruction_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba8464980>], overhead: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba84649b0>], site_id: str, telescope_id: str, optics: ~pydiet.server.models.dataconfig.OpticsConfigModel, filters: ~pydiet.server.models.dataconfig.FiltersConfigModel, detector: ~pydiet.server.models.dataconfig.DetectorConfigModel)[source]
Bases:
BaseModelPydantic model for the instrument data configuration model.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DataConfigModel(*, path: Annotated[Path, PathType(path_type=dir)], sites: list[SiteConfigModel], telescopes: list[TelescopeConfigModel], instruments: list[InstrumentConfigModel])[source]
Bases:
BaseModelPydantic model for the data configuration
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Default entries for models
Exceptions for model validation.
Data models
- class CacheModel(*, tpeaks: dict[str, float], zp_abmags: dict[str, ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95e252b0>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'physType': 'unknown'})]], transmissions: dict[str, ~pydiet.server.models.instrument.TransmissionModel], emissions_ct: dict[str, float])[source]
Bases:
BaseModelPydantic model for cached data.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DetectorModel(*, gain: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95e277d0>], ron: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba4cc0920>], scale: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba2d62f30>], transmissions: dict[str, ~pydiet.server.models.instrument.TransmissionModel], emissions: dict[str, ~pydiet.server.models.instrument.SBSEDModel])[source]
Bases:
BaseModelPydantic model for an instrument detector (e.g., CMOS or CCD).
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class InstrumentModel(*, id: str, name: str, description: str, wavelength_range: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb960073b0>], obstruction_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffba4cd0c50>], overhead: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95c23ec0>], filters: ~pydiet.server.models.instrument.FiltersModel, optics: ~pydiet.server.models.instrument.OpticsModel, detector: ~pydiet.server.models.instrument.DetectorModel, telescope: ~pydiet.server.models.instrument.TelescopeModel, site: ~pydiet.server.models.instrument.SiteModel, default: bool = False, cache: ~pydiet.server.models.instrument.CacheModel | None = None)[source]
Bases:
BaseModelPydantic model for a PyDIET instrument.
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpticsModel(*, transmissions: dict[str, TransmissionModel], emissions: dict[str, SBSEDModel])[source]
Bases:
BaseModelPydantic model for optics.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class FiltersModel(*, transmissions: dict[str, TransmissionModel], emissions: dict[str, SBSEDModel])[source]
Bases:
OpticsModelPydantic model for a filter set.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class SBSEDModel(*, id: str, name: str, description: str, vars: dict[str, float | str]={}, wave: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95c23dd0>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'maximum': '100.0 micron', 'minimum': '100.0 nm', 'physType': 'length'})] | None = None, sbsed: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb96686ea0>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'minimum': '0.0 Jy / arcsec2', 'physType': 'surface brightness'})] | None = None, spectral: SourceSpectrum, default: bool = False)[source]
Bases:
BaseModelPydantic model for a Surface Brightness Spectral Energy Distribution (SBSED).
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class SEDModel(*, id: str, name: str, description: str, vars: dict[str, float]={}, wave: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffbb477f080>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'maximum': '100.0 micron', 'minimum': '100.0 nm', 'physType': 'length'})] | None = None, sed: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95bf8320>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'minimum': '0.0 Jy', 'physType': 'spectral flux density'})] | None = None, spectral: SourceSpectrum, default: bool = False)[source]
Bases:
BaseModelPydantic model for a Spectral Energy Distribution (SED).
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class SiteModel(*, id: str, name: str, description: str, sky_transmissions: dict[str, TransmissionModel], sky_emissions: dict[str, SBSEDModel], default: bool = False)[source]
Bases:
BaseModelPydantic model for an observing site.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class TelescopeModel(*, id: str, name: str, description: str, collecting_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb96686ae0>], obstruction_area: ~typing.Annotated[~astropy.units.quantity.Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95bf8530>], transmissions: dict[str, ~pydiet.server.models.instrument.TransmissionModel], emissions: dict[str, ~pydiet.server.models.instrument.SBSEDModel], default: bool = False)[source]
Bases:
BaseModelPydantic model for a telescope.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class TransmissionModel(*, id: str, name: str, description: str = '', vars: dict[str, float | str] | None=None, wave_range: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95bf9fa0>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '2', 'exclusiveMinimum': '[0. 0.] nm', 'physType': 'length'})] | None = None, wave: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95bfa0f0>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'maximum': '100.0 micron', 'minimum': '100.0 nm', 'physType': 'length'})] | None = None, response: Quantity, <pydiet.server.types.quantity.QuantityAnnotation object at 0x7ffb95bfa090>, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'minShape': '2', 'maxShape': '100000', 'maximum': '100.0', 'minimum': '-100.0', 'physType': 'dimensionless'})] | None = None, spectral: SpectralElement | None = None, default: bool = False)[source]
Bases:
BaseModelPydantic model for a transmission curve (with wavelength).
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Query models
- class ETCQueryModel(*, instrument: InstrumentID = 'megacam', airmass: Annotated[float, Ge(ge=1.0)] = 1.2, aperture: Annotated[float, Gt(gt=0.0), Le(le=15.0)] = 3.0, brightness: Annotated[float, Ge(ge=-100.0), Le(le=1000.0)] = 20.0, compute: Literal['etime', 'snr'] = 'etime', etime: Annotated[float, Ge(ge=0.0), Le(le=1e+30)] = 20.0, exposures: Annotated[int, Ge(ge=1), Le(le=1000000)] = 1, filter: FilterID = 'r', mirror: MirrorID = 'average', photometry: Literal['model_fitting', 'fixed_aperture', 'optimal_aperture', 'large_aperture'] = 'model_fitting', seeing: Annotated[float, Ge(ge=0.1), Le(le=100.0)] = 0.7, sky: Literal['dark', 'grey', 'bright', 'specify'] = 'dark', sky_brightness: Annotated[float, Ge(ge=-100.0), Le(le=1000.0)] = 22.0, sersic_radius: Annotated[float, Gt(gt=0.0), Le(le=10.0)] = 1.0, sersic_index: Annotated[float, Ge(ge=0.3), Le(le=10.0)] = 1.0, sky_unit: Literal['abmag', 'vegamag', 'fmegajy', 'fmujy', 'flux', 'photons'] = 'abmag', snr: Annotated[float, Gt(gt=0.0)] = 10.0, solar: Literal['low', 'average', 'high'] = 'average', source: Literal['point_source', 'galaxy', 'extended'] = 'point_source', stacking: Literal['average', 'median'] = 'median', transparency: Annotated[float, Gt(gt=0.0), Le(le=1.0)] = 1.0, unit: Literal['abmag', 'vegamag', 'fmegajy', 'fmujy', 'flux', 'photons'] = 'abmag')[source]
Bases:
BaseModel- classmethod validate_filter(f: str, info: ValidationInfo) str[source]
Kind of emulate Enum validation and errors.
- classmethod validate_mirror(m: str, info: ValidationInfo) str[source]
Kind of emulate Enum validation and errors.
- model_config = {'arbitrary_types_allowed': True, 'use_enum_values': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Response models
- class ETCResponseModel(*, instrument: str, filter: str, compute: Literal['etime', 'snr'], zp: Annotated[float, Ge(ge=-100.0), Le(le=100.0)] = 0.0, zp_instru: Annotated[float, Ge(ge=-100.0), Le(le=100.0)] = 0.0, snr: Annotated[float, Ge(ge=0.0), Lt(lt=1e+30)] = 10.0, etime: Annotated[float, Ge(ge=0.0), Lt(lt=1e+30)] = 1.0, etime_skysat: Annotated[float, Ge(ge=0.0), Lt(lt=1e+30)] = 0.0, etime_sourcesat: Annotated[float, Ge(ge=0.0), Lt(lt=1e+30)] = 0.0, ttime: Annotated[float, Ge(ge=0.0), Lt(lt=1e+30)] = 1.0, bkg_mag: Annotated[float, Ge(ge=-100.0), Le(le=100.0)] = 99.0, bkg_rate: Annotated[float, Ge(ge=0.0), Le(le=1e+30)] = 99.0, lambda_pivot: Annotated[float, Ge(ge=0.0), Lt(lt=1000000000000.0)] = 0.0, bandwidth_rect: Annotated[float, Ge(ge=0.0), Lt(lt=1000000000000.0)] = 0.0, trans_peak: Annotated[float, Ge(ge=0.0), Le(le=1.0)] = 1.0, trans_peak_instru: Annotated[float, Ge(ge=0.0), Le(le=1.0)] = 1.0, cutout: str | None = None, filter_transmission: Json | None = None, atmosphere_transmission: Json | None = None)[source]
Bases:
BaseModel- model_config = {'use_enum_values': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Custom types for PyDIET data models