TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design...

30
TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 1 APPROVAL SHEET TITLE : TCS Science Database Software Design Document DOCUMENT NUMBER : 1732AE0009 ISSUE: F SYNOPSIS : This document describes the software design of the Science Database (SDB) software item of the TCS. KEYWORDS : PREPARED BY : E. Romero Colmenero APPROVED : Gerhard Swart SALT Systems Engineer Kobus Meiring SALT Project Manager Engineer DATE : February 2005

Transcript of TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design...

Page 1: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

1

APPROVAL SHEET

TITLE : TCS Science Database Software Design Document

DOCUMENT NUMBER : 1732AE0009 ISSUE: F

SYNOPSIS : This document describes the software design of theScience Database (SDB) software item of the TCS.

KEYWORDS :

PREPARED BY : E. Romero Colmenero

APPROVED : Gerhard SwartSALT Systems Engineer

Kobus MeiringSALT Project Manager Engineer

DATE : February 2005

Page 2: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

2

This issue is only valid when the above signatures are present.Printed: 21/02/05 10:44

Page 3: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

3

DEFINITIONS

Proposal Requirements for a full scientific projectTAC Time Allocation Committee – a selected group of people that will decide on which

proposals will be awarded time on SALT, and how much time they have perpriority (within their own time share).

Priority In case of target overlaps, a discriminator as to the relative importance of theclashing proposals. There are 5 priority discriminators:0 : highest priority, reserved mainly for ToOs and time-restricted observations ofthe highest scientific impact.1 : Highest scientific priority, with a very good chance of being observed within agiven semester2 : lower priority than 1, also with a good chance of being observed within thesemester3 : lowest priority proposals, i.e. they are not likely to get done. This category isexpected to be oversubscribed in order to minimise observational ‘gaps’.

Target A particular astronomical object (e.g. star, galaxy, standard) to be observedStandard A target of known properties used to calibrate the observationsBlock A set of observations that must be performed in a specific order, e.g. a standard

and the scientific object of interest.Script An instrument-readable set of commands that define the configuration and

observational sequence for an observation.Observation In general, a pointing to a target with a particular instrument configuration. Please

note, however, that there may be several consecutive exposures of a targetwith minor differences in instrument configuration (all contained in a singleinstrument script) that will also constitute an observation, e.g. calibration arcexposures in between target exposures.

Exposure A single CCD readout, resulting in a single data file. An observation will probablyconsist of several exposures, e.g. an arc (calibration) followed by a scienceobservation etc.

Page 4: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

4

ACRONYMS AND ABBREVIATIONS

ATP Acceptance Test ProcedureATR Acceptance Test ReportBMS Building Management SystemCDR Critical Design ReviewCIN Code Interface Node (a LabVIEW function to interface to other SW)ELS Event Logger SoftwareEDS Environmental Display SystemHET Hobby-Eberly TelescopeI/O Input/Output (Device)ICD Interface Control DossierMMI Man-Machine InterfaceOPT Operational Planning ToolPC Personal ComputerPDR Preliminary Design ReviewPFIS Prime Focus Imaging SpectrographPI Principal Investigator (Astronomer)PIPT PI Planning ToolPLC Programmable-Logic ControllerPMAS Primary Mirror Alignment SystemSA SALT AstronomerSALT Southern African Large TelescopeSAMMI SA Machine InterfaceSC Software Component (e.g. part of the TCSS)SCAM Salticam (Acquisition camera)SCL SALT Command Language (sent to TCSS)SDB Science DatabaseSDD Software Design DocumentSDP Software Development PlanSI Software Item (the TCSS is a Software Item)SO SALT OperatorSOMMI SO Machine InterfaceSRS Software Requirement SpecificationSTARCAT Object CatalogueSW SoftwareTAC Time Allocation CommitteeTBC To Be ConfirmedTBD To Be DeterminedTCS Telescope Control SystemTCSS TCS ServerTPM Telescope Pointing Machine (software for Astrometric Pointing)VI Virtual Instrument (LabVIEW function)WEB SALT web-server

Page 5: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

5

TABLE OF CONTENTS

1 Scope ..........................................................................................................7Referenced Documents ...................................................................................82 Software Context .......................................................................................82.1 Software external interfaces. ....................................................................................................82.2 Development environment.........................................................................................................92.3 Hardware platform .......................................................................................................................9

3 High-level database design ......................................................................93.1 Contact info..................................................................................................................................103.2 Proposal Info ...............................................................................................................................103.3 Time accounting info .................................................................................................................103.4 Group Info ....................................................................................................................................103.5 Target info....................................................................................................................................103.6 Config Info....................................................................................................................................103.7 PFIS config....................................................................................................................................103.8 SALTICAM config........................................................................................................................113.9 Observation details....................................................................................................................113.10 File details.......................................................................................... Error! Bookmark not defined.

4 Full Database Design ..............................................................................114.1 Table descriptions .....................................................................................................................144.1.1 Leader......................................................................................................................................144.1.2 Investigator...............................................................................................................................144.1.3 Institute.....................................................................................................................................144.1.4 Partner......................................................................................................................................144.1.5 PeriodTimeDistrib......................................................................................................................154.1.6 Proposal ...................................................................................................................................154.1.7 CoIProposal ..............................................................................................................................164.1.8 MultiPartner...............................................................................................................................164.1.9 PriorityAlloc ..............................................................................................................................164.1.10 Block.........................................................................................................................................174.1.11 BlockObsconfig........................................................................................................................174.1.12 Obsconfig.................................................................................................................................174.1.13 TimeRestricted..........................................................................................................................184.1.14 GuideMethod ............................................................................................................................184.1.15 Target.......................................................................................................................................194.1.16 TargetType...............................................................................................................................194.1.17 FindingChart .............................................................................................................................194.1.18 MovingTarget............................................................................................................................204.1.19 MovingTable .............................................................................................................................204.1.20 Guide........................................................................................................................................204.1.21 MovingGuide.............................................................................................................................204.1.22 PfisObsconfig...........................................................................................................................214.1.23 PFIS_Mo....................................................................................................................................214.1.24 PfisExpo ...................................................................................................................................214.1.25 PfisCcd.....................................................................................................................................224.1.26 PfisFilter....................................................................................................................................224.1.27 PfisPolarimetry..........................................................................................................................224.1.28 PfisGrating................................................................................................................................23

Page 6: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

6

4.1.29 PfisFp .......................................................................................................................................234.1.30 SalticamObsconfig ...................................................................................................................234.1.31 SalticamExpo............................................................................................................................234.1.32 SalticamCcd..............................................................................................................................244.1.33 SalticamFilter ............................................................................................................................244.1.34 HrsObsconfig...........................................................................................................................244.1.35 HrsMo.......................................................................................................................................254.1.36 HrsExpo....................................................................................................................................254.1.37 HrsFilter....................................................................................................................................254.1.38 ObsStats ..................................................................................................................................254.1.39 NightInfo ...................................................................................................................................264.1.40 SaLog.......................................................................................................................................264.1.41 SoLog.......................................................................................................................................264.1.42 FileData.....................................................................................................................................274.1.43 DataType..................................................................................................................................274.1.44 PfisRealConfig..........................................................................................................................274.1.45 HrsRealConfig ..........................................................................................................................274.1.46 SalticamRealConfig...................................................................................................................274.1.47 Track ........................................................................................................................................284.1.48 Dimm.........................................................................................................................................284.1.49 Weather....................................................................................................................................284.1.50 Concam ....................................................................................................................................29

