You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Erin Sheldon edited this page Mar 23, 2017
·
3 revisions
Examples
importmeds# create a MEDS object for the given MEDS filem=meds.MEDS(filename)
# read a cutout for object 35, cutout index 5index=35cutout_index=5image=m.get_cutout(index, cutout_index)
# typically the coadd is stored at cutout_index=0cutout_index=0coadd_im=m.get_cutout(index, cutout_index)
# get other image typesseg=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’)
# get a python list of all cutouts for this objectimlist=m.get_cutout_list(index)
seglist=m.get_cutout_list(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 cutoutsncutout=m[’ncutout’][index]
# process all objectsforiinxrange(m.size):
imlist=m.get_cutout_list(i)
# process the images# get the jacobian of the WCS transformation# as a dictj=m.get_jacobian(index, cutout_index)
# as a numpy matrixj=m.get_jacobian_matrix(index, cutout_index)
# list for all cutoutsjlist=m.get_jacobian_list(index)
# get the "ubserseg" weight mapwt=m.get_cweight_cutout_nearest(index, cutout_index)