Skip to content

Creating MEDS Files in Python

Erin Sheldon edited this page Nov 17, 2015 · 7 revisions

Using a MEDSMaker

Example

import meds
maker = meds.MEDSMaker(obj_data,
                       image_info,
                       config=config,
                       meta_data=meta_data)
maker.write(filename)

MEDSMaker inputs

The MEDSMaker class takes the following inputs

  • a minimal object_data structure. Use meds.util.get_meds_input_struct to create one.
  • image_info structure. Use meds.util.get_image_info_struct to create one.
  • optional meta_data structure
  • optional configuration

The image_info and meta_data are described at MEDS Format. The object_data and configuration are described below

object_data structure

The minimal object_data structure has the following columns for each object

name     type     description
------------------------------------------------------------
id       integer  Identifier
box_size integer  Cutout box size
ra       f8       Right ascension in degrees for each object
dec      f8       Declination in degrees for each object

Note the id and box_size can be any integer type.

Configuration

The default configuration can be found here:

All values can be over-ridden via the conf= keyword

Clone this wiki locally