Changes between Version 42 and Version 43 of Shape/ExternalData
- Timestamp:
- 07/13/15 15:52:17 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Shape/ExternalData
v42 v43 4 4 [[PageOutline]] 5 5 6 As we know very well, AstroBEAR generates simulations in HDF5 (Hierarchical Data Format), i.e. Chombo, files. As far as we know Shapehas 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 Shapeto not look as defined as those one could make in VisIt with the same simulation, as they are meant to look like emission maps.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. 11 11 12 12 '''Links''' … … 19 19 ---- 20 20 21 In this tutorial in visualizing external data in Shape, we will be visualizing a sphere generated by the following script:21 In this tutorial in visualizing external data in ''Shape'', we will be visualizing a sphere generated by the following script: 22 22 23 23 [[CollapsibleStart(Pseudo ASCII data generator (python))]] … … 100 100 In 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. 101 101 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.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''. 103 103 104 104 2. 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. 105 105 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 Shapeto where our ASCII file is.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. 107 107 108 108 || [[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''. 110 110 111 111 '''On Input Properties''': … … 115 115 1. ''Filename'': The path used to reach your ASCII file is input here. 116 116 2. ''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}}}.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}}}. 118 118 4. ''Comment'': How comments are denoted in your ASCII file. Keep the default of {{{#}}}. 119 119 5. ''n'': Keep this as the default ({{{1}}}). … … 122 122 '''Column Separator''' 123 123 124 How is your file delimited? Typically when you input the ''filename'' Shapewill adjust the column separator automatically. However check that it is correct.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. 125 125 126 126 '''Center''' … … 145 145 '''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''. 146 146 147 Click the icon at the top of the ShapeGUI that looks like a chalkboard. Now move on to the next section of this tutorial.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. 148 148 149 149 [[CollapsibleEnd]] … … 181 181 182 182 6. Click the ''Edit'' button. 183 7. Also note that if you scroll down the main options page in Shapefor your new ''Custom'' species, you'll see that we have {{{n}}}, or ''Density'', as our variable mapping.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. 184 184 8. Recall that our format string for our imported data is in terms of the columns with headers {{{px,py,pz,vx,vy,vz,n}}}. 185 185 … … 224 224 225 225 [[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 ShapeGUI. 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. 227 227 228 228 [[CollapsibleEnd]] … … 256 256 257 257 [[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. 259 259 260 260 [[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''. 262 262 263 263 || [[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]]