コード例 #1
0
ファイル: display.py プロジェクト: chrisengelsma/csm
def loadPainting3Data(imageFile):
    fileName = "/Users/cengelsm/Test/pgsinterp3.p3"
    fis = FileInputStream(fileName)
    ois = PythonObjectInputStream(fis)
    p3 = ois.readObject()
    fis.close()
    image = readImage(imageFile)
    n1, n2, n3 = s1.count, s2.count, s3.count
    d1, d2, d3 = s1.delta, s2.delta, s3.delta
    f1, f2, f3 = s1.first, s2.first, s3.first
    l1, l2, l3 = s1.last, s2.last, s3.last
    ipg = ImagePanelGroup2(s1, s2, s3, image, p3.getPaint())
    ipg.setColorModel1(ColorMap.getGray())
    ipg.setColorModel2(ColorMap.getJet(0.5))
    ipg.setSlices(700, 50, 80)
    sf = SimpleFrame()
    world = sf.getWorld()
    world.addChild(ipg)
    sf.setSize(1250, 900)
    view = sf.getOrbitView()
    zscale = 0.75 * max(n2 * d2, n3 * d3) / (n1 * d1)
    view.setAxesScale(1.0, 1.0, zscale)
    view.setScale(1.3)
    view.setAzimuth(-65.0)
    view.setWorldSphere(BoundingSphere(BoundingBox(f3, f2, f1, l3, l2, l1)))
コード例 #2
0
ファイル: sos3.py プロジェクト: Jookai/xmw
def readTensors():
  tensorsFile = "st"+str(int(sigmaTensor))
  fis = FileInputStream(dataDir+dataPref+tensorsFile+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #3
0
ファイル: display.py プロジェクト: chrisengelsma/csm
def loadPainting3Data(imageFile):
  fileName = "/Users/cengelsm/Test/pgsinterp3.p3"
  fis = FileInputStream(fileName)
  ois = PythonObjectInputStream(fis)
  p3 = ois.readObject()
  fis.close()
  image = readImage(imageFile)
  n1,n2,n3 = s1.count,s2.count,s3.count
  d1,d2,d3 = s1.delta,s2.delta,s3.delta
  f1,f2,f3 = s1.first,s2.first,s3.first
  l1,l2,l3 = s1.last,s2.last,s3.last
  ipg = ImagePanelGroup2(s1,s2,s3,image,p3.getPaint())
  ipg.setColorModel1(ColorMap.getGray())
  ipg.setColorModel2(ColorMap.getJet(0.5))
  ipg.setSlices(700,50,80)
  sf = SimpleFrame()
  world = sf.getWorld()
  world.addChild(ipg)
  sf.setSize(1250,900)
  view = sf.getOrbitView()
  zscale = 0.75*max(n2*d2,n3*d3)/(n1*d1)
  view.setAxesScale(1.0,1.0,zscale)
  view.setScale(1.3)
  view.setAzimuth(-65.0)
  view.setWorldSphere(BoundingSphere(BoundingBox(f3,f2,f1,l3,l2,l1)))
コード例 #4
0
def readTensors():
  tensorsFile = "st"+str(int(sigmaTensor))
  fis = FileInputStream(dataDir+dataPref+tensorsFile+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #5
0
def readTensors(name):
  """
  Reads tensors from file with specified basename; e.g., "tpet".
  """
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #6
0
ファイル: displayTensors.py プロジェクト: eliasarias95/ea
def readTensors(name):
  """
  Reads tensors from file with specified basename; e.g., "tpet".
  """
  fis = FileInputStream(PATH+name)
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #7
0
ファイル: f3utils.py プロジェクト: BKJackson/idh
def readTensors(name):
  """
  Reads tensors from file with specified basename; e.g., "f3et".
  """
  fis = FileInputStream(f3dDataSetDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #8
0
ファイル: display.py プロジェクト: chrisengelsma/csm
def loadPaintingSlice(imageFile):
    fileName = "/Users/cengelsm/Test/paintings/pgs_02.p3"
    fis = FileInputStream(fileName)
    ois = PythonObjectInputStream(fis)
    p3 = ois.readObject()
    fis.close()
    image = readImage(imageFile)
    print s1.count, s2.count
    sl = 30
    xz = image[sl]
    pxz = p3.getPaint()[sl]
    panel = PlotPanel(PlotPanel.Orientation.X1DOWN_X2RIGHT)
    pv1 = panel.addPixels(s1, s2, xz)
    pv1.setPercentiles(1, 99)
    pv2 = panel.addPixels(s1, s2, pxz)
    pv2.setColorModel(ColorMap.getJet(0.5))
    panel.setVLabel("Depth (km)")
    panel.setHLabel("Distance (km)")
    frame = PlotFrame(panel)
    frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE)
    frame.setSize(1800, 1000)
    frame.setVisible(True)
    frame.setFontSizeForSlide(1, 1)
    frame.paintToPng(300, 6, "/Users/cengelsm/Desktop/test2.png")
コード例 #9
0
ファイル: display.py プロジェクト: chrisengelsma/csm
def loadPaintingSlice(imageFile):
  fileName = "/Users/cengelsm/Test/paintings/pgs_02.p3"
  fis = FileInputStream(fileName)
  ois = PythonObjectInputStream(fis)
  p3 = ois.readObject()
  fis.close()
  image = readImage(imageFile)
  print s1.count,s2.count
  sl = 30
  xz = image[sl]
  pxz = p3.getPaint()[sl]
  panel = PlotPanel(PlotPanel.Orientation.X1DOWN_X2RIGHT)
  pv1 = panel.addPixels(s1,s2,xz)
  pv1.setPercentiles(1,99);
  pv2 = panel.addPixels(s1,s2,pxz)
  pv2.setColorModel(ColorMap.getJet(0.5))
  panel.setVLabel("Depth (km)")
  panel.setHLabel("Distance (km)")
  frame = PlotFrame(panel)
  frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE)
  frame.setSize(1800,1000)
  frame.setVisible(True)
  frame.setFontSizeForSlide(1,1)
  frame.paintToPng(300,6,"/Users/cengelsm/Desktop/test2.png")
コード例 #10
0
ファイル: utils.py プロジェクト: Jookai/xmw
def readObject(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  obj = ois.readObject()
  ois.close()
  return obj
コード例 #11
0
def readObject(name):
    fis = FileInputStream(seismicDir + name + ".dat")
    ois = PythonObjectInputStream(fis)
    obj = ois.readObject()
    ois.close()
    return obj
コード例 #12
0
ファイル: fd3.py プロジェクト: BKJackson/idh
def readTensors(tensorsFile):
  fis = FileInputStream(tensorsFile)
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #13
0
ファイル: pgsutils.py プロジェクト: chrisengelsma/csm
def readTensors(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
コード例 #14
0
def readTensors(name):
    fis = FileInputStream(seismicDir + name + ".dat")
    ois = PythonObjectInputStream(fis)
    tensors = ois.readObject()
    fis.close()
    return tensors
コード例 #15
0
def readTensors(tensorsFile):
    fis = FileInputStream(tensorsFile)
    ois = PythonObjectInputStream(fis)
    tensors = ois.readObject()
    fis.close()
    return tensors