The current system for adding entries to the kcor_sw table is cumbersome and error-prone. We should:
simplify the kcor_sw table, moving some fields to the kcor_eng table and simply removing others
ensure one entry in kcor_sw for every day processed
The steps needed to do this are:
For kcor_sw table and kcor_sw_insert
[x] remove bunit, bzero, and bscale
[x] move labviewid and socketcamid to kcor_eng
[x] remove dmodswid (ask @jburkepile)
[x] remove sky_pol_factor and sky_bias
For kcor_eod
[x] add a single kcor_sw entry for the day
For kcor_img_insert
[x] remove kcor_sw_insert call
For kcor_db_clearday
[x] remove kcor_sw entries for the day
For production database
[x] modify kcor_sw table
alter table kcor_sw drop column sky_pol_factor;
alter table kcor_sw drop column sky_bias;
alter table kcor_sw drop column distort;
alter table kcor_sw drop column labviewid;
alter table kcor_sw drop column socketcamid;
alter table kcor_sw drop column bunit;
alter table kcor_sw drop column bzero;
alter table kcor_sw drop column bscale;
alter table kcor_sw drop column dmodswid;
[x] add new fields to kcor_eng table
alter table kcor_eng add distort char(50);
alter table kcor_eng add labviewid varchar(20);
alter table kcor_eng add socketcamid varchar(20);
The current system for adding entries to the
kcor_sw
table is cumbersome and error-prone. We should:kcor_sw
table, moving some fields to thekcor_eng
table and simply removing otherskcor_sw
for every day processedThe steps needed to do this are:
For
kcor_sw
table andkcor_sw_insert
bunit
,bzero
, andbscale
labviewid
andsocketcamid
tokcor_eng
dmodswid
(ask @jburkepile)sky_pol_factor
andsky_bias
For
kcor_eod
kcor_sw
entry for the dayFor
kcor_img_insert
kcor_sw_insert
callFor
kcor_db_clearday
kcor_sw
entries for the dayFor production database
[x] modify
kcor_sw
tablealter table kcor_sw drop column sky_pol_factor; alter table kcor_sw drop column sky_bias; alter table kcor_sw drop column distort; alter table kcor_sw drop column labviewid; alter table kcor_sw drop column socketcamid; alter table kcor_sw drop column bunit; alter table kcor_sw drop column bzero; alter table kcor_sw drop column bscale; alter table kcor_sw drop column dmodswid;
[x] add new fields to
kcor_eng
tablealter table kcor_eng add distort char(50); alter table kcor_eng add labviewid varchar(20); alter table kcor_eng add socketcamid varchar(20);
[x] clear
kcor_sw_id
field inkcor_eng
update kcor_eng set kcor_sw_id=NULL;
[x] clear
kcor_sw
tabledelete from kcor_sw;