5 High-level interface description .............................................................295.1 PIPT – SDB.....................................................................................................................................295.2 SDB - PI GUI...................................................................................................................................295.3 SDB - SA GUI .................................................................................................................................295.4 SDB – OPT .....................................................................................................................................295.5 SDB – SAMMI/SOMMI ..................................................................................................................295.6 SDB – TCS .....................................................................................................................................295.7 SDB – Instrument computer (PFIS and SCAM)......................................................................29

Page 7: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

7

1 Scope

This document defines the design for the Science Database (SDB) software item of the SALTTelescope Control System (TCS). The requirements for this software are defined in the SDB SoftwareRequirements Specification, document number 1732AS0003.

The SDB comprises three separate software applications that need to work together: the SDB itself, theGUI that the PIs will use in order to access their data over the internet, and a GUI specific for the SA toaccess the contents of the SDB (possibly a commercial tool).

The purpose of the SDB is:• Store all information required by the OPT, the TCS, the instrument computer and/or the SA in

order to perform any planned observation with SALT.• Store in a structured and easy-to-search manner to all the data pertained to a particular

completed observation with SALT.• Store observation details (e.g. the actual track, weather conditions, operator and astronomer

logs etc) that will be useful in order to evaluate the science value of the data and recoveroperational statistics.

• Store all the data future astronomers will require in order to search for particular files and re-use particular observations once the proprietary period has expired.

The major factors that have influenced the design of the software are the following:• The SDB is the “heart” of the telescope and a single point failure. It must store all the information

regarding all planned and completed observations and be available during the night!• Its detailed design is intricately woven with the designs of proposals, the OPT and the

instrumentation• Unreliability of the software and/or hardware would lead directly to telescope downtime

and inefficiency

• The overall design must be robust in order to cope with changes without requiring any major re-design:

• The SDB design will need to be modified often during commissioning and new tablesadded whenever new instrumentation is available.

• Poor database design will result in major re-design, time wasting and inefficiency.

The design of the software is shown primarily using diagrams. A description of each table with all theirfields is also included in the document (but note comment above regarding changes).

Page 8: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

8

Referenced Documents

The following documents are referenced in this design document and are applicable to the extentmentioned herein.

1000AB0044 SALT LabVIEW Coding Standard1000AS0040 SALT Operational Requirements1700BP0009 TCS Software Development Plan1700AS0001 TCS Specification1732AE0002 TCS Observation Planning Tool Software Specification1732AE0003 TCS Science Database Software Specification1732AE0008 TCS Observation Planning Tool Software Design Document

2 Software Context

Figure 1: SDB Software Context

See Figure 1 for a diagram of the software context of the SDB.

2.1 Software external interfaces.

The purpose of the SDB is to make its contents readily available to a variety of programs. Figure 1shows the software requiring access to the SDB. All of these programs will need to implement MySQLinterfaces in order to access the data:

Page 9: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

9

o PIPTo PI GUIo SA GUIo OPTo SAMMI/SOMMIo TCSo Instrument computer

2.2 Development environment

The SDB will be implemented in MySQL. The PI GUI will be implemented as part of the PIPT (probablyJava). For the SA GUI, commercial tools are currently being investigated and MySQL Manager is beingused for the time being.

2.3 Hardware platform

The SDB will run on the Data Processor PC. It will run over N disks as a raid 5 array in order to protectthe integrity of the data, as well as minimising telescope downtime due to hard-disk failure. The SDB willconnect to the rest of the SALT/SAAO network via a 100 Mb/s Ethernet card. It will be accessible to theoutside world via the PI GUI, which will be located on the SALT Web server.

3 High-level database designThe SDB design can be split into various (currently 12) high-level components, which contain relatedinformation. (see Figure 2). These sections are colour-coded, and the same colours are used in the tablescorresponding to each section in the low-level diagram (see Figure 3) to make the high-level structureclearer and easier to follow.

Page 10: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

10

Contact Info

Proposal info

Target Block Info Target Info

Configuration InfoPFIS config Salticam config

Obs details

Night details

Time AccountingInfo

HRS config

Extra details

Figure 2: High level SDB design

3.1 Contact infoThis section contains all the contact information regarding PIs and Co-Is.

3.2 Proposal InfoThis section refers to all the details which are common to all proposals, excluding target and instrumentinformation.

3.3 Time accounting infoThis section collects all the necessary information required in order to ensure the correct timedistribution amongst the partners. It allows different time allocations for different periods (and thereforeallowing for e.g. partner’s selling off time shares).

3.4 Block InfoEach proposal is divided into one or more blocks of observations, i.e. targets that must be observed in aparticular sequential order (e.g. a standard followed by a science target), or a single target with multipleinstrument configurations in a particular sequence.

3.5 Target infoThis section contains all information regarding each proposed target (including standards) and guidestar information.

3.6 Config InfoThis section describes the configuration information common to all proposed observations, regardlessof the instrumentation required.

3.7 PFIS config

Page 11: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

11

This section holds PFIS specific details. It is important to note that all of the information required toperform the observation is contained in an instrument-specific script, which will be supplied by the PIduring Phase II. The rest of the information regarding the PFIS configuration will allow the SA tounderstand the contents of the scripts, to break the information in a datafile by datafile basis and, in thefuture, to be able to perform statistical analysis on instrument usage, e.g. the most popular mode ofoperation, how often the polarimeter is required etc.

3.8 SALTICAM configThis section contains SALTICAM specific details. As with the section above regarding PFIS, SALTICAMwill be fully run from a script, provided “as is” by the PI during Phase II.

3.9 HRS configThis section contains HRS specific details.

3.10 Observation detailsThis section handles all the information pertaining to a particular completed observation, e.g. the totalamount of time charged, SO and SA comments etc, RA and Dec of the telescope, etc.

3.11 Night detailsThis section groups together all of the observations performed during the night and contains also thelogs for that particular night

3.12 Extra detailsThis section contains extra information from the telescope, such as track details, weather information,concam images etc.

4 Full Database Design

See Figure 3 for a diagram.

Page 12: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

12

Page 13: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

13

n=0,1

Investigator (2)

investigator_Key int

Institute_Key int

Investigator_Name varchar(20)

Investigator_Surname varchar(20)

Investigator_Email varchar(20)

Leader (1)

Leader_Key int

Investigator_Key int

Leader_Phone varchar(20)

Leader_Fax varchar(20)

Leader_Uname varchar(10)

Leader_Passwd varchar(20)

Institute (3)

Institute_Key int

Partner_Key int

Institute_Name varchar(100)

Institute_Address varchar(200)

Partner (4)

Partner_Key int

Partner_Name varchar(20)

Patner_TargetMod boolean

PeriodTimeDist (5)

PeriodTimeDist_Key int

Partner_Key int

