Skip to content

Commit

Permalink
bugs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
esheldon committed Dec 18, 2020
1 parent a2d7d80 commit 4c9e765
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,45 @@ https://github.com/esheldon/meds/wiki
import meds

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

# read a cutout for object 35, cutout index 5
index=35
cutout_index=5
image=m.get_cutout(index, cutout_index)
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(index, cutout_index)
cutout_index = 1
im = m.get_cutout(object_index, cutout_index)

# get other image types
seg = m.get_cutout(index, cutout_index, type=’seg’)
wt = m.get_cutout(index, cutout_index, type=’weight’)
mask = m.get_cutout(index, cutout_index, type=’bmask’)
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(index)
seglist = m.get_cutout_list(index,type=’seg’)
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’][index]
for i in xrange(ncutout):
imlist=m.get_cutout_list(i)
# process the images
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(index, cutout_index)
j = m.get_jacobian(object_index, cutout_index)

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

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

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

0 comments on commit 4c9e765

Please sign in to comment.