ICD 1.9f/3.2

 

"Near-infrared Integral Field Spectrograph (NIFS) to Data Handling System"



Peter Young

Thursday, March 29, 2001

 

 

 

 

 

Version: 1.0

 

Issued By: Peter Young

 

Date:

Approved By: __________________________ Group Manager _________

 

__________________________ Group Manager (if req) _________

 

__________________________ Systems Engineering _________

 

 

Revision Control

 

 

1. Revision Version # 1.0

Date: 22 March 2001

Revised by: Peter Young

Reason for / items changed: Original NIFS version as ICD 1.9f/3.2, modeled after CICS ICD 1.9/3.2 version 1.2.

CONTENTS

Chapter 1 Introduction 6

1-1.0 Description 6

1-1.1 Purpose 6

1-1.2 Scope 6

1-2.0 Related Documents and Drawings 7

1-2.1 References 7

1-2.2 Abbreviations and Acronyms 7

1-2.3 Definitions 8

1-2.4 Stylistic Conventions 11

1-2.5 Related Interface Control Documents and Drawings 11

1-2.5.1 Conforming instrument ICDs 11

1-2.5.2 Guest instrument ICDs 12

1-2.5.3 Quasi instrument ICDs 12

Chapter 2 Logging Information from NIFS to the Data Handling System 13

2-1.0 Introduction 13

2-2.0 Physical System Interfaces 13

2-2.1 Mechanical Interface 13

2-2.2 Optical Interface 13

2-2.3 Electronic Interface 13

2-2.4 Mass/Balance 13

2-2.5 Thermal Interface 14

2-3.0 Software/Control Function Interface 14

2-3.1 Overview 14

2-3.1.1 Communications infrastructure 14

2-3.1.2 Software architecture 14

2-3.2 Behaviour 14

2-3.3 Implementation 14

2-4.0 Safety Issues 14

Chapter 3 Science Data from NIFS to the Data Handling System 15

3-1.0 Introduction 15

3-2.0 Physical System Interfaces 15

3-2.1 Mechanical Interface 15

3-2.2 Optical Interface 15

3-2.3 Electronic Interface 15

3-2.4 Mass/Balance 15

3-2.5 Thermal Interface 15

3-3.0 Software/Control Function Interface 15

3-3.1 Overview 15

3-3.1.1 Communication infrastructure 15

3-3.1.2 Software architecture 15

3-3.2 Behaviour 16

3-3.2.1 Terminology 16

3-3.2.2 Events and responses 16

3-3.2.3 Science data transmission scenario 16

3-3.3 Implementation 19

3-3.4 Detailed Description 19

3-3.4.1 Mandated and dynamic header information 19

3-3.4.2 Data structures for various kinds of science data 20

3-3.4.3 Command description 23

3-3.4.4 Status information 23

3-3.4.5 Alarm conditions 23

3-3.5 Debugging and Maintenance 23

3-3.6 Simulation 23

3-4.0 Safety Issues 23

Chapter 4 Calibration Data from DHS to NIFS 24

4-1.0 Introduction 24

4-2.0 Physical System Interfaces 24

4-2.1 Mechanical Interface 24

4-2.2 Optical Interface 24

4-2.3 Electronic Interface 24

4-2.4 Mass/Balance 24

4-2.5 Thermal Interface 24

4-3.0 Software/Control Function Interface 24

4-3.1 Overview 24

4-3.1.1 Communication infrastructure 24

4-3.1.2 Software architecture 25

4-3.2 Behaviour 25

4-3.2.1 Events and responses 25

4-3.2.2 Calibration data transmission scenario 25

4-3.3 Implementation 25

4-3.4 Detailed Description 25

4-3.4.1 Command description 25

4-3.4.2 Status information 25

4-3.4.3 Alarm conditions 25

4-3.5 Debugging and Maintenance 26

4-3.6 Simulation 26

4-4.0 Safety Issues 26

 

Introduction

Description
Purpose

This Interface Control Document describes the interface between the NIFS Instrument Control System and the Data Handling System (DHS). The document is divided into chapters, each one defining a different aspect of the NIFS to DHS interface. The chapters are as follows:

The specific interfaces described in this document are governed by the following parent Interface Control Documents, which describe the general properties for particular kinds of interface:

The intended audience for this document is:

  • the reviewers of NIFS;
  • the developers of the Gemini Data Handling System (DHS);
  • the developers of the other Gemini principal systems (TCS, OCS).
Scope

This interface control document describes:

  1. How logging information is made available to the DHS by NIFS;
  2. How science data, together with its dynamic header, is transferred from NIFS to the DHS;
  3. How calibration data, together with its header, are transferred from the DHS to NIFS.

It does not describe the status information that NIFS makes available for use in the static FITS header. This information is described in the "NIFS to OCS" interface control document, ICD 1.9f/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA..

