Changes between Version 42 and Version 43 of Shape/ExternalData


Ignore:
Timestamp:
07/13/15 15:52:17 (9 years ago)
Author:
madams
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Shape/ExternalData

    v42 v43  
    44[[PageOutline]]
    55
    6 As we know very well, AstroBEAR generates simulations in HDF5 (Hierarchical Data Format), i.e. Chombo, files. As far as we know Shape has not yet been developed to import HDF5. Currently it accepts ASCII files. Therefore the simulations you want to visualize will need to be in ASCII form.
    7 
    8 Shape can read and visualize 3D simulations. However make sure that the columns in your ASCII file are converted to a 3D Cartesian coordinate system. You will need a minimum of 7 columns, of the form: {{{px, py, pz, vx, vy, vz, n}}}. Where all {{{pi}}} are the positions in {{{(x, y, z)}}}, all {{{vi}}} are the respective velocities, and {{{n}}} is the density. One can also have a column for temperature {{{T}}}, and pressure {{{P}}}. Unlike VisIt, where you visualize the time evolution of a simulation frame-by-frame, Shape will only require one frame to be visualized. In Shape, you can rotate it and study the morphology at that instant. It may be best to visualize with VisIt first, pick your frame, and then convert it to ASCII. See the '''Before Starting''' section for more on this.
    9 
    10 Remember that Shape's goal is to be a software that reduces restrictions on physical assumptions so that astronomers can make a realistic reconstruction of an astrophysical object's morphology. Thus the software is useful for defining 3D structural elements to create a model that can be optimized to fit an observation. Here, by importing external data, we are approaching from the opposite angle. We are using a code to generate a simulation of an object, or phenomena, that is comparable to actual astrophysical objects. In Shape we can then visualize, and compare these simulations more easily with observation. Expect the animations you make with Shape to not look as defined as those one could make in VisIt with the same simulation, as they are meant to look like emission maps.
     6As we know very well, AstroBEAR generates simulations in HDF5 (Hierarchical Data Format), i.e. Chombo, files. As far as we know ''Shape'' has not yet been developed to import HDF5. Currently it accepts ASCII files. Therefore the simulations you want to visualize will need to be in ASCII form.
     7
     8''Shape'' can read and visualize 3D simulations. However make sure that the columns in your ASCII file are converted to a 3D Cartesian coordinate system. You will need a minimum of 7 columns, of the form: {{{px, py, pz, vx, vy, vz, n}}}. Where all {{{pi}}} are the positions in {{{(x, y, z)}}}, all {{{vi}}} are the respective velocities, and {{{n}}} is the density. One can also have a column for temperature {{{T}}}, and pressure {{{P}}}. Unlike VisIt, where you visualize the time evolution of a simulation frame-by-frame, ''Shape'' will only require one frame to be visualized. In ''Shape'', you can rotate it and study the morphology at that instant. It may be best to visualize with VisIt first, pick your frame, and then convert it to ASCII. See the '''Before Starting''' section for more on this.
     9
     10Remember that ''Shape's'' goal is to be a software that reduces restrictions on physical assumptions so that astronomers can make a realistic reconstruction of an astrophysical object's morphology. Thus the software is useful for defining 3D structural elements to create a model that can be optimized to fit an observation. Here, by importing external data, we are approaching from the opposite angle. We are using a code to generate a simulation of an object, or phenomena, that is comparable to actual astrophysical objects. In ''Shape'' we can then visualize, and compare these simulations more easily with observation. Expect the animations you make with ''Shape'' to not look as defined as those one could make in VisIt with the same simulation, as they are meant to look like emission maps.
    1111
    1212'''Links'''
     
    1919----
    2020
    21 In this tutorial in visualizing external data in Shape, we will be visualizing a sphere generated by the following script:
     21In this tutorial in visualizing external data in ''Shape'', we will be visualizing a sphere generated by the following script:
    2222
    2323[[CollapsibleStart(Pseudo ASCII data generator (python))]]
     
    100100In order to import external data, we will need to use one of the ''mesh objects'' listed at the top of the '''3D Module''' ('''Figures 2 & 3''') (''Sphere, Torus, Cone, Cube, Plane, Cylinder, etc.'') to carry it into the software. This is all done in this module, and then we visualize it in the '''Render Module.''' We start in the ''General'' tab.
    101101
    102 1. In this case we chose the ''sphere.'' Simply click the icon, then click in any of the four windows. Then click again to choose the size of the sphere. The size does not matter, as we will get rid of the sphere later on. We just need it to carry the data into Shape.
     1021. In this case we chose the ''sphere.'' Simply click the icon, then click in any of the four windows. Then click again to choose the size of the sphere. The size does not matter, as we will get rid of the sphere later on. We just need it to carry the data into ''Shape''.
    103103
    1041042. Note that under the general tab we can change the name of the object. We do this here in '''Figure 4''' (below), to ''External Sphere''. You don't have to change it. But it might be useful in case you want to import other simulations in the same session.
    105105
    106 3. Choose the ASCII format, as that is the format our simulation is in. Then click the square button next to the drop down tab, to import the data in the ''Input Parameters'' dialog. This is what it looks like before we direct Shape to where our ASCII file is.
     1063. Choose the ASCII format, as that is the format our simulation is in. Then click the square button next to the drop down tab, to import the data in the ''Input Parameters'' dialog. This is what it looks like before we direct ''Shape'' to where our ASCII file is.
    107107
    108108|| [[Image(Screen Shot 2015-06-16 at 13.20.57.png, width=800)]] || [[Image(Screen Shot 2015-06-16 at 13.23.32.png, width=350)]] || [[br]]
    109 '''Image(s) 4 & 5.''' (left) The 3D module after opening the ASCII renderer, and having changed the name of the mesh object. (right) The input parameters for the ASCII simulation we are aiming to import into Shape.
     109'''Image(s) 4 & 5.''' (left) The 3D module after opening the ASCII renderer, and having changed the name of the mesh object. (right) The input parameters for the ASCII simulation we are aiming to import into ''Shape''.
    110110
    111111'''On Input Properties''':
     
    1151151. ''Filename'': The path used to reach your ASCII file is input here.
    1161162. ''dNum'': Keep this as the default ({{{1E4}}}).
    117 3. ''Format'': As seen in '''Figure 4''' the default is {{{px,py,pz,n,vx,vy,vz,T,P}}}. These are all the variable columns you may input to shape: position, density, velocity, temperature, and pressure. However in this case we are simply going to use the position, velocity coordinates, and density. Therefore the format will be {{{px,py,pz,vx,vy,vz,n}}}.
     1173. ''Format'': As seen in '''Figure 4''' the default is {{{px,py,pz,n,vx,vy,vz,T,P}}}. These are all the variable columns you may input to ''Shape'': position, density, velocity, temperature, and pressure. However in this case we are simply going to use the position, velocity coordinates, and density. Therefore the format will be {{{px,py,pz,vx,vy,vz,n}}}.
    1181184. ''Comment'': How comments are denoted in your ASCII file. Keep the default of {{{#}}}.
    1191195. ''n'': Keep this as the default ({{{1}}}).
     
    122122'''Column Separator'''
    123123
    124 How is your file delimited? Typically when you input the ''filename'' Shape will adjust the column separator automatically. However check that it is correct.
     124How is your file delimited? Typically when you input the ''filename'', ''Shape'' will adjust the column separator automatically. However check that it is correct.
    125125
    126126'''Center'''
     
    145145'''Image 7'''. In ''3D Module'' directing you to the ''Physics Module'' for the purpose of creating a species for our emission map to be viewed in the ''Render Module''.
    146146
    147 Click the icon at the top of the Shape GUI that looks like a chalkboard. Now move on to the next section of this tutorial.
     147Click the icon at the top of the ''Shape'' GUI that looks like a chalkboard. Now move on to the next section of this tutorial.
    148148
    149149[[CollapsibleEnd]]
     
    181181
    1821826. Click the ''Edit'' button.
    183 7. Also note that if you scroll down the main options page in Shape for your new ''Custom'' species, you'll see that we have {{{n}}}, or ''Density'', as our variable mapping.
     1837. Also note that if you scroll down the main options page in ''Shape'' for your new ''Custom'' species, you'll see that we have {{{n}}}, or ''Density'', as our variable mapping.
    1841848. Recall that our format string for our imported data is in terms of the columns with headers {{{px,py,pz,vx,vy,vz,n}}}.
    185185
     
    224224
    225225[[Image(Screen Shot 2015-07-13 at 14.57.28.png, width=800)]] [[br]]
    226 '''Image 15.''' The ''3D Module'' is the 3x3x3 cube near the left-hand corner of the Shape GUI. See the red circle.
     226'''Image 15.''' The ''3D Module'' is the 3x3x3 cube near the left-hand corner of the ''Shape'' GUI. See the red circle.
    227227
    228228[[CollapsibleEnd]]
     
    256256
    257257[[Image(Screen Shot 2015-06-16 at 13.28.02-new.png, width=800)]] [[br]]
    258 '''Image 19.'''
     258'''Image 19.''' The data points from the ASCII file are indicated by the red circle in the ''Right'' view. However note that it is present in all of the views.
    259259
    260260[[Image(Screen Shot 2015-07-13 at 15.09.42.png, width=800)]] [[br]]
    261 '''Image 20.'''
     261'''Image 20.''' Zoomed up on the ASCII file imported into ''Shape''.
    262262
    263263|| [[Image(Screen Shot 2015-07-13 at 15.10.06.png, width=250)]] || [[Image(Screen Shot 2015-07-13 at 15.10.18.png, width=250)]] || [[br]]