From 92f9d3be1c070d53feb67cd08ca1a7d25b5026db Mon Sep 17 00:00:00 2001 From: Kian-Tat Lim Date: Tue, 25 Jun 2024 09:57:40 +0000 Subject: [PATCH] Add vignetting migration. --- .../versions/b801850c5cc9_add_vignetting.py | 170 +++++++++++ .../versions/1b1d80c59d58_add_vignetting.py | 278 ++++++++++++++++++ .../versions/ef3efe082be3_add_vignetting.py | 278 ++++++++++++++++++ 3 files changed, 726 insertions(+) create mode 100644 alembic/latiss/versions/b801850c5cc9_add_vignetting.py create mode 100644 alembic/lsstcomcam/versions/1b1d80c59d58_add_vignetting.py create mode 100644 alembic/lsstcomcamsim/versions/ef3efe082be3_add_vignetting.py diff --git a/alembic/latiss/versions/b801850c5cc9_add_vignetting.py b/alembic/latiss/versions/b801850c5cc9_add_vignetting.py new file mode 100644 index 0000000..e40242e --- /dev/null +++ b/alembic/latiss/versions/b801850c5cc9_add_vignetting.py @@ -0,0 +1,170 @@ +"""add vignetting + +Revision ID: b801850c5cc9 +Revises: 535c454d7311 +Create Date: 2024-06-25 09:42:17.989898+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import mysql +from sqlalchemy.dialects import oracle + +# revision identifiers, used by Alembic. +revision: str = "b801850c5cc9" +down_revision: Union[str, None] = "535c454d7311" +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( + "ccdvisit1_quicklook", + "eff_time_psf_sky_bg_scale", + new_column_name="eff_time_sky_bg_scale", + comment="Scale factor for effective exposure time based on sky background.", + schema="cdb_latiss", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_zero_point_scale", + new_column_name="eff_time_zero_point_scale", + comment="Scale factor for effective exposure time based on zero point.", + schema="cdb_latiss", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma.", + existing_comment="Effective exposure time, PSF sigma scale.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.add_column( + "exposure", + sa.Column( + "vignette", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Instrument blocked from the sky: Unknown = 0, No = 1, Partially = 2, Fully = 3.", + ), + schema="cdb_latiss", + ) + op.add_column( + "exposure", + sa.Column( + "vignette_min", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Minimum value of vignette during the exposure.", + ), + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_comment="Effective exposure time.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma.", + existing_comment="Effective exposure time, PSF sigma scale.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background.", + existing_comment="Effective exposure time, sky background scale.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point.", + existing_comment="Effective exposure time, zero point scale.", + existing_nullable=True, + schema="cdb_latiss", + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale.", + existing_comment="Scale factor for effective exposure time based on zero point.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale.", + existing_comment="Scale factor for effective exposure time based on sky background.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale.", + existing_comment="Scale factor for effective exposure time based on PSF sigma.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.alter_column( + "visit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time.", + existing_comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_nullable=True, + schema="cdb_latiss", + ) + op.drop_column("exposure", "vignette_min", schema="cdb_latiss") + op.drop_column("exposure", "vignette", schema="cdb_latiss") + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_zero_point_scale", + new_column_name="eff_time_psf_zero_point_scale", + comment="Effective exposure time, zero point scale.", + schema="cdb_latiss", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_sky_bg_scale", + new_column_name="eff_time_psf_sky_bg_scale", + comment="Effective exposure time, sky backgroundscale.", + schema="cdb_latiss", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale.", + existing_comment="Scale factor for effective exposure time based on PSF sigma.", + existing_nullable=True, + schema="cdb_latiss", + ) + # ### end Alembic commands ### diff --git a/alembic/lsstcomcam/versions/1b1d80c59d58_add_vignetting.py b/alembic/lsstcomcam/versions/1b1d80c59d58_add_vignetting.py new file mode 100644 index 0000000..3ccf1c2 --- /dev/null +++ b/alembic/lsstcomcam/versions/1b1d80c59d58_add_vignetting.py @@ -0,0 +1,278 @@ +"""add vignetting + +Revision ID: 1b1d80c59d58 +Revises: 334168d54b40 +Create Date: 2024-06-25 09:42:37.901378+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import mysql +from sqlalchemy.dialects import oracle + +# revision identifiers, used by Alembic. +revision: str = "1b1d80c59d58" +down_revision: Union[str, None] = "334168d54b40" +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( + "ccdvisit1_quicklook", + "eff_time_psf_sky_bg_scale", + new_column_name="eff_time_sky_bg_scale", + comment="Scale factor for effective exposure time based on sky background.", + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_zero_point_scale", + new_column_name="eff_time_zero_point_scale", + comment="Scale factor for effective exposure time based on zero point.", + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_comment="Effective exposure time.", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma.", + existing_comment="Effective exposure time, PSF sigma scale.", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.add_column( + "exposure", + sa.Column( + "vignette", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Instrument blocked from the sky: Unknown = 0, No = 1, Partially = 2, Fully = 3.", + ), + schema="cdb_lsstcomcam", + ) + op.add_column( + "exposure", + sa.Column( + "vignette_min", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Minimum value of vignette during the exposure.", + ), + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (minimum across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (maximum across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (median across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (minimum across all detectors).", + existing_comment="Effective exposure time, sky background scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (maximum across all detectors).", + existing_comment="Effective exposure time, sky background scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (median across all detectors).", + existing_comment="Effective exposure time, sky background scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (minimum across all detectors).", + existing_comment="Effective exposure time, zero point scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (maximum across all detectors).", + existing_comment="Effective exposure time, zero point scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (median across all detectors).", + existing_comment="Effective exposure time, zero point scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.drop_column("exposure", "vignette_min", schema="cdb_lsstcomcam") + op.drop_column("exposure", "vignette", schema="cdb_lsstcomcam") + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_zero_point_scale", + new_column_name="eff_time_psf_zero_point_scale", + comment="Effective exposure time, zero point scale.", + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_sky_bg_scale", + new_column_name="eff_time_psf_sky_bg_scale", + comment="Effective exposure time, sky backgroundscale.", + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale.", + existing_comment="Scale factor for effective exposure time based on PSF sigma.", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time.", + existing_comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_nullable=True, + schema="cdb_lsstcomcam", + ) + # ### end Alembic commands ### diff --git a/alembic/lsstcomcamsim/versions/ef3efe082be3_add_vignetting.py b/alembic/lsstcomcamsim/versions/ef3efe082be3_add_vignetting.py new file mode 100644 index 0000000..f6d5ac9 --- /dev/null +++ b/alembic/lsstcomcamsim/versions/ef3efe082be3_add_vignetting.py @@ -0,0 +1,278 @@ +"""add vignetting + +Revision ID: ef3efe082be3 +Revises: c07a817a5c95 +Create Date: 2024-06-25 09:42:30.454566+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import mysql +from sqlalchemy.dialects import oracle + +# revision identifiers, used by Alembic. +revision: str = "ef3efe082be3" +down_revision: Union[str, None] = "c07a817a5c95" +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( + "ccdvisit1_quicklook", + "eff_time_psf_sky_bg_scale", + new_column_name="eff_time_sky_bg_scale", + comment="Scale factor for effective exposure time based on sky background.", + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_zero_point_scale", + new_column_name="eff_time_zero_point_scale", + comment="Scale factor for effective exposure time based on zero point.", + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_comment="Effective exposure time.", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma.", + existing_comment="Effective exposure time, PSF sigma scale.", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.add_column( + "exposure", + sa.Column( + "vignette", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Instrument blocked from the sky: Unknown = 0, No = 1, Partially = 2, Fully = 3.", + ), + schema="cdb_lsstcomcamsim", + ) + op.add_column( + "exposure", + sa.Column( + "vignette_min", + sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"), + nullable=True, + comment="Minimum value of vignette during the exposure.", + ), + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (minimum across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (maximum across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on PSF sigma (median across all detectors).", + existing_comment="Effective exposure time, PSF sigma scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (minimum across all detectors).", + existing_comment="Effective exposure time, sky background scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (maximum across all detectors).", + existing_comment="Effective exposure time, sky background scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on sky background (median across all detectors).", + existing_comment="Effective exposure time, sky background scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (minimum across all detectors).", + existing_comment="Effective exposure time, zero point scale (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (maximum across all detectors).", + existing_comment="Effective exposure time, zero point scale (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Scale factor for effective exposure time based on zero point (median across all detectors).", + existing_comment="Effective exposure time, zero point scale (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_zero_point_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, zero point scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on zero point (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_sky_bg_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, sky background scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on sky background (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_median", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (median across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (median across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_max", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (maximum across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (maximum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "visit1_quicklook", + "eff_time_psf_sigma_scale_min", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale (minimum across all detectors).", + existing_comment="Scale factor for effective exposure time based on PSF sigma (minimum across all detectors).", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.drop_column("exposure", "vignette_min", schema="cdb_lsstcomcamsim") + op.drop_column("exposure", "vignette", schema="cdb_lsstcomcamsim") + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_zero_point_scale", + new_column_name="eff_time_psf_zero_point_scale", + comment="Effective exposure time, zero point scale.", + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_sky_bg_scale", + new_column_name="eff_time_psf_sky_bg_scale", + comment="Effective exposure time, sky backgroundscale.", + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time_psf_sigma_scale", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time, PSF sigma scale.", + existing_comment="Scale factor for effective exposure time based on PSF sigma.", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + op.alter_column( + "ccdvisit1_quicklook", + "eff_time", + existing_type=sa.DOUBLE_PRECISION(precision=53), + comment="Effective exposure time.", + existing_comment="Effective exposure time calculated from PSF sigma, sky background, and zero point.", + existing_nullable=True, + schema="cdb_lsstcomcamsim", + ) + # ### end Alembic commands ###