PeriodTimeDist_Period varchar(6)

PeriodTimeDist_Alloc0 float

PeriodTimeDist_Alloc1 float

PeriodTimeDist_Alloc2 float

PeriodTimeDist_Alloc3 float

PeriodTimeDist_Use0 float

PeriodTimeDist_Use1 float

PeriodTimeDist_Use2 float

PeriodTimeDist_Use3 float

Proposal (6)

Proposal_Key int

Leader_Key int

Contact_Id int

Period varchar(6)

Proposal_Title varchar(20)

Proposal_Abstract text

Proposal_SciJust blob

Proposal_TotalReqTime float

Proposal_ActOnAlert boolean

Proposal_Warning varchar(500)

Proposal_PriorityMod char(2)

Proposal_Completed boolean

Proposal_Status varchar(500)

Proposal_Phase tinyint

Proposal_RTML varchar(20)

CoIProposal (7)

CoIProposal_Key int

Investigator_Key int

Proposal_Key int

MultiPartner (8)

MultiPartner_Key int

Proposal_Key int

Partner_Key int

MultiPartner_ReqTime float

Obsconfig (12)

Obsconfig_Key int

Target_Key int

Guide_Key int

GuideMethod_Key int

Obsconfig_Priority int

Obsconfig_PriorityMod int

Obsconfig_ObsMode varchar(100)

Obsconfig_ObsTime float

Obsconfig_MinSN float

Obsconfig_MaxSeeing float

Obsconfig_Photometric boolean

Obsconfig_MaxSky floatObsconfig_Pfis_CalibShare booleanObsconfig_Salt_CalibShare boolean

Obsconfig_Comments text

Obsconfig_RhoOffset float

Obsconfig_FixedAngle float

PfisFilter (26)

PfisFilter_Key int

PfisFilter_Name varchar(7)

PfisMo (23)

PfisMo_Key int

PfisObsconfig_Key int

PfisMo_Ra float

PfisMo_Dec float

PfisObsconfig (22)

PfisObsconfig_Key int

Obsconfig_Key int

PfisObsconfig_Script text

PfisObsconfig_Desr varchar(20)

PfisObsconfig_Mask varchar(20)

PfisObsconfig_Flat boolean

PfisObsconfig_SkyFlat boolean

PfisObsconfig_Dark boolean

PfisObsconfig_Std boolean

PfisObsconfig_Bias boolean

PfisObsconfig_Arcs boolean

Target (15)

Target_Key int

TargetType_Key int

Target_Name char(20)

Target_RA float

Target_Dec float

Target_Equinox float

Target_MinMag float

Target_MaxMag float

Target_BlinOffset boolean

Target_Share boolean

Target_EstripS float

Target_EstripE float

Target_WstripS float

Target_WstripE float

Target_EazS float

Target_EazE float

Target_WazS float

Target_WazE float

MovingTarget (18)

MovingTarget_Key int

Target_Key int

MovingTarget_Radot float

MovingTarget_Decdot float

MovingTarget_IauString varchar(20)

MovingTable (19)

MovingTable_Key int

Target_Key int

MovingTable_Ra float

MovingTable_Dec float

MovingTable_Datetime datetime

MovingGuide (21)

MovingGuide_Key int

Guide_Key int

MovingGuide_Radot float

MovingGuide_Decdot float

Guide (20)

Guide_Key int

Target_Key int

Guide_RA float

Guide_Dec float

Guide_Equinox float

Guide_Mag float

TargetType (16)

TargetType_Key int

TargetType varchar(20)

FindingChart (17)

FindingChart_Key int

Target_Key varchar(20)

FindingChart blob

BlockObsconfig (11)

BlockObsconfig_Key int

Block_Key int

Obsconfig_Key int

BlockObsconfig_Order int

Block (10)

Block_Key int

Proposal_Key int

Block_Comments varchar(100)

Block_NVisits int

Block_WaitDays float

Block_NDone int

PriorityAlloc (9)

PrioritytAlloc_Key int

MultiPartner_Key int

PriorityAlloc_Type float

PriorityAlloc_Time float

SalticamFilter (33)

SalticamFilter_Key int

SalticamFilter_Name varchar(7)

SalticamObsconfig (30)

SalticamObsconfig_Key int

Obsconfig_Key int

SalticamObsconfig_Script text

SalticamObsconfig_Desr varchar(20)

SalticamObsconfig_Flat boolean

SalticamObsconfig_SkyFlat boolean

SalticamObsconfig_Dark boolean

SalticamObsconfig_Std boolean

SalticamObsconfig_Bias boolean

HrsExpo (36)

HrsExpo_Key int

HrsObsconfig_Key int

HrsFilter_Key int

DataType_Key int

HrsExpo_Exptime float

HrsExpo_FileNo int

HrsExpo_Ncounts int

HrsObsconfig (34)

HrsObsconfig_Key int

Obsconfig_Key int

HrsObsconfig_Script text

HrsObsconfig_Desr varchar(20)

HrsMo (35)

HrsMo_Key int

HrsObsconfig_Key int

HrsMo_Ra float

HrsMo_Dec float

TimeRestricted (13)

TimeRestricted_Key int

Obsconfig_Key int

TimeRestricted_When datetime

GuideMethod (14)

GuideMethod_Key int

GuideMethod varchar(20)

ObsStats (38)

ObsStats_Key int

NightInfo_Key int

Obsconfig_Key int

GuideMethod_Key int

ObsStats_ChargedTime formula?

ObsStats_AdjustTime float

ObsStats_Complete boolean

SoLog (41)

SoLog_Key int

NightSummary_Key int

SoLog_Timestamp datetime

SoLog_Text varchar(200)

NightInfo (39)

NightInfo_Key int

NightInfo_SoName varchar(5)

NightInfo_SaName varchar(5)

SaLog (40)

SaLog_Key int

NightInfo_Key int

SaLog_Timestamp datetime

SaLog_Text varchar(200)

FileData (42)

FileData_Key int

ObsStats_Key int

Track_id int

DataType_Key int

FileData_UtStart datetime

FileData_Exptime float

FileData_TelRA float

FileData_TelDec float

FileData_TelEpoch float

FileData_FileName varchar(100)

FileData_Sn float

FileData_Accepted boolean

Track (47)

TrackEntry_Key int

NightInfo_Key int

Track_Id int

Track_Time datetime

Track_Rho float

Track_MovingBaffleX int

Track_MovingBaffleY int

Track_AdcPosZ int

Track_AdcPosRho float

Track_PupilMaskY int

Track_GuideProbeX int

Track_GuideProbeY int

Track_SkyMag float

Track_EffArea float

Track_EE50 float

Track_EE80 float

Track_TelAltitude float

Track_TelAzimuth float

Track_Airmass float

Track_TelHourAngle float

Dimm (48)

Dimm_Key int

NightInfo_Key int

Dimm_Time datetime

Dimm_EE50 float

Dimm_EE80 float

Weather (49)

Weather_Key int

NightInfo_Key int

Weather_Time time

Weather_Temp float

Weather_WindSpeed float

Weather_WindDir float

Weather_DewPt float

Weather_AirPress float

Concam (50)

Concam_Key int

