Skip to content

Conversation

@santorofer
Copy link
Contributor

@santorofer santorofer commented Jun 25, 2025

A new Python API to be able to convert between jScope configuration files and dwscope configuration files.
This new API replaces the old scope API with new functionality.

>>> import MDSplus
>>> MDSplus.Scope
MDSplus.Scope(              MDSplus.ScopePlot(          MDSplus.ScopeSignalColor(   MDSplus.ScopeSignalMode1D(
MDSplus.ScopeGeometry(      MDSplus.ScopeSignal(        MDSplus.ScopeSignalMarker(  MDSplus.ScopeSignalMode2D(

Usage:
For example, convert between dwscope config file to jScope config file:

>>> convert = MDSplus.Scope.load('plasma.dat')
>>> convert.save('plasma.jscp')

A new Python API to be able to convert between jScope configuration files and dwscope configuration files.

>>> import MDSplus
>>> MDSplus.Scope
MDSplus.Scope(              MDSplus.ScopePlot(          MDSplus.ScopeSignalColor(   MDSplus.ScopeSignalMode1D(
MDSplus.ScopeGeometry(      MDSplus.ScopeSignal(        MDSplus.ScopeSignalMarker(  MDSplus.ScopeSignalMode2D(

Usage:
Convert between dwscope config file to jScope config file:

>>> MDSplus.Scope.load('plasma.dat', 'plasma.jscp')
@santorofer santorofer self-assigned this Jun 25, 2025
@santorofer santorofer changed the title Feature: Add new Python API for scope configuration convertion Feature: Add new Python API to convert between scopes configuration files Jun 26, 2025
The new Python API code make use of:

1- from typing import Optional: only for Python >= v3.10
2- @DataClass: only for Python version >= 3.7

Therefore, this API needs Python 3.10 or greater.
@santorofer santorofer added api/python Relates to the Python API feature Indicates new feature requests or implementations tool/jScope Relates to the jScope tool tool/dwscope Relates to the dwscope tool labels Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api/python Relates to the Python API feature Indicates new feature requests or implementations tool/dwscope Relates to the dwscope tool tool/jScope Relates to the jScope tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant