omas.transform_current

omas.transform_current(rho, JtoR=None, JparB=None, equilibrium=None, includes_bootstrap=False)[source]

Given <Jt/R> returns <J.B>, or vice versa Transformation obeys <J.B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>)) N.B. input current must be in the same COCOS as equilibrium.cocosio

Parameters
  • rho – normalized rho grid for input JtoR or JparB

  • JtoR – input <Jt/R> profile (cannot be set along with JparB)

  • JparB – input <J.B> profile (cannot be set along with JtoR)

  • equilibrium – equilibrium.time_slice[:] ODS containing quanities needed for transformation

  • includes_bootstrap – set to True if input current includes bootstrap

Returns

<Jt/R> if JparB set or <J.B> if JtoR set

Example: given total <Jt/R> on rho grid with an existing ods, return <J.B>
JparB = transform_current(rho, JtoR=JtoR,

equilibrium=ods[‘equilibrium’][‘time_slice’][0], includes_bootstrap=True)