NightInfo_Key int

Concam_Time time

Concam_Image blob

DataType (43)

DataType_Key int

DataType varchar(8)

PfisRealConfig (44)

PfisRealConfig_Key int

FileData_Key int

SalticamRealConfig (46)

SalticamRealConfig_Key int

FileData_Key int

HrsRealConfig (45)

HrsRealConfig_Key int

FileData_Key int

PfisExpo (24)

PfisExpo_Key int

PfisObsconfig_Key int

PfisFilter_Key int

DataType_Key int

PfisPolarimetry_Key int

PfisExpo_Exptime float

PfisExpo_Mode char(2)

PfisExpo_FileNo int

PfisExpo_Ncounts int

PfisPolarimetry (27)

PfisPolarimetry_Key int

PfisPolarimetry_Mode varchar(10)

PfisFp (29)

PfisFp_Key int

PfisExpo_Key int

PfisFp_Mode char(1)

PfisFp_Wstart float

PfisFp_Wend float

PfisGrating (28)

PfisGrating_Key int

PfisExpo_Key int

PfisGrating_Name int

PfisGrating_Angle float

PfisGrating_Artic int

PfisCcd (25)

PfisCcd_Key int

PfisExpo_Key int

PfisCcd_Pb varchar(3)

PfisCcd_ReadSpeed char(1)

PfisCcd_Gain char(1)

PfisCcd_Ft char(1)

PfisCcd_Nwindows int

SalticamCcd (32)

SalticamCcd_Key int

SalticamExpo_Key int

SalticamCcd_Pb varchar(3)

SalticamCcd_ReadSpeed char(1)

SalticamCcd_Gain char(1)

SalticamCcd_Ft char(1)

SalticamCcd_Nwindows int

SalticamExpo (31)

SalticamExpo_Key int

SalticamObsconfig_Key int

SalticamFilter_Key int

DataType_Key int

SalticamExpo_Exptime float

SalticamExpo_FileNo int

SalticamExpo_Ncounts int

HrsFilter (37)

HrsFilter_Key int

HrsFilter_Name varchar(10)

Page 14: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

14

Figure 3: Diagram describing the SDB design. The various colours correspond to the different componentsdescribed in Section 3 and in Figure 2.

4.1 Table descriptionsFollowing is a complete list of the SDB tables with their corresponding fields.Please note that, as mentioned above, these fields are likely to change in the near future, new tables addedetc. Therefore, special attention must be paid to how robust the current design is and to its flexibility.Attention to the specific fields is important within this context.

4.1.1 LeaderThis table contains PI specific information, extra to that required for any SALT investigator, such ascontact information and the database username and password required for proposal submission.

Field Description TypeLeader_Key Unique identifier for each PI int (auto-increment)Investigator_Key Identifier of appropriate Investigator information foreign intLeader_Phone PI phone number varchar(20)Leader_Fax PI fax number varhar(20)Leader_Uname Proposal submission username varchar(10)Leader_Passwd Proposal submission password varchar(20)

4.1.2 InvestigatorThis table contains Co-I specific information. Please note that all PIs also have Co-I information, while notall Co-Is are PIs.

Field Description TypeInvestigator_Key Unique identifier for each investigator int (auto-increment)Institute_Key Identifier for corresponding Institute foreign intInvestigator_Name Name of investigator varchar(20)Investigator_Surname Surname of the investigator Varchar(20)Investigator_Email e-mail address of investigator varchar(20)

4.1.3 InstituteThe Institute table contains only the name and address of the PI/Co-I.

Field Description TypeInstitute_Key Unique identifier for each partner institution int (auto-increment)Partner_Key Identifier of corresponding partner foreign intInstitute_Name Name of institution varchar(100)Institute_Address Address of institution varchar(200)

4.1.4 PartnerThis table specifies to which partner the PI/Co-I institution belongs. It is essentially a limited list.

Field Description TypePartner_Key Unique identifier for each partner int (auto-increment)Partner_Name The partner to which the identifier corresponds.

There are currently 12 entries:o Poland

varchar(30)

Page 15: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

15

o South Africao U. North Carolinao U. Wisconsin-Madisono Rutgerso Canergie Mellon U.o Dartmouth Collegeo U. Canterburyo UK Consortiumo HETo Göttingen

However, if any of the original partners were tosell any of their time, the list of partners willincrease.

Partner_TargetMod Whether PIs from this partner institution areallowed to alter their target information

boolean (default Y)

4.1.5 PeriodTimeDistribThis table handles the distribution of allowed time by each institution per period. It incorporates changesfrom period to period due to e.g. a partner selling some of their time to another (possibly new) partner,incomplete proposals that carry over, unbalanced time allocation in the previous period, etc. in order tobalance totals.

PeriodTimeDistrib_Key Unique identifier for each entry int (auto-increment)

Partner_Key Unique identifier of which partner this informationrefers to

foreign int

PeriodTimeDistrib_Period Period for which this information is valid (egS105)

varchar(6)

PeriodTimeDistrib_Alloc0 No. hours (ksec?) allocated for this period forpriority 0 targets

float

PeriodTimeDistrib_Alloc1 No. hours (ksec?) allocated for this period forpriority 1 targets

float

PeriodTimeDistrib_Alloc2 No. hours (ksec?) allocated for this period forpriority 2 targets

float

PeriodTimeDistrib_Alloc3 No. hours (ksec?) allocated for this period forpriority 3 targets

float

PeriodTimeDistrib_Use0 No. hours (ksec?) used so far for this period forpriority 0 targets

float

PeriodTimeDistrib_Use1 No. hours (ksec?) used so far for this period forpriority 1 targets

float

PeriodTimeDistrib_Use2 No. hours (ksec?) used so far for this period forpriority 2 targets

float

PeriodTimeDistrib_Use3 No. hours (ksec?) used so far for this period forpriority 3 targets

float

4.1.6 Proposal

This table contains the high-level proposal information.

Field Description TypeProposal_Key* Unique identifier for each proposal int (auto-

increment)

Page 16: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

16

Leader_Key Identifier of this proposal’s PI foreign intContact_Key Identifier of the contact Investigator foreign intPeriodTimeDistribution_Period Period identifier varchar(6)Proposal_Title Title of the proposal tinytext(255)Proposal_Abstract Abstract (ps format?) blobProposal_SciJust Scientific justification (ps format?) blobProposal_TotalReqTime Total amount of time (ksec) required to

complete this proposalfloat

Proposal_ActOnAlert For ToOs, Act-On-Alert authorisation boolean (defaultN)

Proposal_Warning Outcome of the PIPT basic viability checks. Itwill either be PASS, or it will contain adescription of the reason(s) for failure.

text

Proposal_PriorityMod Priority modification by the SALT Astronomer(when required). This modifier will be one ofthe following:

o NO – no modifier (default)o OH – proposal on hold (e.g. for ToOs)o O, 1, 2, 3, – to bump whole program

up or down in priority

char(2)

Proposal_Completed Whether the proposal has been completed boolean (defaultN)

Proposal_Status After completion, whether it has beenpublished etc (follow-up information)

varchar(500)

