guider_wcs

Overview

WCS paramaters expected to be suitable for guider images.

Creators

  • PlateMaker external interface
  • PlateMaker internals
    • gfaWcsJob

Users

This list is not promised to be comprehensive.

Contents

Table columns

# name type units description
1 Petal integer   PETAL_ID from DESI docdb-2724
2 CRVAL1 float degrees as per FITS WCS standard
3 CRVAL2 float degrees as per FITS WCS standard
4 CRPIX1 float pixels as per FITS WCS standard
5 CRPIX2 float pixels as per FITS WCS standard
6 CD1_1 float   as per FITS WCS standard
7 CD1_2 float   as per FITS WCS standard
8 CD2_1 float   as per FITS WCS standard
9 CD2_2 float   as per FITS WCS standard

Storage and access

Through DOS

After gfaproc is run for a sequence, the get PML command may be used retrieve the guider_wcs data from PlateMaker.

First, a PML connection must be established:

>>> from DOSlib.PML import dos_connection
>>> pm = dos_connection('PLATEMAKER')
>>> pm.execute('configure')
'SUCCESS'

The guider_wcs data is normally calculated by PlateMaker when gfaproc is called. So, load some sample input for it, and run gfaproc:

>>> from PlateMaker import test_data
>>> nfsdata = test_data.nfs_data
>>> gfa_images = test_data.gfa_images
>>> stdstars = test_data.stdstars
>>> pm.execute('set', instrument=test_data.inst_name)
'SUCCESS'
>>> pm.execute('set', seqid=test_data.seq_id)
'SUCCESS'
>>> pm.execute('set', nfsdata=nfsdata)
'SUCCESS'
>>> pm.execute('set', gfa_images=gfa_images, stdstars=stdstars)
'SUCCESS'
>>> pm.execute('gfaproc')
'SUCCESS'

Now we can retrieve guider_wcs from PlateMaker, which it will return in the form of numpy.recarray.

>>> guider_wcs = pm.execute('get', 'guider_wcs')
>>> guider_wcs.shape
(6,)
>>> guider_wcs.dtype
dtype((numpy.record, [('PETAL', '<i8'), ('CRVAL1', '<f8'), ('CRVAL2', '<f8'), ('CRPIX1', '<f8'), ('CRPIX2', '<f8'), ('CD1_1', '<f8'), ('CD1_2', '<f8'), ('CD2_1', '<f8'), ('CD2_2', '<f8')]))

Then we can also send values for guider_wcs to PlateMaker (never really a useful thing to do):

>>> pm.execute('set', guider_wcs=guider_wcs)
'SUCCESS'

Preferred file representation

Name template:wcs-guider-{PLATE_ID}.{CONFIG_ID}.dat
Format:whitespace delimited ASCII text

Example file contents

::
>>> from PlateMaker import test_data
>>> fname = test_data.data_dir + '/wcs-guider-52254.4.dat'
>>> print(open(fname, 'r').readline())
#PETAL CRVAL1 CRVAL2 CRPIX1 CRPIX2 CD1_1 CD1_2 CD2_1 CD2_2

>>> print(open(fname, 'r').read()) 
#PETAL CRVAL1 CRVAL2 CRPIX1 CRPIX2 CD1_1 CD1_2 CD2_1 CD2_2
0 ...