Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esheldon/meds
Python and C libraries to work with Multi Epoch Data Structures
https://github.com/esheldon/meds
astronomy python
Last synced: 11 days ago
JSON representation
Python and C libraries to work with Multi Epoch Data Structures
- Host: GitHub
- URL: https://github.com/esheldon/meds
- Owner: esheldon
- License: gpl-3.0
- Created: 2013-04-02T18:36:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T16:56:25.000Z (about 1 year ago)
- Last Synced: 2024-10-19T20:47:06.692Z (19 days ago)
- Topics: astronomy, python
- Language: Python
- Size: 365 KB
- Stars: 8
- Watchers: 6
- Forks: 10
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
```pythonimport 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)
```