This document also does not describe the mechanism which NIFS uses to make logging information available to the DHS, since this is already described in ICD/4.

Nor does this document describe the NIFS hardware, electronics and software design. (see See "NIFS Conceptual Design Review Vol 1", Research School of Astronomy and Astrophysics, Australian National University and See "NIFS Critical Design Review Vol 1", Research School of Astronomy and Astrophysics, Australian National University);

Note that the DHS interface for the NIFS Instrument Control System is constrained only by the following:

Related Documents and Drawings
References
SPE-C-G0037, "Software Design Description" , Gemini 8m Telescopes Project
  1. dhs_pdr_icd1c, "ICD 1c -- Baseline DHS interface" , Norman Hill, Severin Gaudet and Dale Kotturi, DAO
  2. dhs_pdr_icd3, " ICD 3 -- Bulk Data Transfer" , Norman Hill & Severin Gaudet, DAO.
  3. dhs_pdr_icd4, " ICD 4 -- Logging Interface" , Norman Hill & Severin Gaudet, DAO.
  4. cics_smb_017, "ICD 6 -- ICS/TCS Direct Control Interface" , Steven Beard, Royal Observatory Edinburgh.
  5. gscg.grp.???, "ICD 13 -- Standard Controller ", Bret Goodrich & Andrew Johnson, Gemini 8m Telescopes Project.
  6. gscg.grp.???, "ICD 18 -- World Coordinate System Information" , Steve Wampler and Steven Beard, Gemini 8m Telescopes Project.
  7. " ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface" , Mark Jarnyk, Peter Young, RSAA.
  8. cics_smb_002, "Core Instrument Control System -- Introduction & Specification" , Steven Beard, ROE.
  9. cics_smb_016, "The OCS/ICS/DHS Observing Sequence and Data Flow" , Steven Beard, Royal Observatory Edinburgh.
  10. cics_smb_022, "CICS -- Architectural Design Document" , Steven Beard, Royal Observatory Edinburgh.
  11. cics_smb_042, "The flow of WCS information through a Gemini ICS" , Steven Beard, Royal Observatory Edinburgh.
  12. "EPICS Channel Access Reference Manual" , J. O. Hill, Los Alamos National Laboratory
  13. tcs_ptw_008, "World Coordinates" , Pat Wallace, Rutherford Appleton Laboratory.
  14. "Representation of Celestial Coordinates in FITS" , E.W. Griesen and M.Calabretta, NRAO and ATNF.
  15. AAO/SDS_07, Self-defining Data System (SDS) , Jeremy Bailey, Anglo-Australian Observatory.
  16. AAO/IMP_MANUAL_8, Interprocess Message Passing (IMP) System , Keith Shortridge, Anglo-Australian Observatory.
  17. "NIFS Conceptual Design Review Vol 1", Research School of Astronomy and Astrophysics, Australian National University
  18. "NIFS Critical Design Review Vol 1", Research School of Astronomy and Astrophysics, Australian National University
Abbreviations and Acronyms

A&G Acquisition and Guidance

AC Acquisition Camera

CA Channel Access

CC Components Controller

CICS Core Instrument Control System

CPU Central Processing Unit

DAO Dominion Astrophysical Observatory

DEC Declination

DC Detector Controller

DHS Data Handling System

DRAMA Distributed AAO Real-time Monitor for Astronomy

EPICS Experimental Physics and Industrial Control System

FITS Flexible Image Transport System

GMOS Gemini Multi-Object Spectrograph

ICD Interface Control Document

ICS Instrument Control System

ID Identifier

IOC Input Output Controller

IR Infrared

IS Instrument Sequencer

IMP Interprocess Message Passing (part of DRAMA)

LAN Local Area Network

NIFS Near-infrared Integral-Field Spectrograph

OCS Observatory Control System

PDF Parameter Definition Format

RA Right Ascension

ROE Royal Observatory Edinburgh

RSAA Research School of Astronomy and Astrophysics

SAD Status and Alarm Database

SDS Self-defining Data System (part of DRAMA)

SIR Status and Information Record

TAC Telescope Allocation Committee

UT Universal Time

WCS World Coordinate System

Definitions
Acquisition and Guidance

Those operations associated with acquiring a science object and maintaining the correct pointing of the telescope and adjustment of the telescope's optics by means of guide stars.

Bad pixel mask

Calibration data containing a map of the pixels on a detector array, with defective pixels flagged in some way. The mask can be used to ensure that defective pixels are not included in the data processing. A bad pixel mask can also be used to mask off unwanted areas of the detector array which cannot be removed using a See Region of interest .

Bulk data

Header and pixel data which is to be transferred to the DHS for display or storage. Bulk data is transmitted using the protocol of ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO., rather than by EPICS channel access, See "EPICS Channel Access Reference Manual", J. O. Hill, Los Alamos National Laboratory. Compare with See Status information .

Calibration data

