target_spots

Overview

The target spot positions from the FVC.

Creators

  • Fiber-View-Camera system
  • PlateMaker testing and simulation
    • fvcsim

Users

  • internal to PlateMaker
    • fvcMatchMerge

Contents

Table columns

# name type units description
1 serial integer    
2 x_pix float    
3 y_pix float    
4 mag float    
5 pos_err float    
6 flag int    

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 some sample data loaded:

>>> from PlateMaker import test_data
>>> target_spots = test_data.target_spots

The data are stored in a numpy.recarray:

>>> target_spots.dtype
dtype((numpy.record, [('serial', '<i8'), ('x_pix', '<f8'), ('y_pix', '<f8'), ('mag', '<f8'), ('pos_err', '<f8'), ('flags', '<i8')]))

We need to set the seqid in PlateMaker to prepare it for working on a sequence:

>>> pm.execute('set', seqid=test_data.seq_id)
'SUCCESS'

Then we can set target_spots:

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

and get them back:

>>> retrieved_target_spots = pm.execute('get', 'target_spots')

Preferred file representation

Name template:fvc-target-${SEQID}.dat
Format:whitespace delimited ASCII text

Example start of file contents

::
>>> from PlateMaker import test_data
>>> fname = test_data.data_dir + '/fvc-target-52254.5.dat'
>>> print(open(fname,'r').readline())
#serial  x_pix  y_pix  mag  pos_err  flags

>>> print(open(fname, 'r').read()) 
#serial  x_pix  y_pix  mag  pos_err  flags
3000 -2935.786 2796.600 0. 0. 36
3001 -23.483 1.892 0. 0. 4
3002 117.536 245.940 0. 0. 4
3003 117.435 -242.325 0. 0. 4