Skip to main content

Scotty

Scotty is a beam-tracing code for Doppler backscattering (DBS) synthetic diagnostics in tokamaks. It launches a Gaussian beam, traces it through the plasma, and computes where along the beam the signal comes from and how strong it is: the filter functions of the beam model of DBS [1].

Status

  • v4 is the stable version. The latest release is 4.0.0, on the master branch. It has the beam model of v3, with cylindrical (R, ζ, Z) or Cartesian (X, Y, Z) coordinates (geometry="cylindrical" or "cartesian"), and it gives its outputs in both. It has been checked against v3 on the test suite and on DIII-D, MAST-U and MAST cases. A few features of v3 are not in v4 yet, such as the filter-function widths and the GUI: the release notes list them, under "Removed" in 4.0.0.dev0. Please report problems on the issue tracker.
  • v3 (latest release 3.2.0) works in cylindrical coordinates only. Use it to reproduce work done with v3; see "Moving from v3 to v4" below.

Check which version you have with scotty.__version__. An install from master after a release gives a development version such as 4.0.1.dev5+g1234abc (from setuptools_scm).

Install

The package is called scotty-beam-tracing, and the Python module is called scotty. Scotty needs Python 3.10 or newer.

  • v4, from PyPI:

    pip install scotty-beam-tracing
    
  • v3, from PyPI:

    pip install "scotty-beam-tracing<4"
    
  • v4, the latest development version, from GitHub:

    pip install git+https://github.com/beam-tracing/Scotty
    
  • To develop Scotty, from a local clone:

    pip install -e ".[tests]"
    

Quick start (v4)

from scotty import beam_me_up, get_parameters_for_Scotty

# A DBS beam in an analytical field with circular flux surfaces
kwargs = get_parameters_for_Scotty("DBS_synthetic")
dt = beam_me_up(**kwargs)  # also saved as scotty_output.h5
print(dt["diagnostics/dbs"]["filterfun_all"])

More examples are in Examples/.

Moving from v3 to v4

  • A v3 script runs with beam_me_up(**scotty.compat.from_v3_kwargs(kwargs)). It converts v3's arguments and logs each change.
  • find_B_method and density_fit_method must be given: they have no defaults.
  • The data files are given by their paths (magnetic_data_path, ne_data_path, Te_data_path). EFIT and saved UDA files are read with the field constructors in scotty.geometry, and the field is given to beam_me_up as find_B_method.
  • The output has the groups inputs, solver, beam and diagnostics/dbs. scotty.compat.convert_output_file converts output files between the two versions.
  • The release notes list every change, and say which ones change results: docs/release_notes.rst.

Documentation

https://scotty.readthedocs.io/: the inputs, the output, the layout of the code, the API and the release notes.

Contribute

Get help

Open an issue on the issue tracker.

Cite

If you use Scotty in published work, cite [1]. It describes the beam model, and its Appendix A derives beam tracing.

[1] Hall-Chen, V. H., Parra, F. I., & Hillesheim, J. C. (2022). Beam model of Doppler backscattering. Plasma Physics and Controlled Fusion, 64(9), 095002.

License

Scotty is licensed under the GNU General Public License, version 3 (LICENSE.md).

Metadata

Release files for scotty-beam-tracing 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scotty-beam-tracing 4.0.0
File Size Uploaded Provenance Actions
scotty_beam_tracing-4.0.0.tar.gz 1.0 MB Without provenance Details for scotty_beam_tracing-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scotty-beam-tracing 4.0.0
File Interpreter ABI Platform Actions
scotty_beam_tracing-4.0.0-py3-none-any.whl Python 3 none any Details for scotty_beam_tracing-4.0.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / scotty_beam_tracing-4.0.0.tar.gz

Download URL scotty_beam_tracing-4.0.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
c06e9178f839acb563b4b9f594254845400f2dbc1b40585b892c5793077ad710
BLAKE2b-256 checksum
How to use checksums
fc04a44507125eda0c9efb67184490e6902b6eb12e9e07f0a8c18c6a130b88cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / scotty_beam_tracing-4.0.0-py3-none-any.whl

Download URL scotty_beam_tracing-4.0.0-py3-none-any.whl
Size 179.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c44997d0b4ed2954a6eb2278abc330b9fade5f892a312e3996adc0545ae51937
BLAKE2b-256 checksum
How to use checksums
3d55e6950574e1e429970ac118e5a84dfa7b79ff167c8e3e2117642d6687f3f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for scotty-beam-tracing 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page