Any data used for some sort of calibration purpose. It might be a flat field observation, or an observation of a standard star, for example. It is possible for a set of data to be both See Calibration data and See Science Data .

Components Controller (CC)

An instrument subsystem responsible for the various mechanisms (e.g. motors and heaters) contained in an instrument.

Data array

That part of a See Frame containing the actual data detected. A data array may contain signal, variance or See Data quality .

Data label

A unique label for a See Data set assigned by the DHS or OCS which is used to identify data being sent to or requested from the DHS. When an instrument obeys an OBSERVE command, the See Data label for the See Data set generated is provided by the OCS. The See Data label for data generated spontaneously by a non-instrument data source, such as a wavefront sensor, is provided by the DHS.

Data LAN

The Local Area Network in the Gemini system devoted to the transfer of bulk data.

Data quality

Information describing the useability of each of the elements of the main signal See Data array , for example a bad pixel mask.

Data set

A self-contained collection of data generated as a result of an instrument obeying an OBSERVE command. Each OBSERVE command results in one and only one See Data set . All the data relating to one See Data set will be maintained by the DHS in a single container. A data set consists of some See Header data describing the See Data set plus one or more See Frame s.

Data set observation

This term is used in the CICS documentation to refer to the act of accumulating light on the detector in order to create a See Data set . It is what an instrument does in response to an OBSERVE command. Compare with the definition of See Observation .

Destructive read

A clocking out of the integrated signal recorded by a detector which results in that signal being discarded. A detector can only be read out once in such a mode.

Detector Controller (DC)

An instrument subsystem responsible for controlling a detector array and reading data from it. Note that this term has been used in Gemini documentation to refer both to the detector control electronics and the detector control software system . In the context of this software document the term refers to the detector control software system unless otherwise stated.

Dynamic Header

That part of the See Header data containing information about the See Data set which needs to be collected at a very precise time (such as the time at which the data collection started and finished). This part of the See Header data is typically provided by an instrument.

Engineering log

A record containing information of interest to an engineer who is testing a system or diagnosing a problem with a system. The "engineering log" might contain a record of debug messages generated by the system, plus a history of changes made to certain critical engineering parameters, plus anything else an engineer decides the system needs to record. The "engineering log" is more detailed and more configurable than the " See History log ", and refers only to a single system. The main purpose of the "engineering log" is to provide an engineer with detailed diagnostic information.

Exposure

The array of data resulting from reading the detector during or after a single exposure of the detector array to light. An exposure is made by resetting the detector, exposing it to light, and reading it one or more times (e.g. once in a See Destructive read mode or several times in a See Non-destructive read mode).

Frame

An image or spectrum capable of being displayed or processed as a discrete entity (for example an image of all the coadded exposures in one beam of a See Data set observation made in chop mode). A See Data set can be made of one or more frames (for example a See Data set in chop mode might consist of frames of coadded exposures in beams A and B). Each frame can consist of one or more combined See Exposure s.

Header data

A collection of attribute/value pairs which describe a See Data set or a See Frame within a See Data set .

History log

A record of the commands executed by a system and any significant changes to the system operation. The "history log" for an instrument might contain a record of the OCS sequence commands executed plus a record of the times when the instrument configuration was changed, and it is generally less detailed than an " See Engineering log ". History log events may be combined together to form a global history of all the events happening in the observatory. The main purpose of the history log is to record what happened during a night's observing, regardless of how many science programmes were involved.

Instrument Sequencer (IS)

That part of an Instrument Control System responsible for coordinating the actions of a Detector Controller and one or more Components Controllers. The A&G subsystem has a "Guidance and Beam Direction Sequencer" for coordinating its components.

Mandated Header

That part of the See Header data containing information describing a data array which must be present for the DHS to make sense of that data array. Such information includes the size and shape of the data array and the World Coordinate System (WCS) information .

Non-destructive read

A clocking out of the integrated signal recorded by a detector in a way which maintains that signal intact. The signal recorded by a detector can be sampled more than once in such a mode. This mode is often used to minimise the contribution from detector read noise.

Observation

An observation is a procedure, specified by the observer, designed to obtain scientific information from the light acquired from an object. To complete an observation, the OCS may need to issue several OBSERVE commands, which could result in several See Data set s. See also See Data set observation .

Observing log

This is a record of all the observations made as part of a particular observer's science programme, plus a summary of the observing conditions and a collection of all the comments made by the observer during those observations. The main purpose of the observing log is to provide the observer with a record of their particular science programme. (See also See Engineering log and See History log ).

Principal Systems

The Gemini Control System is made up of the OCS, TCS, DHS and one ICS for each instrument. These systems constitute the principal systems of the Gemini Control System.

Read

When used in the context of a detector controller, this refers to the read of a single pixel on the detector array.

Readout

When used as a noun to describe instrument data, this refers to the array resulting from a See Read of all the pixels on the detector inside a given region of interest (which may be the whole detector array). An See Exposure can be made from one or more readouts.

