scotty package#

scotty.beam_me_up(poloidal_launch_angle_Torbeam, toroidal_launch_angle_Torbeam, launch_freq_GHz, mode_flag, launch_beam_width, launch_beam_curvature, launch_position, vacuumLaunch_flag=True, find_B_method='torbeam', shot=None, equil_time=None, vacuum_propagation_flag=False, Psi_BC_flag=False, poloidal_flux_enter=None, delta_R=- 0.0001, delta_Z=0.0001, delta_K_R=0.1, delta_K_zeta=0.1, delta_K_Z=0.1, interp_order=5, len_tau=102, rtol=0.001, atol=1e-06, interp_smoothing=0, ne_data_path=PosixPath('.'), magnetic_data_path=PosixPath('.'), output_path=PosixPath('.'), input_filename_suffix='', output_filename_suffix='', figure_flag=True, detailed_analysis_flag=True, verbose_output_flag=True, quick_run=False, plasmaLaunch_K=array([0., 0., 0.]), plasmaLaunch_Psi_3D_lab_Cartesian=array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]), density_fit_parameters=None, density_fit_method=None, B_T_axis=None, B_p_a=None, R_axis=None, minor_radius_a=None)#
  1. Initialise density fit parameters. One of:
    • spline with data from file

    • Stefanikova

    • O(3) polynomial

    • tanh

    • quadratic

  2. Initialise magnetic field method. One of:
    • TORBEAM

    • OMFIT

    • analytical

    • EFIT++

    • UDA

    • curvy slab

    • test/test_notime

  3. Initialise beam launch parameters (vacuum/plasma)

  4. Initialise event functions for IVP solver

  5. Propagate single ray with IVP solver (?)

  6. Handle events

  7. Possible early exit if quick_run (?)

  8. Propagate beam with IVP solver

  9. Dump raw output (?)

  10. Analysis

  11. Dump analysis

Parameters
  • find_B_method

    1. ‘efitpp’ finds B from efitpp files directly

    2. ’torbeam’ finds B from topfile

    3. UDA_saved

  • density_fit_parameters (Optional[Sequence]) –

    A list of parameters to be passed to the density_fit_method constructor. See the docs for the individual methods for the meaning of their parameters

    Note

    These parameters should not include poloidal_flux_enter

  • density_fit_method (Optional[Union[str, DensityFitLike]]) –

    Parameterisation of the density profile. Either a callable (see DensityFit), or one of the following options:

    If density_fit_method is a string, then the corresponding DensityFit object is constructed using poloidal_flux_enter and density_fit_parameters.

    "smoothing-spline-file" looks for a file called ne<input_filename_suffix>.dat in ne_data_path. It also uses interp_order and interp_smoothing instead of density_fit_parameters.

    Deprecated since version 2.4.0: If None (the default) is passed, the method will be guessed from the length of density_fit_parameters. In this case, quadratic and tanh parameters _should_ include poloidal_flux_enter as the last value.

scotty.get_parameters_for_Scotty(diagnostic, launch_freq_GHz=None, mirror_rotation=None, mirror_tilt=None, find_B_method=None, find_ne_method=None, equil_time=None, shot=None, user=None)#

Return default settings and parameters for the given diagnostic

Parameters
  • diagnostic

    Name of the diagnostic to load parameters for. One of:

    • "DBS_NSTX_MAST"
      • Doppler reflectometry (Neal Crocker, Jon Hillesheim, Tony Peebles)

      • Used on MAST, was on loan from NSTX

    • "DBS_SWIP_MAST-U"
      • Doppler reflectometry (Peng Shi)

    • "DBS_UCLA_MAST-U"

    • "CPS_UCLA_MAST-U"
      • This system can either be used in CPS or DBS mode, but not both simultaneously (not yet, anyway)

      • CPS version not yet implemented

    • "hiK_Strath_MAST-U"
      • High-k scattering diagnostic, Strathclyde (David Speirs, Kevin Ronald)

      • Not yet implemented

    • "DBS_synthetic"
      • Circular flux surfaces

  • launch_freq_GHz (Optional[float]) – Beam launch frequency in GHz

  • mirror_rotation (Optional[float]) – Angle in degrees (FIXME: clarify)

  • mirror_tilt (Optional[float]) – Angle in degrees (FIXME: clarify)

  • find_B_method (Optional[str]) –

    Equilibrium magnetic field method. One of:

    • "torbeam": Loads data from ne.dat and topfile. I guess I should implement loading for inbeam.dat at some point, too

    • "UDA": Loads EFIT data directly from uda (not yet implemented)

    • "EFITpp": Uses MSE constrained EFIT

    • "UDA_saved": Loads EFIT data from file. UDA data must first be saved to said file

  • find_ne_method (Optional[str]) –

    Density profile method. One of:

    • "torbeam"

    • "EFITpp"

    • "UDA_saved"

  • equil_time (Optional[float]) – Time in seconds

  • shot (Optional[int]) – Shot number

  • user (Optional[str]) – User profile settings

Submodules#