8000 Feeltech fy3200s instrument driver by dvalde0 · Pull Request #1310 · pymeasure/pymeasure · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feeltech fy3200s instrument driver #1310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dvalde0
Copy link
@dvalde0 dvalde0 commented May 30, 2025

Copy link
codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.12%. Comparing base (cb36cc2) to head (7eebfa2).

Files with missing lines Patch % Lines
pymeasure/instruments/feeltech/fy3200s.py 95.83% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1310      +/-   ##
==========================================
+ Coverage   60.03%   60.12%   +0.09%     
==========================================
  Files         281      283       +2     
  Lines       19454    19503      +49     
==========================================
+ Hits        11679    11726      +47     
- Misses       7775     7777       +2     
Flag Coverage Δ
unittests 60.12% <95.91%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member
@BenediktBurger BenediktBurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.

Here a first round of comments. The quality of your code looks good.

#
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2024 PyMeasure Developers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright (c) 2013-2024 PyMeasure Developers
# Copyright (c) 2013-2025 PyMeasure Developers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add copyright notice at the top (with the correct year).

class FY3200S(SCPIUnknownMixin, Instrument):
"""Class to control the Feeltech FY3200S arbitrary waveform generator"""

def __init__(self, adapter: SerialAdapter, name: str = "FY3200s AWG", **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adapter can be a string or a subclass of Adapter!

)


class FY3200S(SCPIUnknownMixin, Instrument):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SCPIUnknownMixin is for devices, where we did not know, whether it supports SCPI or not.

If it supports SCPI, do use SCPIMixin. If it does not support SCPI (as it seems), do not use the Mixin, but use scpi_included=False (or similar) in the constructor call.


def __init__(self, adapter: SerialAdapter, name: str = "FY3200s AWG", **kwargs):
"""Initialize the instrument with a SerialAdapter
:param adapter: SerialAdapter for the connection. The write termination has to be \\n
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can specify the write termination in the call to super init.
Afterwards you just write the address as "adapter" and the device does the correct configuration for you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests.

Comment on lines +229 to +232
@property
def id(self):
"""Get the identification of the instrument."""
return "Feeltech FY3200S arbitrary waveform generator"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do not read anything from the device, what is the reason for that property?
Typically the id gives the serial number etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a new contributor, you may add your name to authors.txt as well.


waveform = Instrument.setting(
"{ch}w%i",
"Set the waveform of the channel.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe hint at the Waveforms dictionary, such that a user knows, which values are available.

self.write("{ch}r0")


class SubsidiaryChannel(Channel):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are both classes the same one?
What are the differences?
Maybe you could base one Channel on the other (e.g. the Main one on the subsidiary on, if only the main one has a few more options).

If they are the same, a single Class would be sufficient, you distinguish the instances in the Instrument.

< 68E7 /div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0