Skip to content
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

LivePlot does not plot points for count() #829

Closed
ambarb opened this issue Sep 9, 2017 · 15 comments
Closed

LivePlot does not plot points for count() #829

ambarb opened this issue Sep 9, 2017 · 15 comments

Comments

@ambarb
Copy link

ambarb commented Sep 9, 2017

Plots did not contain data points (or atleast the live plot did not autoscale)
Tried with num=None and num=5 (with new plot for both), and got the same result.

live_plot_not_working_count_num_is_none
liveplot_not_work_for_count

relative_scan and scan worked after these did not.

@ambarb
Copy link
Author

ambarb commented Sep 9, 2017

fyi @cmazzoli @wen-hu @bisogni

@cmazzoli
Copy link
Contributor

cmazzoli commented Sep 9, 2017 via email

@ambarb
Copy link
Author

ambarb commented Sep 10, 2017

Update. Data is not sent to the plot. See image attached. This plan is running the FCCD at 10Hz so that explains why there are missing points from bluesky.

In this case, all 192 data points were saved in the database and just dropped from bluesky.

count

@danielballan
Copy link
Member

Thanks for the thorough report. Not sure what this means yet. Thinking.

@danielballan
Copy link
Member

Ah, the figure title suggests that something isn't right: see how it says "[...] vs e i m t"? That's the word 'time' split up by letter and sorted alphabetically. We caught this bug at ESM and fixed it in time for bluesky v0.10.0. You are still running a slightly out-of-date pre-release version of bluesky, which I intended to resolve on Monday.

You can fix this by doing:

source activate dev
pip install --upgrade bluesky

Note: I'm relying on my memory that the name of the conda environment we used for testing the bluesky is named dev. Check that by running

echo $BS_ENV

All of the above should be run in bash (i.e., the Terminal), not inside IPython/bsui.

@ambarb
Copy link
Author

ambarb commented Sep 10, 2017

Also count() generates a new plot for every scan plan. This isn't ideal because we could have a lot of plots open. Was this the intent?

@ambarb
Copy link
Author

ambarb commented Sep 10, 2017

Clarification, scan() and relative_scan() plot in the same window if the same set of motors and dets are used.

@danielballan
Copy link
Member

Is this still true after updating bluesky?

@ambarb
Copy link
Author

ambarb commented Sep 11, 2017

I just tried and was not able to install.

[xf23id1@xf23id-ws3 ~/xf23id1_profiles/profile_collection/startup]$ cd ~
[xf23id1@xf23id-ws3 ~]$ echo $BS_ENV
dev
[xf23id1@xf23id-ws3 ~]$ source activate dev
(dev) [xf23id1@xf23id-ws3 ~]$ pip install --upgrade bluesky
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fdf2a3f7e10>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/bluesky/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fdf2a3f7208>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/bluesky/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fdf2b64a518>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/bluesky/
^COperation cancelled by user
^C



^C
Traceback (most recent call last):
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 142, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 75, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/socket.py", line 743, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xf23id1/conda_envs/dev/bin/pip", line 6, in <module>
    sys.exit(pip.main())
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/__init__.py", line 249, in main
    return command.main(cmd_args)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/basecommand.py", line 252, in main
    pip_version_check(session)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/utils/outdated.py", line 126, in pip_version_check
    headers={"Accept": "application/json"},
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
    self._validate_conn(conn)
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
    conn.connect()
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 254, in connect
    conn = self._new_conn()
  File "/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 142, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
KeyboardInterrupt
(dev) [xf23id1@xf23id-ws3 ~]$ 
(dev) [xf23id1@xf23id-ws3 ~]$ 

@danielballan
Copy link
Member

That looks like the old NSLS-II proxy issue.

export https_proxy=proxy:8888

@ambarb
Copy link
Author

ambarb commented Sep 11, 2017 via email

@danielballan
Copy link
Member

Did this resolve the secondary issue of getting a new figure every time you count?

@ambarb
Copy link
Author

ambarb commented Sep 11, 2017 via email

@ambarb
Copy link
Author

ambarb commented Sep 11, 2017

Will someone be able to upgrade us today? We don't have users now, but will on Tuesday.

@cowanml
Copy link

cowanml commented Sep 11, 2017 via email

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

No branches or pull requests

4 participants