Region of interest

This is an area on the surface of a detector whose data are of interest. There may be one or more regions of interest on a detector array.

Science Data

Any data obtained as a result of a scientific observation. An image or spectrum of an astronomical object is an example of See Science Data . Compare with See Bad pixel mask and See Calibration data .

Static header

That part of the data header containing information which changes little with time during the collection of a See Data set (such as the telescope target coordinates and name of the observer). This part of the header is typically provided by the OCS, but some wavefront sensors may need to provide the information themselves.

Status information

Small quantities of information describing the configuration or status of a system. This information is usually stored in an EPICS database and communicated by channel access, See "EPICS Channel Access Reference Manual", J. O. Hill, Los Alamos National Laboratory. Compare with See Bulk data .

Status/Alarm Database (SAD)

This is an EPICS database containing the public status information for a Gemini principal system. For an Instrument Control System, the SAD would contain information about the configuration of the instrument's mechanisms, its current state and health, and information obtained from sensors.

VME

A real-time system obeying the ANSI/IEEE 1014-1987 Versatile Backplane Bus standard.

VxWorks

The Real Time Operating system from Wind River

World Coordinate System (WCS) information

Information describing the transformation between pixel coordinates in the data array and (RA,Dec) coordinates on the sky (see See cics_smb_042, "The flow of WCS information through a Gemini ICS", Steven Beard, Royal Observatory Edinburgh. and See tcs_ptw_008, "World Coordinates", Pat Wallace, Rutherford Appleton Laboratory.).

Stylistic Conventions

References to documents listed in See References are given like this, See SPE-C-G0037, "Software Design Description", Gemini 8m Telescopes Project.

Note that, unless otherwise specified, the term "Detector Controller" refers to the Detector Controller software system .

Related Interface Control Documents and Drawings

This ICD should be complemented by the following documents, to be provided by each individual instrument group:

Conforming instrument ICDs
  • ICD 1.9a/3.2 -- Near IR Imager (NIRI) to Data Handling System.
  • ICD 1.9b/3.2 -- Gemini Near IR Spectrograph (GNIRS) to Data Handling System.
  • ICD 1.9c/3.2 -- High Resolution Optical Spectrograph (HROS) to Data Handling System.
  • ICD 1.9d/3.2 -- Gemini Multi Object Spectrograph (GMOS) to Data Handling System.
  • ICD 1.9e/3.2 -- Mid IR Imager (MIRI) to Data Handling System.
  • ICD 1.9f/3.2 -- Near-infrared Integral Field Spectrograph (NIFS) to Data Handling System
Guest instrument ICDs
  • ICD 1.9q/3.2 -- Michelle to Data Handling System.
  • ICD 1.9r/3.2 -- Cryogenic Optical Bench (COB) to Data Handling System.
  • ICD 1.9s/3.2 -- Phoenix to Data Handling System.
Quasi instrument ICDs
  • ICD 1.6/3.2 -- A&G Control System to Data Handling System.

 

Logging Information from NIFS to the Data Handling System

Introduction
Physical System Interfaces
Mechanical Interface

Not Applicable for a software ICD.

Optical Interface

Not Applicable for a software ICD.

Electronic Interface

The full Gemini system hardware architecture is described in ICD 13, See gscg.grp.???, "ICD 13 -- Standard Controller", Bret Goodrich & Andrew Johnson, Gemini 8m Telescopes Project.. The hardware architecture for the ICS to DHS interface is shown in See The DHS and Instrument Control System Hardware Architecture. The DHS is implemented on a Unix workstation. An Instrument Control System is implemented on VME crates running the VxWorks real time operating system. For NIFS, the IS and CC are loaded on one VME crate, while the DC is loaded on a separate VME crate. The ICS and DHS will be connected by one Ethernet interface known as the Data LAN.

The DHS and Instrument Control System Hardware Architecture
Mass/Balance

Not Applicable for a software ICD.

Thermal Interface

Not Applicable for a software ICD.

Software/Control Function Interface
Overview
Communications infrastructure

The logging infrastructure uses the facilities of EPICS and in particular uses the services provided by Channel Access (CA). The full list of facilities provided by CA are described in reference See "EPICS Channel Access Reference Manual", J. O. Hill, Los Alamos National Laboratory. Logging information is transmitted over the Data LAN. For details of the protocol see ICD/4, See dhs_pdr_icd4, "ICD 4 -- Logging Interface", Norman Hill & Severin Gaudet, DAO..

Software architecture

