Giter Site home page Giter Site logo

Comments (2)

FranzForstmayr avatar FranzForstmayr commented on June 26, 2024

Can you post the exact error message? I don't have access to a NanoVNA.

from scikit-rf.

mxxmxn avatar mxxmxn commented on June 26, 2024

The issue can be reproduced without a NanoVNA, the device string only needs to be a valid serial interface:

import skrf
from skrf.vi.vna.nanovna import NanoVNA

instr = NanoVNA("ASRL/dev/tty1::INSTR")
freq = skrf.Frequency(start=2.4, stop=2.4, unit='GHz', npoints=1)
instr.frequency = freq

I get the following Error:

skrf/frequency.py:412: RuntimeWarning: invalid value encountered in scalar divide
  return self.span/(self.npoints-1.)
Traceback (most recent call last):
  File "scratches/scratch.py", line 6, in <module>
    instr.frequency = freq
    ^^^^^^^^^^^^^^^
  File "skrf/vi/vna/nanovna/nanovna.py", line 155, in frequency
    self.write(OP.WRITE8, REG_ADDR.SWEEP_STEP, 8, f.step)
  File "skrf/vi/vna/nanovna/nanovna.py", line 74, in write
    arg = int(arg).to_bytes(nbytes, byteorder="little", signed=False)
          ^^^^^^^^
ValueError: cannot convert float NaN to integer

from scikit-rf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.