gfa_images¶
Overview¶
This is the image data from the DESI Guide-Focus-Alignment (GFA) CCDs.
Creators¶
- Guider-Focus-Alignment system
- PlateMaker testing and simulation
- nfssim
Contents¶
Header¶
The following keyword/value pairs store the metadata for the exposure:
keyword | sample value | type | units | description |
---|---|---|---|---|
OBSNUM | 52254 | integer | Exposure ID | |
TILEID | 52254 | integer | Tile ID | |
RA | 180.0 | float | degrees | |
DEC | 10.0 | float | degrees | |
LST | 12:00:00.00 | string | ||
MJD | 58566.0 | float | days | Modified Julian Date |
DATE-OBS | 2019-03-24T07:00:00 | string | UT Date/Time | |
EXPTIME | 10.0 | float | seconds | |
INSTRUME | DESI | string | Proto or full DESI | |
OPENSHUT | 2019-07-12T07:00:00 | string | UT Date/Time | |
DEVICE | GFA1G | string | ||
OBSTYPE | FULL | string | Observation type | |
OBSFRAME | 0 | int | ||
EXPREQ | 1.00000000000000E+01 | float | Requested exposure time | |
TIME-OBS | 07:00:00” | string | UT time only |
Image data¶
These data consist of a set of images, ordered by increasing petal number.
Storage and access¶
Through DOS¶
After the seqid
is set, the set
and get
PML
commands may be used to
provide PlateMaker with the targets, and retrieve them back if wanted.
First, a PML
connection must be established:
>>> from DOSlib.PML import dos_connection
>>> pm = dos_connection('PLATEMAKER')
>>> pm.execute('configure')
'SUCCESS'
and same sample data loaded:
>>> from PlateMaker import test_data
>>> gfa_images = test_data.gfa_images
The python represnation shall be a FITS dictionary, in which
keyword/value pairs are stored directly. The image itself shall be
stored as a numpy
ndarray
assigned to the data
keyword of
this dictionary:
>>> gfa_images.keys()
odict_keys(['OBSNUM', 'TILEID', 'RA', 'DEC', 'LST', 'MJD', 'DATE-OBS', 'EXPTIME', 'INSTRUME', 'OPENSHUT', 'DEVICE', 'OBSTYPE', 'OBSFRAME', 'EXPREQ', 'TIME-OBS', 'data', 'ext_name'])
>>> gfa_images['data'][1].dtype
dtype('>i4')
>>> gfa_images['data'][1].shape
(1024, 2048)
We need to set the seqid
in PlateMaker to prepare it for
working on a sequence:
>>> pm.execute('set', seqid=52254)
'SUCCESS'
Then we can set targets
:
>>> pm.execute('set', gfa_images=gfa_images)
'SUCCESS'
and get them back (not generally useful):
>>> retrieved_gfa_images = pm.execute('get', 'gfa_images')
Preferred file representation¶
Name template: | gfa-${SEQID}.fits |
---|---|
Format: | FITS |
All keywords appear in the primary header (HDU0
), and the GFA
image appears in the primary HDU as well.
Example FITS
header¶
Images start in HDU 1, in order of petal number. (The primary HDU contains to image.)
- ::
>>> import astropy.io.fits as fits >>> from PlateMaker import test_data >>> fname = test_data.data_dir + '/gfa-52254.1.fits' >>> for idx, hdu in enumerate(fits.open(fname)): ... print("******** HDU " + str(idx) + " ********") ... hdu.header ... ******** HDU 0 ******** SIMPLE = T BITPIX = 16 NAXIS = 0 EXTEND = T OBSNUM = 52254 / Exposure ID TILEID = 52254 / Tile ID RA = 1.80000000000000E+02 / Degrees DEC = 1.00000000000000E+01 / Degrees LST = '12:00:00.00' / Sidereal Time (Babylonian) MJD = 5.82046583680556E+04 / Modified Julian Date DATE-OBS= '2018-03-27T15:00:00' / UT Date/Time EXPTIME = 1.00000000000000E+01 INSTRUME= 'DESI ' / Proto or full DESI OPENSHUT= '2018-03-27T15:00:00' / UT Date/Time DEVICE = 'GFA1G ' / Device location OBSTYPE = 'FULL ' / Observation type FILENAME= ''/tmp/junk.fits'' OBSFRAME= 0 EXPREQ = 1.00000000000000E+01 / Requested exposure time TIME-OBS= '15:00:00"' / UT time only CHECKSUM= 'checksum' / HDU checksum updated xxxx DAASUM = 'datasum ' / HDU checksum updated xxxx NEXTEND = 6 / Number of extension images ******** HDU 1 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '3 ' ******** HDU 2 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '5 ' ******** HDU 3 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '7 ' ******** HDU 4 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '8 ' ******** HDU 5 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '0 ' ******** HDU 6 ******** XTENSION= 'IMAGE ' BITPIX = 32 NAXIS = 2 NAXIS1 = 2048 NAXIS2 = 1024 PCOUNT = 0 GCOUNT = 1 EXTNAME = '2 '