A context diagram for the NIFS (science instrument) to DHS logging interface may be found in ICD/4, See dhs_pdr_icd4, "ICD 4 -- Logging Interface", Norman Hill & Severin Gaudet, DAO., and a data flow diagram of an instrument control system, showing the relation between it, its subsystems and the DHS, may be found in the CICS introduction See cics_smb_002, "Core Instrument Control System -- Introduction & Specification", Steven Beard, ROE.. The NIFS logging interface follows these rules and guidelines:

  1. All items to be logged by the DHS are contained in SIR records in the Status/Alarm Database of the NIFS ICS.
  2. According to Gemini policy NIFS has four status items called "historyLog" in its Status/Alarm databases, for conveying textual log messages to the DHS. In particular these are:
  3. nifs:historyLog - Instrument Sequencer;
  4. nifs:cc:historyLog - Components Controller;
  5. nifs:dc:historyLog - Detector Controller;
  6. nifs:wfs:historyLog - On-instrument wavefront sensor controller;

 

The software architecture is fully described in See "NIFS Critical Design Review Vol 1", Research School of Astronomy and Astrophysics, Australian National University.

Behaviour

The behaviour of the NIFS ICS to DHS logging interface is fully described in ICD/4, See dhs_pdr_icd4, "ICD 4 -- Logging Interface", Norman Hill & Severin Gaudet, DAO..

Implementation

The implementation of the NIFS ICS to DHS logging interface is fully described in ICD/4, See dhs_pdr_icd4, "ICD 4 -- Logging Interface", Norman Hill & Severin Gaudet, DAO..

Safety Issues

At present no safety issues have been identified relating to this interface.

Science Data from NIFS to the Data Handling System

Introduction

This chapter describes the protocol used to transfer science data from NIFS to the Data Handling System (DHS).

Physical System Interfaces
Mechanical Interface

Not applicable.

Optical Interface

Not applicable.

Electronic Interface

The system hardware architecture is the same as shown in See Electronic Interface.

Mass/Balance

Not applicable.

Thermal Interface

Not applicable.

Software/Control Function Interface
Overview
Communication infrastructure

The data are communicated over the Gemini Data LAN as SDS data structures transmitted using the IMP message passing system over the TCP/IP protocol. The method for transferring data between Gemini systems is described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO.. SDS is described in reference See AAO/SDS_07, Self-defining Data System (SDS), Jeremy Bailey, Anglo-Australian Observatory. and IMP in reference See AAO/IMP_MANUAL_8, Interprocess Message Passing (IMP) System, Keith Shortridge, Anglo-Australian Observatory..

Software architecture

A context diagram for the ICS (NIFS) to DHS bulk data interface may be found in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO., and a data flow diagram of an Instrument Control System, showing the relation between it, its subsystems and the DHS, may be found in the CICS introduction See cics_smb_002, "Core Instrument Control System -- Introduction & Specification", Steven Beard, ROE.. The NIFS to DHS bulk data interface follows the following rules and guidelines:

  1. It is good practise for the names of header items to be the same as their FITS keywords, but this is not a hard and fast rule. In general, the only systems which have to know anything about FITS keywords are the DHS and OCS.
  2. Each OBSERVE command results in one "data set". The command can result in more than one frame of data being produced, but the DHS always keeps all the data belonging to a particular data set in the same container. The contents of a data frame can be transmitted to the DHS in small chunks if desired.
Behaviour

Detailed behaviour of the bulk data transfer interface is described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Terminology

It is assumed that one OBSERVE command results in one See Data set . Each See Data set can contain one or more See Frames . Each See Frame is made by combining one or more See Exposures , and each See Exposure can be recorded from one or more See Readouts of the detector. See the definitions in See Definitions.

As an example, the data resulting from a See Data set collected in chop mode could be transmitted by an instrument in one of two ways: as a single coadded and sky-subtracted frame; or as two separate coadded frames for beams A and B. Each frame might consist of one exposure or a whole series of exposures coadded together.

Events and responses

The events and responses over this interface are exactly the same as the ones described in the "Events and Responses" section of ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO., except for "ICD 3 client" read "ICS".

Science data transmission scenario

See The flow of science data and headers through the Gemini Control System and NIFS shows the flow of science data through the Gemini Control System. Note that only the relevant subset of data flows are shown. For a complete data flow diagram see references See SPE-C-G0037, "Software Design Description", Gemini 8m Telescopes Project, See cics_smb_002, "Core Instrument Control System -- Introduction & Specification", Steven Beard, ROE. and See cics_smb_022, "CICS -- Architectural Design Document", Steven Beard, Royal Observatory Edinburgh.. See also the discussion in reference See cics_smb_016, "The OCS/ICS/DHS Observing Sequence and Data Flow", Steven Beard, Royal Observatory Edinburgh..

The flow of science data and headers through the Gemini Control System and NIFS

