Exemplo n.º 1
0
# ------------------------------------------------------------------

# wavelengths and names of reference images used during fit; number of output simulations
waves = ["0.345", "0.475", "0.622", "0.763", "0.905", "1.22", "1.63", "2.19"]
refs = [
    "U_NORM.fits", "G_NORM.fits", "R_NORM.fits", "I_NORM.fits", "Z_NORM.fits",
    "J_extr.fits", "H_extr.fits", "K_NORM.fits"
]
numSimulations = 88

# ------------------------------------------------------------------

# build a list of reference images
refImages = []
for ref in refs:
    im = RGBImage(ref)
    im.setrange(0, 8e-5)
    im.applycmap("afmhot")
    refImages.append(im)

# make all reference images the same shape, and remember the final shape of a single image
for i in refImages:
    for j in refImages:
        i.enlargecanvas(j)
imageShape = refImages[0].shape

# stack the reference images on top of each other
fullRef = refImages[0]
for i in range(1, len(refImages)):
    fullRef.addbelow(refImages[i])
Exemplo n.º 2
0
from pts.core.basics.rgbimage import RGBImage
from pts.core.basics.moviefile import MovieFile

# ------------------------------------------------------------------

# wavelengths and names of reference images used during fit; number of output simulations
waves = ["0.345","0.475","0.622","0.763","0.905","1.22","1.63","2.19"]
refs=["U_NORM.fits","G_NORM.fits","R_NORM.fits","I_NORM.fits","Z_NORM.fits","J_extr.fits","H_extr.fits","K_NORM.fits"]
numSimulations = 88

# ------------------------------------------------------------------

# build a list of reference images
refImages = []
for ref in refs:
     im = RGBImage(ref)
     im.setrange(0,8e-5)
     im.applycmap("afmhot")
     refImages.append(im)

# make all reference images the same shape, and remember the final shape of a single image
for i in refImages:
     for j in refImages:
          i.enlargecanvas(j)
imageShape = refImages[0].shape

# stack the reference images on top of each other
fullRef = refImages[0]
for i in range(1,len(refImages)):
     fullRef.addbelow(refImages[i])
Exemplo n.º 3
0
print(waves)

# Define new colormap for residuals
def discrete_cmap(N=8):
    # define individual colors as hex values
    cpool = [ '#000000', '#00EE00', '#0000EE', '#00EEEE', '#EE0000',
              '#FFFF00', '#EE00EE', '#FFFFFF']
    cmap_i8 = col.ListedColormap(cpool[0:N], 'i8')
    cm.register_cmap(cmap=cmap_i8)

# -----------------------------------------------------------------

# build a list of residual images
resImages = []
for res in res:
     im = RGBImage(res)
     im.setrange(0,1)
     discrete_cmap();
     im.applycmap("i8")
     resImages.append(im)

# make all residual images the same shape, and remember the final shape of a single image
for i in resImages:
     for j in resImages:
          i.enlargecanvas(j)
imageShape = resImages[0].shape

# stack the residual images on top of each other
fullRes = resImages[0]
for i in range(1,len(resImages)):
     fullRes.addbelow(resImages[i])