Git Product home page Git Product logo

Comments (20)

ryan-summers avatar ryan-summers commented on July 20, 2024

Generally you use this repository like you would any other rust project:

cargo run --bin psd

That being said, it looks like there may be some minor issues in the source that need to be fixed as well.

CC @jordens - looks like we have some various arg setup issues:

$ cargo run --bin psd
   Compiling stabilizer-stream v0.1.1 (C:\Users\rsummers\Documents\repositories\quartiq\stabilizer-streaming)
    Finished dev [unoptimized + debuginfo] target(s) in 6.38s
     Running `target\debug\psd.exe`
thread 'main' panicked at C:\Users\rsummers\.cargo\registry\src\index.crates.io-6f17d22bba15001f\clap_builder-4.5.2\src\builder\debug_asserts.rs:112:17:
Command stabilizer-stream: Short option names must be unique for each argument, but '-i' is in use by both 'ip' and 'integrate'
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\psd.exe` (exit code: 101)

from stabilizer-stream.

ryan-summers avatar ryan-summers commented on July 20, 2024

You can work around the build issues by using release:

cargo run --release --bin psd -- <ARGS>

So to get an initial help interface:

cargo run --release --bin psd -- -h

There indeed should be some more documentation about usage in the README though

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Thanks for the quick feedback. The debug build indeed gives me the same error as well, hence raising the issue.

I've tried running cargo run --release --bin psd -- -h and while this compiles successfully, this doesn't return anything for me unfortunately.

from stabilizer-stream.

ryan-summers avatar ryan-summers commented on July 20, 2024

Hmm that seems odd. You should see help output in the console:

    Finished release [optimized + debuginfo] target(s) in 2m 50s
     Running `target\release\psd.exe -h`
Stabilizer stream source options

Usage: psd.exe [OPTIONS]

Options:
  -i, --ip <IP>
          The local IP to receive streaming data on [default: 0.0.0.0]
  -p, --port <PORT>
          The UDP port to receive streaming data on [default: 9293]
  -f, --file <FILE>
          Use frames from the given file
  -f, --frame-size <FRAME_SIZE>
          Frame size in file (8 + n_batches*n_channel*batch_size) [default: 1448]
  -r, --repeat
          On a file, wrap around and repeat
  -r, --raw <RAW>
          Single f32 raw trace, architecture dependent endianess
  -n, --noise <NOISE>
          Power law noise with psd f^noise
  -d, --dsm <DSM>
          Delta sigma modulator (MASH-1-1-1) with given frequency calibration marker
  -d, --detrend <DETREND>
          Segment detrending method [default: mean] [possible values: none, midpoint, span, mean, linear]
  -f, --fs <FS>
          Sample rate in Hertz [default: 1]
  -a, --avg-max <AVG_MAX>
          Averaging limit [default: 1000]
  -a, --avg-min <AVG_MIN>
          Exclude PSD stages with less than or equal this averaging level [default: 1]
  -a, --avg <AVG>
          Extrapolated averaging count at the top stage [default: 4294967295]
  -k, --keep-overlap
          Don't remove low resolution bins
  -k, --keep-transition-band
          Don't remove bins in the filter transition band
  -i, --integrate
          Integrate jitter (linear)
  -i, --integral-start <INTEGRAL_START>
          [default: 0.000001]
  -i, --integral-end <INTEGRAL_END>
          [default: 0.5]
  -h, --help
          Print help (see more with '--help')

Can you copy/paste the terminal output here? What shell are you using to run things?

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

That's very strange. I'm using PowerShell on Windows 11, but I checked I get the same output on regular Windows CMD.

I only get the following output, nothing else:

    Finished release [optimized + debuginfo] target(s) in 0.87s
     Running `target\release\psd.exe -h`

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

I've just tried running this on a Linux PC, where I could get the help menu to display. However, I then bumped into another issue. When I run cargo run --release --bin psd -- -i 10.255.6.129 (to get some stream to my IP), I get the following error:

    Finished release [optimized + debuginfo] target(s) in 0.12s
     Running `target/release/psd -i 10.255.6.129`
thread 'main' panicked at /home/juhasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xkbcommon-dl-0.4.2/src/x11.rs:59:28:
Library libxkbcommon-x11.so could not be loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

Presumably libxkbcommon-x11 is not installed.

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

short arg collisions fixed in 240ad75

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Thanks - I've now managed to get the UI to come up once I installed libxkbcommon-x11-0 on a Linux machine - it still doesn't run on Windows.

However, the UI shows no FFT data coming in, the screen is empty - even though I've confirmed with Wireshark that the UDP stream does reach the PC.

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

Is 10.255.6.129 the IP that the packets are being sent to?

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

And do they pass a/the firewall?

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

For windows maybe you need some other features here Play with the egui/eframe examples and see whether you can get them to run. OTOH as @ryan-summers indicates, it does run for him fine on Windows: it may be something particular to your system or his.

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Yes, this is the IP of the computer the program is being run on. Wireshark is running on the same computer and can see the packets coming in.

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

Wireshark tends to capture before the firewall.

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Ah. It's a minimal Debian system, so I don't think there should be a firewall configured.

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

the UI shows no FFT data coming in, the screen is empty

Just checked again with current repos and it works fine here.

Screenshot?

from stabilizer-stream.

ryan-summers avatar ryan-summers commented on July 20, 2024

For windows maybe you need some other features here Play with the egui/eframe examples and see whether you can get them to run. OTOH as @ryan-summers indicates, it does run for him fine on Windows: it may be something particular to your system or his.

I run almost everything in Git Bash on Windows. Interestingly, when I try to run via powershell, it also doesn't do anything for me. This seems like an egui issue or something with feature selection.

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Ha, the git bash works for me as well - thanks.

I'm now running this on Windows, where I have another application which definitely receives data from the very same stabilizer. (It's a UI to show the input/output from/to the stabilizer.)

Re the screenshot:
image

from stabilizer-stream.

jordens avatar jordens commented on July 20, 2024

Disable the D trace (click it) as that's zero and makes the auto-scaling fail.
Or just zoom out and scale manually (mouse wheel). egui/eframe has docs on how to interact with widgets somewhere.

from stabilizer-stream.

juhaszp95 avatar juhaszp95 commented on July 20, 2024

Ah, it's all there now, thanks very much!

from stabilizer-stream.

Related Issues (8)

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.