39 | | * Here is a full list of the various Projection parameters with the default values |
40 | | {{{ |
41 | | TYPE(FieldDef) :: Field ! Field to use |
42 | | REAL(KIND=qPREC), DIMENSION(:,:), ALLOCATABLE :: Data ! column density of field |
43 | | INTEGER :: dim=3 ! projection axis |
44 | | REAL(KIND=qPREC) :: pow=1d0 ! Power to raise field value to |
45 | | LOGICAL :: lReadCameraList=.false. ! Can be used instead of a single camera to make movies |
46 | | INTEGER :: PlotLevel=MAXIMUMPLOTLEVEL ! Sets resolution of output to that of PlotLevel. |
47 | | TYPE(ShapeDef), POINTER :: Shape => NULL() ! Optional Shape object which can be used to exclude points outside of shape. |
48 | | TYPE(ProjectionDef), POINTER :: next |
49 | | TYPE(CameraDef), POINTER :: Camera => NULL() ! Optional camera if image is not along principal axis |
50 | | TYPE(ImageDef), POINTER :: Image => NULL() ! Optional image object which will produce a file |
51 | | }}} |
52 | | |
53 | | * At each process event (currently each frame) a bov/dat file pair will be generated in the out directory ie. {{{out/cooling_strength_along_3_00014.bov}}} and {{{out/cooling_strength_along_3_00014.dat}}}. The {{{.bov}}} file contains information about the data as well as the location of the actual data file {{{.dat}}} which contains the raw unformatted binary data. Visit will only recognize the {{{.bov}}} files. After opening the file, there will be a 2D dataset with a single variable '''projection''' that contains the integrated values. |
54 | | |
55 | | |
56 | | * Making movies using the camera list: If Projection%lReadCameraList == .true. then a file camera.data should be present in the run directory. The first line contains the number of cameras and then there should be that many camera namelists each with properties for the camera for each image should be shown. The camera%id will be present in the filename... and only the camera properties that change need to be present... (ie focus, up vector, are inherited from the previous camera - but can be changed) |
| 39 | * If instead of just one camera angle, you would like a sequence of camera angles for every frame you can read in a camera list. If Projection%lReadCameraList == .true. then a file camera.data should be present in the run directory. The first line contains the number of cameras and then there should be that many camera namelists each with properties for the camera for each image should be shown. The camera%id will be present in the filename... and only the camera properties that change need to be present... (ie focus, up vector, are inherited from the previous camera - but can be changed) |
97 | | write(*,*) 'MyCamera%pos=', focus(1)-r*cos(theta), focus(2)-r*sin(theta), focus(3) |
98 | | write(*,*) 'MyCamera%id=', i |
| 80 | write(*,*) 'Camera%pos=', focus(1)-r*cos(theta), focus(2)-r*sin(theta), focus(3) |
| 81 | write(*,*) 'Camera%id=', i |
| 87 | |
| 88 | * And finally if you want to make a movie where the camera position changes in time, you can create a movie object. |
| 89 | |
| 90 | {{{ |
| 91 | NAMELIST /CameraData/ pos, focus, upvector, time |
| 92 | CALL InitMovie(Projection%movie, nCameras) |
| 93 | DO i=1,nCameras |
| 94 | READ(PROBLEM_DATA_HANDLE,NML=CameraData) |
| 95 | CALL AddMovieCamera(Projection%movie, pos, focus, upvector, time) |
| 96 | END DO |
| 97 | CALL FinalizeMovie(Projection%Movie) |
| 98 | END IF |
| 99 | }}} |
| 100 | |
| 101 | where the data file would have |
| 102 | {{{ |
| 103 | &CameraData |
| 104 | pos= 0.0000000E+00 50.00000 50.00000 |
| 105 | focus = 0.0 0.0 0.0 |
| 106 | upvector = 0.0 1.0 0.0 |
| 107 | time=0 |
| 108 | / |
| 109 | &CameraData |
| 110 | pos= 0.0000000E+00 0.00000 50.00000 |
| 111 | focus = 0.0 0.0 0.0 |
| 112 | upvector = 0.0 1.0 0.0 |
| 113 | time=1 |
| 114 | / |
| 115 | }}} |
| 116 | Other camera attributes like field of view, aspect, etc... should be set for the projection's camera object. |
| 117 | |
| 118 | * Here is a full list of the various Projection parameters with the default values |
| 119 | {{{ |
| 120 | TYPE(FieldDef) :: Field ! Field to use |
| 121 | REAL(KIND=qPREC), DIMENSION(:,:), ALLOCATABLE :: Data ! column density of field |
| 122 | REAL(KIND=qPREC) :: pow=1d0 ! Power to raise field value to |
| 123 | INTEGER :: PlotLevel=MAXIMUMPLOTLEVEL ! Sets resolution of output to that of PlotLevel. |
| 124 | TYPE(ShapeDef), POINTER :: Shape => NULL() ! Optional Shape object which can be used to exclude points outside of shape. |
| 125 | INTEGER :: dim=3 ! projection axis |
| 126 | TYPE(CameraDef), POINTER :: Camera => NULL() ! Optional camera if image is not along principal axis |
| 127 | LOGICAL :: lReadCameraList=.false. ! Can be used instead of a single camera to make a sequence of projections for each frame |
| 128 | TYPE(ImageDef), POINTER :: Movie => NULL() ! Optional movie object which will produce a sequence of projections from different viewpoints. |
| 129 | TYPE(ImageDef), POINTER :: Image => NULL() ! Optional image object which will produce a ppm file in addition to the bov file. |
| 130 | TYPE(ProjectionDef), POINTER :: next |
| 131 | }}} |
| 132 | |
| 133 | * At each process event (currently each frame) a bov/dat file pair will be generated in the out directory ie. {{{out/cooling_strength_along_3_00014.bov}}} and {{{out/cooling_strength_along_3_00014.dat}}}. The {{{.bov}}} file contains information about the data as well as the location of the actual data file {{{.dat}}} which contains the raw unformatted binary data. Visit will only recognize the {{{.bov}}} files. After opening the file, there will be a 2D dataset with a single variable '''projection''' that contains the integrated values. |
| 134 | |
| 135 | * If you want .ppm files which can be converted to .jpeg using !ImageMagick's convert program, then you need to create the projection's [ImageObject image object] |
| 136 | |
| 137 | * You can also use the [wiki:bov2jpeg bov2jpeg] program to quickly turn your bov files into jpeg's outside of astrobear. |
| 138 | |
| 139 | |
| 140 | |