Proposal_Phase Phase of the proposal (i.e. 1 or 2) tinyint(1)Proposal_RTML Link to the full RTML proposal as submitted by

the PIvarchar(20)

4.1.7 CoIProposalThis table links the proposal information to a series of investigators (PI, Co-Is and contact person.

Field Description TypeCoIProposal_Key* Unique identifier for each entry in this table int (auto-increment)Investigator_Key Co-I identifier foreign intProposal_Key Proposal identifier foreign int

4.1.8 MultiPartner

This table distributes the total requested time for the proposal amongst one (default) or many partnerinstitutions.

Field Description TypeMultiPartner_Key Unique identifier for each entry int (auto-increment)Proposal_Key Identifier of the proposal this entry refers to foreign intPartner_Key Identified of the partner requested for time foreign intMultiPartner_ReqTime Number of ksec requested from this partner float

4.1.9 PriorityAlloc

This table distributes the time allocation from each partner, as established by the TACs, for eachproposal. In the case of multi-partner proposals, each of the TACs involved in a proposal must returntheir fraction of total requested time divided into their allocated number of ksec per priority. Therefore,this table may have only one entry per proposal (if only the PI’s institution is charged for the full

Page 17: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

17

requested time) or it may have many entries, each entry referring to each of the partners involved.

Field Description TypePriorityAlloc_Key Unique identifier for each entry int (auto-increment)MultiPartner_Key Identifier of the parther institution and proposal this

allocation refers toforeign int

PriorityAlloc_Type Identified of the type of priority (0,1,2,3) tinyintPriorityAlloc_Time Number of ksec allocated to this priority float

4.1.10 BlockIn the case of targets that must be observed in a single time block, e.g. a particular target may require astandard to be taken immediately before or after the science target or perhaps more than oneinstrument to be used in a pre-determined sequence, this table will contain the necessary schedulinginformation.

Field Description TypeBlock_Key* Unique identifier for each block of observations int (auto-increment)Proposal_Key Identifier of the proposal this block belongs to foreign intBlock_Comments PI instructions specific this block varchar(100)Block_NVisits The number of times this block of observations is to

be repeated (in separate pointings)int

Block_WaitDays The number of days that must elapse between thevarious visits (e.g. 0.5 = twice per night)

float

Block_NDone How many visits have been completed int

4.1.11 BlockObsconfigBy definition, there are more than one observation configuration in each group. This table relates eachof them to their particular block and gives them an observation order. If order is not important, the PImust submit the same order for each observation configuration. E.g. if the standard must be observedbefore or after the scientific target, both entries in this table would have BlockObsconfig_Order equalto 1.

Field Description TypeBlockObsconfig_Key* Unique identifier for each observation belonging to

this blockint (auto-increment)

Block_Key Identifier of the particular block foreign intObsconfig_Key Identifier of the observation belonging to this block foreign intBlockObsconfig_Order Order in the observation sequence of the block of

this particular observationint

4.1.12 ObsconfigThis table contains the top-level details of each observation configuration. In most cases, each entry inthis table will correspond to a single pointing of the telescope (i.e. a single track) and one instrumentscript. It must be borne in mind, however, that it is possible to observe a particular target with twoinstruments simultaneously (in those cases where the light can be split through a pellicle) – in thisinstance, the observation configuration details here would refer to the ‘total pointing’ details.

Field Description TypeObsconfig_Key* Unique identifier for observation configuration int (auto-increment)Target_Key Identifier of the target of this observation foreign intGuide_Key Identifier for the guide star information foreign int

Page 18: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

18

GuideMethod_Key Identifier of the guide method (see relevant table) foreign intObsconfig_Priority Priority of this particular observation as entered

by the PI during phase 2char(2)

Obsconfig_PriorityMod Priority modified by the SA (if necessary). Entriesallowed are the same as in the Proposal table

char(2)

Obsconfig_ObsMode Summary of the observing mode for display onthe OPT

varchar(100)

Obsconfig_ObsTime The total number of ksec this particularconfiguration requires (i.e.. total requested tracktime)

float

Obsconfig_MinSN Minimum signal-to-Noise required for thisobservation

float

Obsconfig_MaxSeeing Maximum seeing requirements (arcsec) floatObsconfig_Photometric Whether photometric conditions are required boolean (default N)Obsconfig_MaxSky Maximum sky brightness (mag) floatObsconfig_Pfis_CalibShare Whether the calibration data for PFIS can be

shared with other PIs (if required)boolean (default Y)

Obsconfig_Salt_CalibShare Whether the calibration data for SALTICAM canbe shared with other PIs (if required)

boolean (default Y)

Obsconfig_Comments PI comments/further instructions textObsconfig_RhoOffset Rho offset for the observation floatObsconfig_FixedAngle The angle (degrees from N) for a fixed-angle

observation (eg. Parallactic) if requiredfloat

4.1.13 TimeRestrictedThis table refers to time-restricted observations in which the PI specifies a (series of) requestedobservation date(s) and/or time(s).

Field Description TypeTimeRestricted_Key Unique identifier for each requested fixed

observation date/timeint (auto-increment)

Obsconfig_Key Identifier of the obsconfig this date/time refers to foreign intTimeRestricted_When the requested observation date/time datetime

4.1.14 GuideMethodThis table refers to the guide method for the observation. It is referred to by Obsconfig as the requestedguide method, and by table ObsStats as the actual guide method.

Field Description TypeGuideMethod_Key Unique identifier for each guide method int (auto-increment)GuideMethod Which guide method is to be used. The choices

are:• PfisProbe_1• PfisProbe_2• HrsProbe_1• HrsProbe_2• AuxProbe_1• AuxProbe_2• SalticamProbe_1• SalticamProbe_2• Salticam

varchar(15)

Page 19: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

19

4.1.15 TargetThis table contains target-specific information. If a multi-object observation is requested, the informationhere refers to the centre of the field.

Field Description TypeTarget_Key Unique identifier for each scientific target int (auto-increment)TargetType_Key Identifier of the type of target foreign intTarget_Name Name of the target varchar(20)Target_Ra RA of the target/centre of field (degrees) floatTarget_Dec Dec of the target/centre of field (degrees) floatTarget_Equinox Equinox of the coordinates (2000 = J2000.0) floatTarget_MinMag Minimum magnitude of all targets floatTarget_MaxMag Maximum magnitude of all targets floatTarget_BlindOffset Whether a blind offset on the target is required boolean (default N)Target_EstripS Sidereal time at which the object enters the visibility

strip of SALT on its East Track (hours)double

Target_EstripE Sidereal time at which the object leaves the visibilitystrip of SALT on its East Track (hours)

double

Target_WstripS Sidereal time at which the object enters the visibilitystrip of SALT on its Wast Track (hours)

double

Target_WstripE Sidereal time at which the object leaves the visibilitystrip of SALT on its Wast Track (hours)

double

Target_EazS Azimuth of the object at the point where it enters thevisibility strip of SALT on its East Track (degrees)

float

Target_EazE Azimuth of the object at the point where it leaves thevisibility strip of SALT on its East Track (degrees)

float

Target_WazS Azimuth of the object at the point where it enters thevisibility strip of SALT on its West Track (degrees)

float

Target_WazE Azimuth of the object at the point where it leaves thevisibility strip of SALT on its Wast Track (degrees)

float

4.1.16 TargetTypeList of available target types:

Field Description TypeTargetType_Key Unique identifier for each target type int (auto-increment)TargetType Target type. Must restrict the list:

o RV standardo Spectrophotometric Standardo Photometric Standardo AGNo Variable Staro CVo Supernovao LMXBo ... ?

varchar(20)

4.1.17 FindingChartTable containing the finding charts – this will allow each target to have more than one finding chart (ifnecessary)

Page 20: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

20

Field Description TypeFindingChart_Key Unique identifier for each finding chart int (auto-increment)Target_Key Identifier of the target this charts corresponds to foreign intFindingChart The actual finding chart blob

4.1.18 MovingTargetThis table contains moving target-specific information, eg due to proper motion, comets,asteroids,planets etc.

Field Description TypeMovingTarget_Key Unique identifier for each moving target int (auto-increment)Target_Key Identifier of the target information foreign intMovingTarget_Radot RA velocity - if it has proper motion (arcsec/yr) floatMovingTarget_Decdot Dec velocity – if it has proper motion (arcsec/yr) floatMovingTarget_IAUstring IAU 1-line MPC formatted orbital details varchar(200)

4.1.19 MovingTableThis table contains moving target-specific information in tabular form, ie. RA and Dec at a given time.

Field Description TypeMovingTable_Key Unique identifier for each moving target int (auto-increment)Target_Key Identifier of the target information foreign intMovingTable_Ra RA of the object floatMovingTable_Dec Dec of the object floatMovingTable_Datetime Time for which this coordinates hold true. The

equinox is assumed to be the same as for thetarget information

datetime

4.1.20 GuideThis table contains guide star specific information. It allows for more than one guide star information pertarget, so that eg. each observation configuration can have its own guide star.

Field Description TypeGuide_Key Unique identifier for each guide star int (auto-increment)Target_Key Target they relate to foreign intGuide_Ra RA of the guide star (degrees) floatGuide_Dec Dec of the guide star (degrees) floatGuide_Equinox Equinox of the coordinates (2000 = J2000.0) floatGuide_Mag Magnitude of the guide star float

4.1.21 MovingGuideThis table contains information regarding proper motion for the guide star.

Field Description TypeMovingGuide_Key Unique identifier for each moving guide int (auto-increment)Guide_Key Identifier of the guide star information foreign int

Page 21: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

21

MovingTarget_Radot RA velocity - if it has proper motion (arcsec/yr) floatMovingTarget_Decdot Dec velocity – if it has proper motion (arcsec/yr) float

4.1.22 PfisObsconfigIf the observation will require the use of PFIS, the script and calibration-specific requests are storedhere.

Field Description TypePfisObsconfig_Key Unique identifier for each entry in this table int (auto-increment)Obsconfig_Key Identifier of the observation configuration the script

refers toforeign int

PfisObsconfig_Script Contents of script textPfisObsconfig_Descr Description of the observations (for SA information) varchar(20)PfisObsconfig_Mask Name of the mask to use varchar(20)PfisObsconfig_Flat Whether flats are required for this observation boolean (default Y)PfisObsconfig_SkyFlat Whether sky flats are required for this observation boolean (default N)PfisObsconfig_Dark Whether dark dark frames are required boolean (default N)PfisObsconfig_Std Whether a standard star observation (any standard) will

be requiredboolean (default N)

PfisObsconfig_Bias Whether bias frames are required boolean (default N)PfisObsconfig_Arcs Whether arc frames will be required (day-time only) boolean (default N)

4.1.23 PFISMoIf this is a multi-object observation, this table will store the location and ID of each object.

Field Description TypePfisMo_Key Unique identifier for each object int (auto-increment)PfisObsconfig_Key Identifier of the PFIS configuration these data refers to foreign intPfisMo_Ra RA of object floatPfisMo_Dec Dec of object float

4.1.24 PfisExpoEach PFIS observation may consist of many different exposures. Therefore, this table stores specificdetails about each exposure. In order to minimize repetition, if many identical exposures are proposed ina continuous sequence, we only store information for the first one. and store how many exposures theentry refers to under the Ncounts entry. In order to trace which actual exposure (data file) correspondsto which entry, the FileNo stores the actual order number of that first exposure.

Field Description TypePfisExpo_Key Unique identifier for each entry in this table int (auto-increment)PfisObsconfig_Key Identifier of the PFIS configuration entry that requests

this exposureforeign int

PfisFilter_Key Identifier of requested PFIS filter for this exposure foreign intDataType_Key Type of observation (see DataType table) foreign intPfisPolarimetry_Key What type of/whether polarimetry is required (see

PfisPolarimetry table)foreign int

PfisExpo_Exptime Requested exposure time (seconds) intPfisExpo_Mode PFIS Mode:

im = Imagingsp = Grating Spectroscopy

char(2)

Page 22: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

22

fp = Fabry-Perot spectroscopyPfisExpo_FileNo Exposure order number in the script intPfisExpo_Ncounts Number of times this same exposure information is

repeated in a rowint

4.1.25 PfisCcdIf the observation is to be performed using PFIS, this table contains the CCD configuration details.

Field Description TypePfisCcd_Key Unique identifier for each PFIS CCD configuration

setupint (auto-increment)

PfisExposure_Key Identifier of the exposure(s) it corresponds to foreign intPfisCcd_Pb Ccd pre-binning - RowsxColumns (max 9x9) char(3)PfisCcd_ReadSpeed Speed of readout of the CCD:

F=FastS=SlowN=None

char(1)

PfisCcd_Gain The gain setting of the CCD:B=BrightF=Faint

char(1)

PfisCcd_Ft Frame-transfer mask setting:H=HalfN=NoneS=Slot

char(1)

PfisCcd_Nwindows Number of windows int

4.1.26 PfisFilterThis table identifies all PFIS filters. Although there is no specific need to separate both sets of filters, itis important from a conceptual point of view in order to keep both instruments separate.

Field Description TypePfisFilter_Key Unique identifier for each PFIS filter int (auto-increment)PfisFilter_Name Filter name. (Filters must be specified here! As a

first guess, here are the SALTICAM filters:)• U• B• V• R• I• Pinhole• Clear• ND1..9

varchar(7)

4.1.27 PfisPolarimetryThis table describes the polarimetry modes allowed by PFIS:

Field Description TypePfisPolarimetry_Key Unique identifier for each polarimetry mode int (auto-increment)PfisPolarimetry_Mode Polarimetry mode. Four types allowed:

o Linearvarchar(10)

Page 23: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

23

o Circularo All-Stokeso None

4.1.28 PfisGratingIf the PFIS spectroscopic observation uses gratings instead of Fabry-Perot, the details are stored in thistable.

Field Description TypePfisGrating_Key Unique identifier for each partner institution int (auto-increment)PfisExpo_Key Identifier of the exposure these details correspond

toforeign int

PfisGrating_Name Required grating name (lines/mm) intPfisGrating_Angle Grating Angle floatPfisGrating_Artic Articulation Station Position int

4.1.29 PfisFpIf this PFIS spectroscopic observation requires the use of Fabry-Perot filters, the details are specified inthis table.

Field Description TypePfisFp_Key Unique identifier for each Fabry-Perot

configurationint (auto-increment)

PfisExpo_Key Identifier of the exposure these details correspondto

foreign int

PfisFp_Mode One of these:L=LowM=MediumH=High

char(1)

PfisFp_Wstart Starting wavelength for the spectroscopy (A) floatPfisFp_Wend Ending wavelength (A) float

4.1.30 SalticamObsconfigIf the observation requires the use of SALTICAM as a science instrument, the high-level details of thisparticular observation configuration are held in this table:

Field Description TypeSalticamObsconfig_Key Unique identifier for each SALTICAM script int (auto-increment)Obsconfig_Key Identifier of which observation this script

belongs toforeign int

SalticamObsconfig_Script SALTICAM script textSalticamObsconfig_Desr Description of the script varchar(20)SalticamObsconfig_Flat Whether a flat field is required boolean (default Y)SalticamObsconfig_SkyFlat Whether a sky flat field is required boolean (default N)SalticamObsconfig_Dark Whether a dark frame is required boolean (default N)SalticamObsconfig_Std Whether a standard star observation is required boolean (default N)SalticamObsconfig_Bias Whether a bias frame is required boolean (default N)

4.1.31 SalticamExpoFor each SALTICAM script, more than one exposure per script is expected. Therefore, this table storesspecific details about each exposure. In order to minimize repetition, if many identical exposures are

Page 24: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

24

proposed in a continuous sequence, we store the data for the first one together with an Ncounts entryindicating how many repetitions of this same configuration are referred to by the same SalticamExpoentry. In order to trace which actual exposure (data file) corresponds to which entry, the FileNo storesthe actual order number of that first exposure.

Field Description TypeSalticamExpo_Key Unique identifier for each exposure int (auto-increment)SalticamObsconfig_Key Identifier of the script that will produce this file foreign intSalticamFilter_Key Identifier of the SALTICAM filter required for this

exposure (see SalticamCcd table)foreign int

DataType_Key Identifier of the type of file (see DataType table) foreign intSalticamExpo_Exptime Requested exposure time intSalticamExpo_FileNo Exposure order number in the script. intSalticamExpo_Ncounts Number of exposures this entry is relevant for int

4.1.32 SalticamCcdCCD configuration for each different SALTICAM exposure.

Field Description TypeSalticamCcd_Key Unique identifier for each CCD configuration int (auto-increment)SalticamExpo_Key Identifier of the exposure entry requiring this

setupforeign int

SalticamCcd_Pb Ccd pre-binning - RowsxColumns (max 9x9) char(3)SalticamCcd_ReadSpeed Speed of readout of the CCD:

F=FastS=SlowN=None

char(1)

SalticamCcd_Gain The gain setting of the CCD:B=BrightF=Faint

char(1)

SalticamCcd_Ft Frame-transfer mask setting:H=HalfN=NoneS=Slot

char(1)

SalticamCcd_Nwindows Number of windows int

4.1.33 SalticamFilterThis table identifies all SALTICAM filters.

Field Description TypeSalticamFilter_Key Unique identifier for each SALTICAM filter int (auto-increment)SalticamFilter_Name Filter name:

UBVRIPinholeClearND1..9 (Must indicate density)

varchar(7)

4.1.34 HrsObsconfigIf the observation requires the use of the High Resolution Spectrograph (HRS) as a science instrument,

Page 25: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

25

the high-level details of this particular observation configuration are held in this table:

Field Description TypeHrsObsconfig_Key Unique identifier for each HRS script int (auto-increment)Obsconfig_Key Identifier of which observation this script

belongs toforeign int

HrsObsconfig_Script HRS script textHrsObsconfig_Desr Description of the script varchar(20)

4.1.35 HrsMoIf the observation requires the use of the HRS as a science instrument, the high-level details of thisparticular observation configuration are held in this table:

Field Description TypeHrsMo_Key Unique identifier for each HRS Multi-Object

entryint (auto-increment)

Obsconfig_Key Identifier of which observation this scriptbelongs to

foreign int

HrsMo_Ra RA of each object in the field (hours) floatHrsMo_Dec Corresponding Dec of that object (degrees) float

4.1.36 HrsExpoFor each HRS script, more than one exposure per script is expected. Therefore, this table storesspecific details about each exposure. In order to minimize repetition, if many identical exposures areproposed in a continuous sequence, we store the data for the first one together with an Ncounts entryindicating how many repetitions of this same configuration are referred to by the same HrsExpo entry.In order to trace which actual exposure (data file) corresponds to which entry, the HrsExpo_FileNo fieldstores the actual order number of that first exposure.

Field Description TypeHrsExpo_Key Unique identifier for each exposure int (auto-increment)HrsObsconfig_Key Identifier of the script that will produce this file foreign intHrsFilter_Key Identifier of the HRS filter required for this exposure

(see HrsFilter table)foreign int

DataType_Key Identifier of the type of file (see DataType table) foreign intHrsExpo_Exptime Requested exposure time intHrsExpo_FileNo Exposure order number in the script. intHrsExpo_Ncounts Number of exposures this entry is relevant for int

4.1.37 HrsFilterThis table contains a list of filters available to the HRS (if any)

Field Description TypeHrsFilter_Key Unique identifier for each HRS Filter int (auto-increment)HrsFilter_Name Filter name foreign int

4.1.38 ObsStatsAfter each obsconfig has been completed, the SDB is required to store details for information, easyaccess and/or for statistical purposes. This tables contains global details regarding the observation ofthat obsconfig.

Page 26: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

26

Field Description TypeObsStats_Key Unique identifier for information obtained from an

observation configurationint (auto-increment)

NightInfo_Key Identifier of the night this obsconfig was observedin

foreign int

Obsconfig_Key Identifier of the originating observationconfiguration

foreign int

ObsStats_ChargedTime Total time (ksec) charged to this particularobservation. By default, this should add up to moreor less the total amount of time spent on the object,as specified in the TAC document, i.e.. from end ofprevious object’s last exposure to end of thisobject’s last exposure. However, to make it simplerfor time-tracking, this will be in some sort offormula. Suggested:from end of last exposure (previous pointing) tobeginning of current exposure + sum of allaccepted exposure times + in-between exposuresconfig time – ObsStats_AdjustTime

float

ObsStats_AdjustTime The amount of time (ksec) to subtract from the totalamount of time spent on object due to e.g. badweather, instrument problems etc. (needs to beentered by SA and details explained in log if non-zero)

float

ObsStats_Complete Whether this Obsconfig was complete or not (?) boolean (default Y)

4.1.39 NightInfoThis table joins all the information for any given night.

Field Description TypeNightInfo_Key Unique identifier for each observing night int (auto-increment)NightInfo_SoName Name of the SALT Operator (SO) for the night varchar(10)NightInfo_SaName Name of the SALT Astronomer (SA) for the night varchar(10)

4.1.40 SaLogThis table contains the SALT Astronomer (SA) logs for the night.

Field Description TypeSaLog_Key Unique identifier for each entry in the log int (auto-increment)NightInfo_Key Identifier of the night to which the log corresponds foreign intSaLog_Timestamp Date and time of the entry datetimeSaLog_Text The actual text entry varchar(200)

4.1.41 SoLogThis table contains the SALT Operator (SO)) logs for the night.