The sequence of events is as follows:

  1. The Observatory Control System (OCS) generates a data label, as described in ICD 1c, See dhs_pdr_icd1c, "ICD 1c -- Baseline DHS interface", Norman Hill, Severin Gaudet and Dale Kotturi, DAO.
  2. The OCS issues an " observe " command, together with the data label, to the Telescope Control System (TCS) and Instrument Control System (ICS).
  3. The Instrument Sequencer part of the ICS, which receives the commands from the OCS, forwards the " observe " command to the Detector Controller.
  4. The TCS and ICS maintain a Status Alarm Database (SAD) containing an up to date description (i.e. to within a few seconds) of their current state.
  5. After issuing the " observe " command the OCS waits for the Detector Controller (DC) to confirm it has started the data set observation (monitoring the " acq " flag described in ICD 1.9/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA.) and then takes a snapshot of the variables in the Status Alarm Databases whose values at the start of the data set observation are required in the data header. Examples are:
  6. TCS: RA and DEC of source, guiding information, airmass at data set observation start, etc...
  7. ICS: Current field stop, filter, slit, grating and focus setting, etc...
  8. The OCS adds some information of its own to the header information, for example:
  9. OCS: Science programme ID, name of observer, TAC reference, etc...
  10. The DC starts the data set observation and obtains some "world coordinate system information" from the TCS (see references See cics_smb_017, "ICD 6 -- ICS/TCS Direct Control Interface", Steven Beard, Royal Observatory Edinburgh., See gscg.grp.???, "ICD 18 -- World Coordinate System Information", Steve Wampler and Steven Beard, Gemini 8m Telescopes Project., See cics_smb_042, "The flow of WCS information through a Gemini ICS", Steven Beard, Royal Observatory Edinburgh. and See tcs_ptw_008, "World Coordinates", Pat Wallace, Rutherford Appleton Laboratory. for details). It converts this into a description of how the detector pixels map onto the sky and writes this information to the data header (see See "Representation of Celestial Coordinates in FITS", E.W. Griesen and M.Calabretta, NRAO and ATNF.).
  11. During the data set observation the DC collects any dynamic header information that the instrument builder has deemed important, for example:
  12. Time stamp at the start and end of each exposure, etc...
  13. The data set observation completes.
  14. The OCS detects the data set observation completion (monitoring the " acq " flag described in ICD 1.9/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA.), then takes a snapshot of the variables in the Status Alarm Databases whose values at the end of the data set observation are required in the data header. Examples are:
  15. TCS: airmass at data set observation end, etc...
  16. The DC reads out its detector and transfers the data, world coordinate system (WCS) information and dynamic header, together with the data label, to the DHS. The data transfer can be done in small chunks in parallel with the readout if necessary (as described in ICD 3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO.). This transfer takes place over the Gemini Data LAN.
  17. The DC, optionally, reformats the raw image into a data cube and compresses it along the spectral axis to form a spatial image of the object for sending for transient quick-look display.
  18. The DHS displays the raw data to the observer and writes the data to temporary store.
  19. The OCS sends the data label and static header information to the DHS.
  20. The DHS combines the data with its static header information supplied by the OCS and writes a new, complete, file of raw science data to a permanent data store1.
  21. The name of this new file is entered into the DHS data reduction queue.

The data reduction steps are not shown on the diagram, as they are not important to the ICS/DHS communication.

Implementation

Data are transmitted by making calls to the DHS library developed by the Data Handling System group. The functions in the DHS library are described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Detailed Description

For science instruments, data are transmitted to the DHS together with a mandated header describing the data, plus a dynamic header containing information collected during the data set observation. If the OCS is involved with a data set observation it sends the DHS a static header containing non-time-critical information relating to the data set observation. The static and dynamic headers are combined by the DHS. The procedure is described in reference See cics_smb_016, "The OCS/ICS/DHS Observing Sequence and Data Flow", Steven Beard, Royal Observatory Edinburgh..

NIFS headers are fully described in the NIFS to OCS interface ICD (1.9f/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA.). They are implemented as SIR records in the SAD.

Mandated and dynamic header information

NIFS is mandated to deliver at least the following items of header information (see ICD 3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO., for a description of the recommended types and data structures for these items). These are simply examples of header data that NIFS will supply, a full list is included in the PDF tables in ICD (1.9f/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA.):

  • For each data set:
  • Data label;
  • Lifetime of the data set;
  • Name of the quick look streams associated with the data set2. For NIFS there will be one quick look stream for the raw data and, optionally, a second quick look stream for the compressed spatial image.
  • Readout mode used;
  • Number of non-destructive reads;
  • Period between non-destructive reads;
  • Universal Time at the start and end of the data set observation (UTSTART, UTEND);
  • The total elapsed time (ELAPSED) and the total exposure time (EXPTIME);
  • Then for each frame within that data set:
  • Size and shape of the data array;
  • Data type of the data array;
  • Data units;
  • Plus the following items, which are relevant for science data only:
  • World Coordinate System information (e.g. sufficient information to be able to determine the [RA,Dec] of the centre of each pixel of the compressed spatial image of the object-- see See tcs_ptw_008, "World Coordinates", Pat Wallace, Rutherford Appleton Laboratory.).
Data structures for NIFS science data
  1. Spectral Data

