MITHaystack / srt-py

BSD 3-Clause "New" or "Revised" License
10 stars 14 forks source link

Plotting ideas #6

Open jswoboda opened 3 years ago

jswoboda commented 3 years ago

Ideas to improve presentation of plots

sstoneb commented 3 years ago

I'd definitely like to see your last bullet point there--updating the plots only when there's new data instead of on a fixed time interval. With the default config at least, it seems like data only comes in every third or fourth refresh.

A little "Last update: X seconds ago" field somewhere might be nice, too.

imyxh commented 1 year ago

My professor remarked that it would be nice to have some way to subtract the background continuum signal to better look at the shifted hydrogen emission. Or is that already a feature that I just missed?

Also, thanks for the lovely software :)

EDIT: of course this is a feature; it's built into the calibration!

imyxh commented 11 months ago

So, we're using this software at our school for an intro course (thanks for making it!) but first we could really use:

I'd love to work on either or both of these but I also don't want to conflict with any of your previous work (I think some LSRK conversion is in progress?). Do you have some pointers about how best to integrate these two features into the current codebase?

For the continuous integration part, one option is to make a separate gnuradio flowgraph that outputs a continuous average of the spectrum to ZMQ, though we could also just do that averaging in python using the current flowgraph. I'm tempted to do the latter method, just multiplying the previous spectrum by (N+1)/N and the new one by 1/N. What do you think?

jswoboda commented 11 months ago

Hi, we do actually label the LSRK velocity but only for the 0 Doppler. It's not in the plot its on the left hand side of the dashboard. I wasn't certain if this would be useful for the students to derive it themselves. I can add a feature to switch out the frequency offset ticks with the LSRK velocity.

The continuous integration is something I'd like to add. I'll see if I can do something simple where you can just turn in on in a button and the plot just holds over the current one.

imyxh commented 11 months ago

I'll have some time this semester to work on this. Which of those two would you like help on first, if any?

jswoboda commented 11 months ago

Hi, I'm fine if you want to update some of the plots with the frequency dependent vlsr on the spectrum and add the "continuous integration" feature. The line of sight velocity is probably the best things to start with. We use the term vlsr (velocity in the local standard of rest). I perform the base calculation using astropy, you would just be adding the apparent Doppler shift. Please make the continuous integration feature something you can turn on and off from the dashboard. I will note, I just did a major pull request and will be integrating work from another student to allow the SRT to work as a transit telescope. So just watch out that this doesn't interfere with your work.

AlexKurek commented 4 months ago

I have added waterfall plot in my fork: https://github.com/AlexKurek/srt-py/commit/d8ea8c101ed9add6b0300c9e11e46adfb50ed041. Screenshot from 2024-04-21 12-21-03

imyxh commented 4 months ago

For what it's worth the "vvo" branch of my fork also has continuous integration and VLSR plotting support. Meant to send a PR but never got around to it.

AlexKurek commented 4 months ago

@imyxh I was able to run your fork like so:

git clone -b vvo https://github.com/imyxh/srt-py
conda create -y -n vvosrt python=3.11.9
conda activate vvosrt
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict

conda install -y numpy scipy rtl-sdr soapysdr soapysdr-module-rtlsdr gnuradio-core gnuradio-zeromq gnuradio-osmosdr digital_rf pyzmq pyserial astropy yamale dash dash-bootstrap-components dash-core-components plotly pandas waitress

conda develop .
cd srt-py/
python bin/srt_runner.py --config_dir=/home/alex/srtpy-config_oryginal

I see the new PLOTTING menu and its working, but the figures never show up. It stays like so:

Screenshot 2024-05-04 at 10-34-58 SRT Dashboard