Skip to content

Improve decision on field quantity in MeshPlotter

Paul Jean Schutze requested to merge pschutze/allpix-squared:fix_plotter into master

In the MeshPlotter up to now the decision on whether the field is a vector or a scalar field is taken based on the filename. If it is "ElectricField.", it's a vector, otherwise it's a scalar field.

This MR improves this decision to be configurable: the default is a vector field, the option -s forces to read a scalar field.

Impact: up to now, the example/example_electric_field.init is not readable via the MeshPlotter. Spotted by @jsonneve

Update: I Additionally ...

  • caught a corner case where less than 100 vertices being present leads to a crash
  • changed the binning of the plots for the MeshPlotter to start at 0, just as the mesh does.
Edited by Paul Jean Schutze

Merge request reports