Field Description TypeSoLog_Key Unique identifier for each entry in the log int (auto-increment)NightInfo_Key Identifier of the night to which the log corresponds foreign intSoLog_Timestamp Date and time of the entry datetimeSoLog_Text The actual text entry varchar(200)

Page 27: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

27

4.1.42 FileDataThis table stores information regarding each FITS file.

Field Description TypeFileData_Key Unique identifier for each file int (auto-increment)ObsStats_Key Identifier of the observation this file pertains to foreign intTrack_Key Identifier of the track information for this file foreign intDataType_Key Type of data file (see DataType table) foreign intFileData_UtStart Start of the exposure (UT) datetimeFileData_Exptime Actual exposure time (s) floatFileData_TelRa Telescope RA during observation floatFileData_TelDec Telescope Dec during observation floatFileData_FileName File name varchar(200)FileData_Sn Signal-to-noise ratio of the data floatFileData_Accepted Whether the data is accepted by the SA and PI boolean (default Y)

4.1.43 DataTypeThis table contains all the different data types available.

Field Description TypeDataType_Key* Unique identifier for each data type int (auto-increment)DataType Type of data. Possibilities are:

o Objecto Darko Biaso Flato SkyFlato Arc

varchar(8)

4.1.44 PfisRealConfigAfter an observation has been carried out, this table will contain all of the actual instrumentconfiguration details for each exposure. It is still undecided what to store as yet.

Field Description TypePfisRealConfig_Key Unique identifier for each PFIS configuration int (auto-increment)FileData_Key Identifier of the data file this configuration refers to foreign int

4.1.45 HrsRealConfigAfter an observation has been carried out, this table will contain all of the actual instrumentconfiguration details for each exposure. It is still undecided what to store as yet.

Field Description TypeHrsRealConfig_Key Unique identifier for each HRS configuration int (auto-increment)FileData_Key Identifier of the data file this configuration refers to foreign int

4.1.46 SalticamRealConfigAfter an observation has been carried out, this table will contain all of the actual instrumentconfiguration details for each exposure. It is still undecided what to store as yet.

Page 28: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

28

Field Description TypeSalticamRealConfig_Key Unique identifier for each SALTICAM configuration int (auto-increment)FileData_Key Identifier of the data file this configuration refers to foreign int

4.1.47 TrackThis table contains all the track data belonging to a particular pointing.

Field Description TypeTrackEntry_Key Unique identifier for each entry in this table int (auto-increment)NightInfo_Key Identifier of the night in which this track was run foreign intTrack_id Unique identifier for each track int (auto-increment)

secondary keyTrack_Time Date and time of the track data datetimeTrack_Rho Rho position of the tracker floatTrack_MovingBaffleX X position of the moving baffle intTrack_MovingBaffleY Y position of the moving baffle intTrack_AdcPosZ Z position of the ADC floatTrack_AdcPosRho Rho angle of the ADC floatTrack_PupilMaskY Y position of the pupil mask intTrack_GuideProbeX X position of the guide probe intTrack_GuideProbeY Y position of the guide probe intTrack_SkyMag Sky magnitude (from the guide star information) floatTrack_EffArea Effective area of the mirror floatTrack_EE50 Seeing measurement on the guidance image floatTrack_EE80 Seeing measurement on the guidance image floatTrack_TelAltitude Altitude of tracker at this time floatTrack_TelAzimuth Azimuth of the tracker at this time floatTrack_Airmass Airmass at the time floatTrack_TelHourAngle Hour angle of the telescope at the time float

