2.5D Projections

Jonathan helped me alter the projections object to handle 2.5D data. The data is revolved around the symmetry axis (cylindrical z-axis = cartesian y-axis), and then summed along the line of sight (cartesian z-axis). This can be done for any field defined in fields.f90, but it is especially useful for creating emission maps.


How it Works in Astrobear

The projections object was also altered to handle an array of fields, instead of just one. Now you can have several projections in one .bov file, whereas before we would have a separate .bov file for each projection. Here's how you would initialize it:

CALL CreateProjection(Projection)
Projection%dim = CYLINDRICAL_PROJECTION
Projection%field(1)%id=Halpha_Field
Projection%field(1)%name="Halpha"
Projection%field(2)%id=SII_6716_Field
Projection%field(2)%name="SII_6716"
...

The CYLINDRICAL_PROJECTION parameter tells astrobear that this is 2.5D data, and it needs to revolve the data before integrating. Projections are always output to .bov files, but this is handled a little differently depending on how many fields your projection object has. If there is only one field, then the .bov file will contain the field name, and the variable in visit will appear as the field name. If there is more than one field, then the .bov file will contain the name 'projections', and the variable in visit will appear as a vector or array named 'projections'.


Visit

Visit can be a little quirky when handling a multi-component variable from a .bov file. I have seen that in visit 2.2.2, you cannot see each component separately. Instead, you have to write expressions to access each component individually. If the projection object has 2 or 3 fields, visit will read the variable projections as a vector. However, visit does not know how to use a 3-component vector within a 2D data set. So let's say for example that the 3 fields within your projection object are density, pressure, and temperature. In visit 2.2.2, you would have to write these expressions:

density = projections[0]     OR      density = array_decompose(projections,0)
pressure = projections[1]    OR      pressure = array_decompose(projections,1)
temperature = array_decompose(projections,2)  ! notice no choice for the 3rd component

If your projections object contains more than 3 fields, then visit will read the projections variable as an array, and then you have to use the array_decompose function for all elements of the projections array.

Jonathan found that visit 2.5 is a little better. This version of visit gives you the components of the projections vector or array individually. It names them consecutively as comp00, comp01, etc. There is still no way of naming the components by their appropriate field names before visit reads the .bov files. However, at least in this version of visit (and I would assume newer versions as well), you can rename the components with expressions without having to worry about that vector and array_decompose nonsense.

Comments

No comments.