Skip to content

Commit

Permalink
improved customizable config
Browse files Browse the repository at this point in the history
  • Loading branch information
febret committed Aug 24, 2016
1 parent ec77cce commit 4f6a0b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions config.py → examples/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

# use this to load a single file.
# <<<<<<< Updated upstream
# datasetPath = '/Volumes/Windows/dev/omegalib/apps/firefly/snapshot_140.hdf5'
datasetPath = 'snapshot_140.hdf5'
# =======
datasetPath = 'C:/Users/defaultuser0/snapshot_140.hdf5'
#datasetPath = 'C:/Users/defaultuser0/snapshot_140.hdf5'
# >>>>>>> Stashed changes


Expand Down
5 changes: 4 additions & 1 deletion firefly.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from omium import *
import porthole
import datetime
import sys

# # Initialize the signac point cloud rendering module. Whenever new data is loaded
# # call the redraw function to refresh the screen.
Expand All @@ -17,7 +18,9 @@

# #-------------------------------------------------------------------------------
# # Load firefly components
orun('firefly/config.py')
configFile = sys.argv[1]
orun(configFile)
orun(loaderScript)
orun('firefly/colormapConfig.py')
orun('firefly/render.py')
orun('firefly/loader.py')
Expand Down
10 changes: 4 additions & 6 deletions loader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
l = FireLoader()
l.open(datasetPath)

# change the last number to choose a different decimation level for data loading
pointCloudLoadOptions = "50000 0:100000:10"

# # PartType0
ds0 = Dataset.create('PartType0')
ds0.setLoader(l)
Expand All @@ -17,8 +14,8 @@
vy0 = ds0.addDimension('Velocities', DimensionType.Float, 1, 'vy')
vz0 = ds0.addDimension('Velocities', DimensionType.Float, 2, 'vz')

m0 = ds0.addDimension('Masses', DimensionType.Float,0, 'm')
e0 = ds0.addDimension('InternalEnergy',DimensionType.Float,0,'e')
#m0 = ds0.addDimension('Masses', DimensionType.Float,0, 'm')
#e0 = ds0.addDimension('InternalEnergy',DimensionType.Float,0,'e')

pc0 = PointCloud.create('pc0')
pc0.setOptions(pointCloudLoadOptions)
Expand All @@ -39,6 +36,7 @@
pc1.setColor(Color('blue'))

parts = [pc0, pc1]


dataModes = [
'DataType',
Expand Down Expand Up @@ -94,4 +92,4 @@ def setDataMode(mode):
pc1.setVisible(False)
redraw()

setDataMode(0)
setDataMode(0)

0 comments on commit 4f6a0b3

Please sign in to comment.