Closed jsgeorge68 closed 7 years ago
The field xml definition is only valid for "uniform" - the other cases refer to mapped field. However some parameterization could easily be added in the xml definition if needed.
The linear interpolation was missing for dipole fields! This was fixed today in development.
This issue can be closed as now both "none" and "linear" are implemented.
I'm having trouble setting up a magnetic field using the dipole or cylindrical symmetry options. Separately, I am also not able to load a magnetic field map. I think it is very likely that I'm just doing something wrong but am running out of guesses. Can you help? I also don't fully understand the parameters and possible values available to use in the field definition file. Sometimes I see bx, by, bz, units, and other times Bunit, etc. This would be a good place to add some documentation if the mood strikes... :)
simple fields I have a small example that creates a field along the z-axis using 4 different definitions in separate volumes. I have a uniform field, a multipole (n=2) field rotated to point along z, a multipole (n=4) field also rotated, and a solenoid field defined using the cylinder-z symmetry. With the first 3 definitions I get a field created and can see the arrows with the camera button to show magnetic field. The solenoid field says it is created in the gemc output but no field is shown in the camera option and electrons don't bend in the volume. Any idea what I'm doing wrong here? Example is in dipole_magnet.zip
field maps In this example I am trying to define a field using a field map in the field definition file. I wrote a small python executable to generate the field file which should be aligned with the z-axis and uniform across a 20cm x 6cm x-y plane except that it reverses direction for x<0. The example finds the field definition and reads the map values correctly. It builds the field, attaches it to the volume. Then when a particle tracks through the volume gemc reports that is tracking in the field, but with large uniform steps and reports the field as 0. Using the camera option to look at the field gives an error message that there is no field in the scene. This may be related to the symmetry, not sure. The example is in ex2_field_map.zip
thanks!
dipole_magnet.zip ex2_field_map.zip