Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
"""Add astrometric RA and Dec to quicklook tables

Revision ID: 6250c0fab3fe
Revises: e390971cbc59
Create Date: 2026-02-05 20:10:17.272364+00:00

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = "6250c0fab3fe"
down_revision: Union[str, None] = "e390971cbc59"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_nullable=True,
schema="cdb_latiss",
)
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_nullable=True,
schema="cdb_latiss",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_ra",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Central Spatial Position in ICRS; Right ascension of the CCD center. In contrast with #exposure.s_ra, which is the targeted sky position, this is the position fitted after plate solving the image.",
),
schema="cdb_latiss",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_dec",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Central Spatial Position in ICRS; Declination of the CCD center. In contrast with #exposure.s_dec, which is the targeted sky position, this is the position fitted after plate solving the image.",
),
schema="cdb_latiss",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_sky_rotation",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Fitted sky rotation angle based on plate solving. This quantity can be compared to #exposure.sky_rotation, the targeted sky rotation angle.",
),
schema="cdb_latiss",
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("visit1_quicklook", "astrom_sky_rotation", schema="cdb_latiss")
op.drop_column("visit1_quicklook", "astrom_dec", schema="cdb_latiss")
op.drop_column("visit1_quicklook", "astrom_ra", schema="cdb_latiss")
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_latiss",
)
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_latiss",
)
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
"""Add astrometric RA and Dec to quicklook tables

Revision ID: 9db9c1e9e8d3
Revises: a322490c4e0f
Create Date: 2026-02-05 20:10:29.413963+00:00

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = "9db9c1e9e8d3"
down_revision: Union[str, None] = "a322490c4e0f"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcam",
)
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcam",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_ra",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Central Spatial Position in ICRS; Right ascension of the center position of the central CCD (R22_S11). In contrast with #exposure.s_ra, which is the targeted sky position, this is the position fitted after plate solving the image.",
),
schema="cdb_lsstcam",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_dec",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Central Spatial Position in ICRS; Declination of the center position of the central CCD (R22_S11). In contrast with #exposure.s_dec, which is the targeted sky position, this is the position fitted after plate solving the image.",
),
schema="cdb_lsstcam",
)
op.add_column(
"visit1_quicklook",
sa.Column(
"astrom_sky_rotation",
sa.DOUBLE()
.with_variant(mysql.DOUBLE(asdecimal=True), "mysql")
.with_variant(sa.DOUBLE_PRECISION(), "postgresql"),
nullable=True,
comment="Fitted sky rotation angle based on plate solving. This quantity can be compared to #exposure.sky_rotation, the targeted sky rotation angle.",
),
schema="cdb_lsstcam",
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("visit1_quicklook", "astrom_sky_rotation", schema="cdb_lsstcam")
op.drop_column("visit1_quicklook", "astrom_dec", schema="cdb_lsstcam")
op.drop_column("visit1_quicklook", "astrom_ra", schema="cdb_lsstcam")
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcam",
)
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcam",
)
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""Add astrometric RA and Dec to quicklook tables

Revision ID: 283fe87848b1
Revises: b3bf526692dd
Create Date: 2026-02-05 20:10:21.349589+00:00

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "283fe87848b1"
down_revision: Union[str, None] = "b3bf526692dd"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcomcam",
)
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcomcam",
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcomcam",
)
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcomcam",
)
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""Add astrometric RA and Dec to quicklook tables

Revision ID: 07d289e251ec
Revises: 42cf2352803d
Create Date: 2026-02-05 20:10:24.844899+00:00

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "07d289e251ec"
down_revision: Union[str, None] = "42cf2352803d"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcomcamsim",
)
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_nullable=True,
schema="cdb_lsstcomcamsim",
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"exposure",
"s_dec",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Declination of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; declination of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcomcamsim",
)
op.alter_column(
"exposure",
"s_ra",
existing_type=sa.DOUBLE_PRECISION(precision=53),
comment="Central Spatial Position in ICRS; Right ascension of targeted focal plane center.",
existing_comment="Central Spatial Position in ICRS; right ascension of focal plane center derived from encoder readings and correcting for annual abberation, precession-nutation, earth orientation, atmospheric refraction, and mount/flexure model, determined without reference to a plate solution.",
existing_nullable=True,
schema="cdb_lsstcomcamsim",
)
# ### end Alembic commands ###
Loading