mirar.pipelines.wirc.wirc_files package

Module containing WIRC-specific paths

Submodules

mirar.pipelines.wirc.wirc_files.models module

Models for the ‘candidates’ table

class mirar.pipelines.wirc.wirc_files.models.Candidate(*, objectid: str, ra: float, dec: float, fwhm: float, jd: float, fid: int, diffimgname: str, sciimgname: str, refimgname: str, magpsf: float, sigmapsf: float, chipsf: float | None = None, aimage: float, bimage: float, aimagerat: float, bimagerat: float, elong: float, scorr: float, xpos: float | None = None, ypos: float | None = None, magzpsci: float | None = None, magzpsciunc: float | None = None, tmjmag1: float | None = None, tmhmag1: float | None = None, tmkmag1: float | None = None, tmobjectid1: str | None = None, isdiffpos: bool = True)[source]

Bases: BaseDB

A pydantic model for a candidate database entry

aimage: float
aimagerat: float
bimage: float
bimagerat: float
chipsf: float | None
dec: float
diffimgname: str
elong: float
fid: int
fwhm: float
isdiffpos: bool
jd: float
magpsf: float
magzpsci: float | None
magzpsciunc: float | None
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'aimage': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'aimagerat': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'bimage': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'bimagerat': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'chipsf': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0)]), 'dec': FieldInfo(annotation=float, required=True, title='Dec (degrees)', metadata=[Ge(ge=-90.0), Le(le=90.0)]), 'diffimgname': FieldInfo(annotation=str, required=True, metadata=[MaxLen(max_length=255)]), 'elong': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'fid': FieldInfo(annotation=int, required=True, metadata=[Ge(ge=0)]), 'fwhm': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'isdiffpos': FieldInfo(annotation=bool, required=False, default=True), 'jd': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'magpsf': FieldInfo(annotation=float, required=True), 'magzpsci': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'magzpsciunc': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0)]), 'objectid': FieldInfo(annotation=str, required=True, metadata=[MinLen(min_length=11)]), 'ra': FieldInfo(annotation=float, required=True, title='RA (degrees)', metadata=[Ge(ge=0.0), Le(le=360.0)]), 'refimgname': FieldInfo(annotation=str, required=True, metadata=[MaxLen(max_length=255)]), 'sciimgname': FieldInfo(annotation=str, required=True, metadata=[MaxLen(max_length=255)]), 'scorr': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'sigmapsf': FieldInfo(annotation=float, required=True, metadata=[Ge(ge=0)]), 'tmhmag1': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'tmjmag1': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'tmkmag1': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'tmobjectid1': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'xpos': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0)]), 'ypos': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

objectid: str
ra: float
refimgname: str
sciimgname: str
scorr: float
sigmapsf: float
sql_model

alias of CandidatesTable

tmhmag1: float | None
tmjmag1: float | None
tmkmag1: float | None
tmobjectid1: str | None
xpos: float | None
ypos: float | None
class mirar.pipelines.wirc.wirc_files.models.CandidatesTable(**kwargs)[source]

Bases: WircBase

Raw table in database

aimage
aimagerat
bimage
bimagerat
candid
chipsf
dec
dec_column_name = 'dec'
diffimgname
elong
fid
fwhm
isdiffpos
jd
magpsf
magzpsci
magzpsciunc
objectid
ra
ra_column_name = 'ra'
refimgname
sciimgname
scorr
sigmapsf
tmhmag1
tmjmag1
tmkmag1
tmobjectid1
xpos
ypos
class mirar.pipelines.wirc.wirc_files.models.WircBase(**kwargs: Any)[source]

Bases: DeclarativeBase, BaseTable

Parent class for summer database

db_name = 'wirc'
metadata: ClassVar[MetaData] = MetaData()

Refers to the _schema.MetaData collection that will be used for new _schema.Table objects.

See also

orm_declarative_metadata

registry: ClassVar[_RegistryType] = <sqlalchemy.orm.decl_api.registry object>

Refers to the _orm.registry in use where new _orm.Mapper objects will be associated.

mirar.pipelines.wirc.wirc_files.models.set_up_wirc_database()[source]

Function to set up the wirc database