scotty.init_bruv module
scotty.init_bruv module#
Initialisation.
This file contains the default settings for a range of various cases. This is
split into a set of dictionaries (DEFAULT_DIAGNOSTIC_PARAMETERS
,
LAUNCH_BEAM_METHODS
, and DENSITY_FIT_PARAMETERS
) and functions
(get_parameters_for_Scotty
, beam_settings
, ne_settings
, and
user_settings
) that look up and parse the requested case.
- scotty.init_bruv.DEFAULT_DIAGNOSTIC_PARAMETERS: Dict[str, Callable[[float], dict]] = {'DBS_NSTX_MAST': <function parameters_DBS_NSTX_MAST>, 'DBS_SWIP_MAST-U': <function parameters_DBS_SWIP_MAST_U>, 'DBS_UCLA_DIII-D_240': <function parameters_DBS_UCLA_DIII_D_240>, 'DBS_UCLA_MAST-U': <function parameters_DBS_UCLA_MAST_U>, 'DBS_synthetic': <function parameters_DBS_synthetic>}#
Functions that return default parameters for the corresponding diagnostic
- scotty.init_bruv.DENSITY_FIT_PARAMETERS#
Density fitting parameters for diagnostic/shot combinations
- class scotty.init_bruv.DensityFitParameters(fit, time_ms, poloidal_flux_zero_density)#
Bases:
tuple
Parameterised density
- Parameters
- fit: Optional[scotty.profile_fit.ProfileFit]#
Fit parameterisation
- scotty.init_bruv.LAUNCH_BEAM_METHODS: Dict[str, Dict[str, Callable[[float], scotty.init_bruv.LaunchBeamParameters]]] = {'DBS_CIEMAT_JT60SA': {'data': <function launch_beam_DBS_CIEMAT_JT60A_data>}, 'DBS_NSTX_MAST': {'data': <function launch_beam_DBS_NSTX_MAST_data>, 'horn_and_lens': <function launch_beam_DBS_NSTX_MAST_horn_and_lens>}, 'DBS_SWIP_MAST-U': {'estimate_fix_w0': <function launch_beam_DBS_SWIP_MAST_U_estimate_fix_w0>, 'estimate_var_w0': <function launch_beam_DBS_SWIP_MAST_U_estimate_var_w0>}, 'DBS_UCLA_DIII-D_240': {'thin_lens': <function launch_beam_DBS_UCLA_DIII_D_240_thin_lens>}, 'DBS_UCLA_MAST-U': {'thin_lens': <function launch_beam_DBS_UCLA_MAST_U_thin_lens>}}#
Functions that return launch beam parameters for the corresponding diagnostic
- scotty.init_bruv.beam_settings(diagnostic, launch_freq_GHz, method='data')#
Return the launch beam width and curvature
- Parameters
diagnostic (str) – Name of the diagnostic
launch_freq_GHz (float) – Frequency of the launch beam in GHz
method (str) –
One of the following:
"horn_and_lens"
: Uses information about the horn and lens to calculate the launch beam properties"thin_lens"
: Uses the thin lens approximation to calculate launch beam properties"data"
: Uses pre-computed values"estimate_var_w0"
: Estimate beam properties using frequency-dependent beam waist"estimate_fix_w0"
: Estimate beam properties using frequency-independent beam waist
- Return type
Note
Not all methods are available for all diagnostics
- scotty.init_bruv.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"
- scotty.init_bruv.launch_beam_DBS_CIEMAT_JT60A_data(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_NSTX_MAST_data(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_NSTX_MAST_horn_and_lens(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_SWIP_MAST_U_estimate_fix_w0(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_SWIP_MAST_U_estimate_var_w0(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_UCLA_DIII_D_240_thin_lens(launch_freq_GHz)#
- scotty.init_bruv.launch_beam_DBS_UCLA_MAST_U_thin_lens(launch_freq_GHz)#
- scotty.init_bruv.ne_settings(diagnostic, shot, time, find_ne_method)#
Get pre-existing density fit parameters from
DENSITY_FIT_PARAMETERS
- scotty.init_bruv.parameters_DBS_NSTX_MAST(launch_freq_GHz)#
- scotty.init_bruv.parameters_DBS_SWIP_MAST_U(launch_freq_GHz)#
- scotty.init_bruv.parameters_DBS_UCLA_DIII_D_240(launch_freq_GHz)#
- scotty.init_bruv.parameters_DBS_UCLA_MAST_U(launch_freq_GHz)#
- scotty.init_bruv.parameters_DBS_synthetic(launch_freq_GHz)#
- scotty.init_bruv.user_settings(diagnostic, user, shot)#
Choosing paths appropriately