ewokstomo.tasks.energycalculation.ComputeBMSpectrum#

class ewokstomo.tasks.energycalculation.ComputeBMSpectrum(inputs=None, varinfo=None, node_id=None, node_attrs=None, execinfo=None, profile_directory=None)[source]#

Bases: Task

Compute a bending-magnet (BM) spectrum using XOPPY’s xoppy_calc_bm.

Inputs (units):
  • TYPE_CALC (int): must be 0.

  • VER_DIV (int): vertical divergence model, {0, 2}.

  • MACHINE_NAME (str), RB_CHOICE (int), MACHINE_R_M (m).

  • BFIELD_T (T), BEAM_ENERGY_GEV (GeV), CURRENT_A (A), HOR_DIV_MRAD (mrad).

  • PHOT_ENERGY_MIN / PHOT_ENERGY_MAX (eV), NPOINTS (int), LOG_CHOICE (0/1).

  • PSI_* (mrad) and PSI_NPOINTS (int), FILE_DUMP (bool).

Outputs:
  • energy_eV (eV), sorted ascending.

  • flux (phot/s/0.1%bw) as returned by XOPPY.

  • spectral_power (W/eV).

  • cumulated_power (W).

Parameters:
run()[source]#

To be implemented by the derived classes