Code Monkey home page Code Monkey logo

meds's Introduction

meds

A Python library to create and read Multi Epoch Data Structures. A minimal C library is also provided for reading MEDS files

Documentation

Full instructions for installing and using the python and C libraries are here:

https://github.com/esheldon/meds/wiki

A few examples for reading files

import meds

# create a MEDS object for the given MEDS file
m = meds.MEDS(filename)

# read a cutout for object 35, cutout index 5
object_index = 35
cutout_index = 5
image = m.get_cutout(object_index, cutout_index)

# read the second cutout for this object
cutout_index = 1
im = m.get_cutout(object_index, cutout_index)

# get other image types
seg = m.get_cutout(object_index, cutout_index, type=seg’)
wt = m.get_cutout(object_index, cutout_index, type=weight’)
mask = m.get_cutout(object_index, cutout_index, type=bmask’)

# get a python list of all cutouts for this object
imlist = m.get_cutout_list(object_index)
seglist = m.get_cutout_list(object_index, type=seg’)

# The contents of the object data table is loaded when the MEDS object is
# created, and are accessible by name.

# number of cutouts
ncutout = m[’ncutout’][object_index]
for i in range(ncutout):
    cutout = m.get_cutout(object_index, i)
    # process the image

# get the jacobian of the WCS transformation
# as a dict
j = m.get_jacobian(object_index, cutout_index)

# as a numpy matrix
j = m.get_jacobian_matrix(object_index, cutout_index)

# list for all cutouts
jlist = m.get_jacobian_list(object_index)

# get the "ubserseg" weight map
wt = m.get_cweight_cutout_nearest(object_index, cutout_index)

meds's People

Contributors

esheldon avatar beckermr avatar dhayaaanbajagane avatar emhuff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.