targets¶
Overview¶
Catalogs of targets, standard stars, and sky monitor fibers, plus corresponding metadata.
Creators¶
- Next-Field-Selector
- PlateMaker testing and simulation
- nfssim
Users¶
This list is not promised to be comprehensive.
Contents¶
There is a global header with metadata, plus three separate tables, each with their own headers and columns.
Global header¶
The global header is empty.
Target table¶
Header¶
name | type | units | comment |
---|---|---|---|
TILEID | integer | ||
TILERA | float | decimal degrees | |
TILEDEC | float | decimal degrees | |
REFEPOCH | float | years | epoch |
Table columns¶
Storage and access¶
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 some sample data loaded:
>>> from PlateMaker import test_data
>>> targets = test_data.targets
The data are stored in a python OrderedDict
. A data
element in the
dictionary contains a numpy.recarray
with the content of the
table, and other elements of the dictionary contain the header:
>>> targets[0]
OrderedDict()
>>> targets[1].keys()
odict_keys(['EXTNAME', 'TILEID', 'TILERA', 'TILEDEC', 'REQRA', 'REQDEC', 'REFEPOCH', 'PROGRAM', 'HA_MIN', 'MA_MAX', 'data'])
>>> targets[1]['data'].dtype
dtype((numpy.record, ['TARGETID', '<i8'), ('TARGET_RA', '<f8'), ('TARGET_DEC', '<f8'), ('TARGET_RA_IVAR', '<f4'), ('TARGET_DEC_IVAR', '<f4'), ('PMRA', '<f4'), ('PMDEC', '<f4'), ('PMRA_IVAR', '<f4'), ('PMDEC_IVAR', '<f4'), ('LAMBDA_REF', '<f4'), ('DESIGN_X', '<f4'), ('DESIGN_Y', '<f4'), ('FIBER', '<i4'), ('LOCATION', '<i4'), ('FIBERSTATUS', '<i4'), ('DEVICE_LOC', '<i4'), ('PETAL_LOC', '<i2')]))
>>> targets[2].keys()
odict_keys(['EXTNAME', 'TILEID', 'TILERA', 'TILEDEC', 'REQRA', 'REQDEC', 'REFEPOCH', 'data'])
>>> targets[2]['data'].dtype
dtype((numpy.record, [('TARGETID', '<i8'), ('TARGET_RA', '<f8'), ('TARGET_DEC', '<f8'), ('TARGET_RA_IVAR', '<f4'), ('TARGET_DEC_IVAR', '<f4'), ('PMRA', '<f4'), ('PMDEC', '<f4'), ('PMRA_IVAR', '<f4'), ('PMDEC_IVAR', '<f4'), ('FLUX_G', '<f4'), ('FLUX_R', '<f4'), ('FLUX_Z', '<f4'), ('ETC_FLAG', '<i2'), ('GUIDE_FLAG', '<i2'), ('FOCUS_FLAG', '<i2'), ('GFA_LOC', '<i2')]))
>>> targets[3].keys()
odict_keys(['EXTNAME', 'TILEID', 'TILERA', 'TILEDEC', 'REQRA', 'REQDEC', 'SEED', 'HPXNSIDE', 'HPXNEST', 'data'])
>>> targets[3]['data'].dtype
dtype((numpy.record, [('TARGETID', '<i8'), ('TARGET_RA', '<f8'), ('TARGET_DEC', '<f8'), ('APFLUX15_G', '<f4'), ('APFLUX15_R', '<f4'), ('APFLUX15_Z', '<f4'), ('DESIGN_X', '<f4'), ('DESIGN_Y', '<f4'), ('FIBERSTATUS', '<i4'), ('LOCATION', '<i4'), ('DEVICE_LOC', '<i4'), ('PETAL_LOC', '<i2')]))
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', targets=targets)
'SUCCESS'
and get them back (not generally useful):
>>> retrieved_targets = pm.execute('get', 'targets')
Name template: | target-${SEQID}.fits |
---|---|
Format: | FITS |
>>> import astropy.io.fits as fits
>>> from PlateMaker import test_data
>>> fname = test_data.data_dir + '/target-52254.1.fits'
>>> for idx, hdu in enumerate(fits.open(fname)):
... print("******** HDU " + str(idx) + " ********")
... hdu.header
******** HDU 0 ********
SIMPLE = T
BITPIX = 8
NAXIS = 0
EXTEND = T
******** HDU 1 ********
XTENSION= 'BINTABLE'
BITPIX = 8
NAXIS = 2
NAXIS1 = 74
NAXIS2 = 5000
PCOUNT = 0
GCOUNT = 1
TFIELDS = 16
EXTNAME = 'FIBER_ASSIGNMENTS'
TILEID = 52255 / Tile ID
TILERA = 1.80000000000000E+02 / Field center RA
TILEDEC = 1.00000000000000E+01 / Field center DEC
REQRA = 1.80000000000000E+02 / Requested RA
REQDEC = 1.00000000000000E+01 / Requested DEC
REFEPOCH= 2.01550000000000E+03 / Reference Epoch
TFORM1 = '1K '
TTYPE1 = 'TARGETID'
TFORM2 = '1D '
TTYPE2 = 'TARGET_RA'
TFORM3 = '1D '
TTYPE3 = 'TARGET_DEC'
TFORM4 = '1E '
TTYPE4 = 'PMRA '
TFORM5 = '1E '
TTYPE5 = 'PMDEC '
TFORM6 = '1E '
TTYPE6 = 'PMRA_IVAR'
TFORM7 = '1E '
TTYPE7 = 'PMDEC_IVAR'
TFORM8 = '1E '
TTYPE8 = 'TARGET_RA_IVAR'
TFORM9 = '1E '
TTYPE9 = 'TARGET_DEC_IVAR'
TFORM10 = '1E '
TTYPE10 = 'LAMBDA_REF'
TFORM11 = '1E '
TTYPE11 = 'DESIGN_X'
TFORM12 = '1E '
TTYPE12 = 'DESIGN_Y'
TFORM13 = '1J '
TTYPE13 = 'FIBER '
TFORM14 = '1J '
TTYPE14 = 'FIBERSTATUS'
TFORM15 = '1J '
TTYPE15 = 'DEVICE_LOC'
TFORM16 = '1I '
TTYPE16 = 'PETAL_LOC'
******** HDU 2 ********
XTENSION= 'BINTABLE'
BITPIX = 8
NAXIS = 2
NAXIS1 = 68
NAXIS2 = 436
PCOUNT = 0
GCOUNT = 1
TFIELDS = 16
EXTNAME = 'GFA_TARGETS'
TILEID = 52255 / Tile ID
TILERA = 1.80000000000000E+02 / Field center RA
TILEDEC = 1.00000000000000E+01 / Field center DEC
REQRA = 1.80000000000000E+02 / Field center RA
REQDEC = 1.00000000000000E+01 / Field center DEC
REFEPOCH= 2.01550000000000E+03 / Reference Epoch
TFORM1 = '1K '
TTYPE1 = 'TARGETID'
TFORM2 = '1D '
TTYPE2 = 'TARGET_RA'
TFORM3 = '1D '
TTYPE3 = 'TARGET_DEC'
TFORM4 = '1E '
TTYPE4 = 'TARGET_RA_IVAR'
TFORM5 = '1E '
TTYPE5 = 'TARGET_DEC_IVAR'
TFORM6 = '1E '
TTYPE6 = 'PMRA '
TFORM7 = '1E '
TTYPE7 = 'PMDEC '
TFORM8 = '1E '
TTYPE8 = 'PMRA_IVAR'
TFORM9 = '1E '
TTYPE9 = 'PMDEC_IVAR'
TFORM10 = '1E '
TTYPE10 = 'FLUX_G '
TFORM11 = '1E '
TTYPE11 = 'FLUX_R '
TFORM12 = '1E '
TTYPE12 = 'FLUX_Z '
TFORM13 = '1I '
TTYPE13 = 'ETC_FLAG'
TFORM14 = '1I '
TTYPE14 = 'GUIDE_FLAG'
TFORM15 = '1I '
TTYPE15 = 'FOCUS_FLAG'
TFORM16 = '1I '
TTYPE16 = 'GFA_LOC '
******** HDU 3 ********
XTENSION= 'BINTABLE'
BITPIX = 8
NAXIS = 2
NAXIS1 = 74
NAXIS2 = 20
PCOUNT = 0
GCOUNT = 1
TFIELDS = 16
EXTNAME = 'SKY_MONITOR'
TILEID = 52255 / Tile ID
TILERA = 1.80000000000000E+02 / Field center RA
TILEDEC = 1.00000000000000E+01 / Field center DEC
REQRA = 1.80000000000000E+02 / Requested RA
REQDEC = 1.00000000000000E+01 / Requested DEC
SEED = ...
HPXNSIDE= 64
HPXNEST = T
TFORM1 = '1K '
TTYPE1 = 'TARGETID'
TFORM2 = '1D '
TTYPE2 = 'TARGET_RA'
TFORM3 = '1D '
TTYPE3 = 'TARGET_DEC'
TFORM4 = '1E '
TTYPE4 = 'TARGET_RA_IVAR'
TFORM5 = '1E '
TTYPE5 = 'TARGET_DEC_IVAR'
TFORM6 = '1E '
TTYPE6 = 'PMRA '
TFORM7 = '1E '
TTYPE7 = 'PMDEC '
TFORM8 = '1E '
TTYPE8 = 'PMRA_IVAR'
TFORM9 = '1E '
TTYPE9 = 'PMDEC_IVAR'
TFORM10 = '1E '
TTYPE10 = 'APFLUX15_G'
TFORM11 = '1E '
TTYPE11 = 'APFLUX15_R'
TFORM12 = '1E '
TTYPE12 = 'APFLUX15_Z'
TFORM13 = '1E '
TTYPE13 = 'DESIGN_X'
TFORM14 = '1E '
TTYPE14 = 'DESIGN_Y'
TFORM15 = '1J '
TTYPE15 = 'DEVICE_LOC'
TFORM16 = '1I '
TTYPE16 = 'PETAL_LOC'