Each NIFS data set observation will be contained in a standard DATASET structure, as described in the "Data Structure Specifics" section of ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO.. The DATASET structure will include necessary dynamic header information described in See Mandated and dynamic header information above and will have separate frames for each of the four readout amplifiers of the detector. Each of these frames will have a set of reference pixels that can be used for data calibration. The data and reference pixels will be stored in separate sub-frames but related through their frame identifiers. The number of reference pixels per quadrant will be controlled through a NIFS CAD parameter but will typically be 32. In addition to these data, variance and quality frames will also be stored.

In summary, each NIFS image file will contain sixteen separate frames, four per quadrant, i.e. intensity, variance, quality and reference data. The SDS data structure description is as follows:

 

dataset DHS_BD_DATASET {structure}

instrument DHS_DT_STRING "nifs"

telescope DHS_DT_STRING "Gemini North"

.

.

frame(1) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "1"

frameTitle DHS_DT_STRING "Quadrant 1 data array"

dataType DHS_DT_STRING "Intensity"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 0

.

frame(1) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "1.1"

frameTitle DHS_DT_STRING "Variance array"

dataType DHS_DT_STRING "Variance"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 0

.

frame(2) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "1.2"

frameTitle DHS_DT_STRING "Data quality array"

dataType DHS_DT_STRING "Quality"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 0

.

frame(3) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "1.3"

frameTitle DHS_DT_STRING "Reference pixel array"

dataType DHS_DT_STRING "Reference"

axisSize(1..2) DHS_DT_UNIT32 1024, 32

origin(1..2) DHS_DT_UNIT32 1024, 1024

.

frame(2) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "2"

frameTitle DHS_DT_STRING "Quadrant 2 data array"

dataType DHS_DT_STRING "Intensity"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 0

.

frame(1) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "2.1"

frameTitle DHS_DT_STRING "Variance array"

dataType DHS_DT_STRING "Variance"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 0

.

frame(2) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "2.2"

frameTitle DHS_DT_STRING "Data quality array"

dataType DHS_DT_STRING "Quality"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 0

.

frame(3) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "2.3"

frameTitle DHS_DT_STRING "Reference pixel array"

dataType DHS_DT_STRING "Reference"

axisSize(1..2) DHS_DT_UNIT32 32, 1024

origin(1..2) DHS_DT_UNIT32 1024, 0

.

frame(3) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "3"

frameTitle DHS_DT_STRING "Quadrant 3 data array"

dataType DHS_DT_STRING "Intensity"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 1024

.

frame(1) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "3.1"

frameTitle DHS_DT_STRING "Variance array"

dataType DHS_DT_STRING "Variance"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 1024

.

frame(2) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "3.2"

frameTitle DHS_DT_STRING "Data quality array"

dataType DHS_DT_STRING "Quality"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 0, 1024

.

frame(3) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "3.3"

frameTitle DHS_DT_STRING "Reference pixel array"

dataType DHS_DT_STRING "Reference"

axisSize(1..2) DHS_DT_UNIT32 1024, 32

origin(1..2) DHS_DT_UNIT32 0, 1024

.

frame(4) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "4"

frameTitle DHS_DT_STRING "Quadrant 4 data array"

dataType DHS_DT_STRING "Intensity"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 1024

.

frame(1) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "4.1"

frameTitle DHS_DT_STRING "Variance array"

dataType DHS_DT_STRING "Variance"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 1024

.

frame(2) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "4.2"

frameTitle DHS_DT_STRING "Data quality array"

dataType DHS_DT_STRING "Quality"

axisSize(1..2) DHS_DT_UNIT32 1024, 1024

origin(1..2) DHS_DT_UNIT32 1024, 1024

.

frame(3) DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "4.3"

frameTitle DHS_DT_STRING "Reference pixel array"

dataType DHS_DT_STRING "Reference"

axisSize(1..2) DHS_DT_UNIT32 32, 1024

origin(1..2) DHS_DT_UNIT32 1024, 1024

.

 

The intensity data arrays will be 1024 x 1024 pixels in size and are from separate quadrants of the detector. They are kept separately so that reference pixels from each quadrant can be used for image calibration.

The variance arrays will, for linear-fitted data, contain the variance of the least-squares linear fit.

The quality arrays will contain a single byte for each pixel with the following interpretation:

0 Normal pixel
1-254 Pixel saturated after this number of NDRs
255 Bad pixel


The reference pixel arrays contain calibration data for each quadrant of the detector and vary in axes size because of the detector amplifier readout orientation.

 

  1. Processed Image Data

NIFS will, optionally, send a compressed spatial image of the object to the DHS for transient display (see See Science data transmission scenario). These data will be in the following format:

 

dataset DHS_BD_DATASET {structure}

instrument DHS_DT_STRING "nifs"

telescope DHS_DT_STRING "Gemini North"

.

.