4.1.48 DimmThis table contains all the DIMM data belonging to a particular time.

Field Description TypeDimm_Key Unique identifier for each entry int (auto-increment)NightInfo_Key Unique identifier for each night’s data foreign intDimm_Time Date and time of the entry datetimeDimm_EE50 DIMM EE50 measurement at the time floatDimm_EE80 DIMM EE80 measurement at the time float

4.1.49 WeatherThis table contains all the weather information belonging to a particular time.

Field Description TypeWeather_Key Unique identifier for each weather entry int (auto-increment)NightInfo_Key Unique identifier for each night’s data foreign intWeather_Time Date and time of the entry datetimeWeather_Temp Temperature at the time floatWeather_WindSpeed Wind speed floatWeather_WindDir Wind direction float

Page 29: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

29

Weather_DewPt Dew point floatWeather_AirPress Atmospheric pressure float

4.1.50 ConcamThis table contains all the Concam data belonging to a particular time.

Field Description TypeConcam_Key Unique identifier for each entry int (auto-increment)NightInfo_Key Unique identifier for each night’s data foreign intConcam_Time Date and time of the entry datetimeConcam_Image Actual Concam image at that time blob

5 High-level interface descriptionDiagram 1 showed the various interfaces with the SDB.The current section deals with some more details: where the SDB gets populated from and whatprograms are allowed to view its contents:

5.1 PIPT – SDBThe PIs will populate the SDB with their proposal information (Phase I and Phase II). The PIPT will writeto the SDB only twice, once for each phase’s proposal submission. During Phase II the PIs will be ableto upload their already accepted Phase I proposal information into their Phase II proposal form. This mayenable PIs to modify their Phase I proposal contents if required and allowed by their own TAC (but thiswill be flagged in the SDB).

5.2 SDB - PI GUIAfter Phase II, a PI will be able to check the status of his/her proposal(s) over the internet anddownload their files. A username and password will have to be provided in order to access the SDB,thus a PI will only be able to look at his/her data.

5.3 SDB - SA GUIIn principle, the SA GUI will have read-write access to the full SDB contents, and will be useful in orderto modify SDB contents, e.g. priority modifiers. Commercial tools are currently being investigated for thispurpose and, currently, MySQL Manager is being used. For plotting of various parameters etc, it maybe necessary to write the ‘next’ incarnation of this software in Java.

5.4 SDB – OPTThe OPT will query the SDB every time it runs in order to update the list of objects available.

5.5 SDB – SAMMI/SOMMISAMMI/SOMMI will find a list of targets stored as a separate table in the database.

5.6 SDB – TCSThe TCS will populate the track SDB table as the observation progresses and search for the necessaryinformation not included in the SOMMI/SAMMI table. The TCS will send the instrument script directly toSALTICAM.

5.7 SDB – Instrument computer (PFIS and SCAM)The relevant instrument computer will query the database and retrieve the scripts it needs to perform aparticular observation (SALTICAM's script is sent to SALTICAM via the TCS)As for populating the SDB after an observation, the Instrument computer will insert the necessaryinformation into the database.

Page 30: TCS Science Database Software Design Document SDB SDD F.pdf · TCS Science Database Software Design Document Doc No. 1732AE0009 Issue F 3 DEFINITIONS Proposal Requirements for a full

TCS Science Database Software Design Document

Doc No. 1732AE0009 Issue F

30