frame DHS_BD_FRAME {structure}

frameId DHS_DT_STRING "1"

frameTitle DHS_DT_STRING "Spatial image"

dataType DHS_DT_STRING "Intensity"

axisSize(1..2) DHS_DT_UNIT32 145, 140

 

The intensity data array will be 145 x 140 pixels in size and represents the 29 NIFS slitlets duplicated five times with 70 pixels in the spatial direction duplicated twice so that an approximately square image on the sky is displayed. (The 29 slitlets are 0.103" wide while the 70 spatial pixels are 0.0425" high, therefore the interpolated square pixels will be 0.0206" x 0.0213").

Command description

All the commands recognised by the DHS across a data link are described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Status information

All status information is transmitted to the DHS in a header attached to the data.

Alarm conditions

None known.

Debugging and Maintenance

This interface can be debugged by means as the Data Server emulator supplied by the DHS group, as described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Simulation

This interface can be simulated by means of the Data Server emulator supplied by the DHS group, as described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Safety Issues

At present no safety issues have been identified relating to this interface.

Calibration Data from DHS to NIFS

Introduction

This chapter describes the protocol used to transfer calibration data from the Data Handling System (DHS) to NIFS. NIFS needs the following:

  • A bad pixel mask to apply to each of its frames during image processing (for each of the three NIFS readout modes: double-correlated sampling, Fowler sampling and linear fitting). The bad pixel mask is then added to the NIFS image quality data for permanent storage (see See Data structures for NIFS science data).
  • A sky background frame to subtract from each frame so that a compressed spatial image of the observed object can be displayed in a quick-look tool. NIFS will use separate background frames for both idle and run modes of operation.

Most of the on-line processing of data is expected to be done by the DHS. However the NIFS DC will provide the option of displaying the compressed spatial image for at least engineering purposes (and perhaps in the absence of timely DHS facilities).

Physical System Interfaces
Mechanical Interface

Not applicable.

Optical Interface

Not applicable.

Electronic Interface

Same as that described in See Electronic Interface.

Mass/Balance

Not applicable.

Thermal Interface

Not applicable.

Software/Control Function Interface
Overview
Communication infrastructure

Same as that described in See Communication infrastructure.

Software architecture

Same as that described in See Software architecture.

Behaviour
Events and responses

The events and responses over this interface are exactly the same as the ones described in the "Events and Responses" section of ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO., except for "ICD 3 client" read "Detector Controller of the ICS".

Calibration data transmission scenario

See The flow of science data and headers through the Gemini Control System and NIFS shows the flow of science data through the Gemini Control System. Note that calibration data may flow from the DHS back to an Instrument Control System. This would happen only if an instrument needs to calibrate its data internally in real time before transmitting it to the DHS. This is true for NIFS, where compressed spatial images are required for real-time display. The basic scenario is as follows:

  1. The OCS instructs NIFS to take a calibration frame (giving NIFS a data label, as described in the scenario in See Science data transmission scenario).
  2. The Instrument Sequencer part of the NIFS ICS forwards the OCS commands to the DC part of the NIFS ICS.
  3. The DC takes the calibration frame and stores it internally.
  4. The calibration frame is sent by the DC to the DHS using the method described in See Science Data from NIFS to the Data Handling System.
  5. The DHS stores each calibration frame for future use.
  6. Whenever the NIFS DC requires a new calibration frame (e.g., after a change in configuration or at the beginning of a new session) it sends a request to the DHS for a particular data label.
  7. If the calibration data request is successful, the DHS transmits the contents of the file to the DC. If the calibration data request fails, the DHS will return an error.
  8. The DC stores the calibration frame internally and keeps it for future data preprocessing.
Implementation

Data are transmitted by making calls to the DHS library developed by the Data Handling System group. The functions in the DHS library are described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Detailed Description

Calibration data are transmitted as multi-frame two-dimensional images using the same data structure as described in See Detailed Description.

Command description

All the commands recognised by the DHS across a data link are described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Status information

All status information is transmitted to the DHS in a header attached to the data.

Alarm conditions

None known.

Debugging and Maintenance

This interface can be debugged by means as the Data Server emulator supplied by the DHS group, as described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Simulation

This interface can be simulated by means of the Data Server emulator supplied by the DHS group, as described in ICD/3, See dhs_pdr_icd3, "ICD 3 -- Bulk Data Transfer", Norman Hill & Severin Gaudet, DAO..

Safety Issues

At present no safety issues have been identified relating to this interface.

 


1. Note that "permanent data store" means a store which is not erased when the power is switched off. Files here will remain for a few days before being archived and then removed.

2. The name of the quick look stream is defined by means of the "setDhsInfo" command, as described in ICD 1.9f/3.1, See "ICD 1.9f/3.1 -- Near-infrared Integral-Field Spectrograph (NIFS) to Observatory Control System interface", Mark Jarnyk, Peter Young, RSAA..