Title: Waveforms with empty array initial values do not update as expected · Issue #55 · DiamondLightSource/pythonSoftIOC · GitHub
Open Graph Title: Waveforms with empty array initial values do not update as expected · Issue #55 · DiamondLightSource/pythonSoftIOC
X Title: Waveforms with empty array initial values do not update as expected · Issue #55 · DiamondLightSource/pythonSoftIOC
Description: When using a WaveformOut record and doing .set() and .get(), the behaviour is not as expected when the initial_value is an empty numpy array: # Import the basic framework components. from softioc import softioc, builder, asyncio_dispatch...
Open Graph Description: When using a WaveformOut record and doing .set() and .get(), the behaviour is not as expected when the initial_value is an empty numpy array: # Import the basic framework components. from softioc i...
X Description: When using a WaveformOut record and doing .set() and .get(), the behaviour is not as expected when the initial_value is an empty numpy array: # Import the basic framework components. from softioc i...
Opengraph URL: https://github.com/DiamondLightSource/pythonSoftIOC/issues/55
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Waveforms with empty array initial values do not update as expected","articleBody":"When using a `WaveformOut` record and doing `.set()` and `.get()`, the behaviour is not as expected when the `initial_value` is an empty numpy array:\r\n\r\n```\r\n# Import the basic framework components.\r\nfrom softioc import softioc, builder, asyncio_dispatcher\r\nimport numpy\r\n# Create an asyncio dispatcher, the event loop is now running\r\ndispatcher = asyncio_dispatcher.AsyncioDispatcher()\r\n\r\n# Set the record prefix\r\nbuilder.SetDeviceName(\"PREFIX\")\r\n\r\n# Create some records\r\nwo = builder.WaveformOut(\"TEST\", initial_value=numpy.array([]))\r\n\r\n# Boilerplate get the IOC started\r\nbuilder.LoadDatabase()\r\nsoftioc.iocInit(dispatcher)\r\n\r\nprint(wo.get())\r\nwo.set(numpy.array([10]))\r\nprint(wo.get())\r\n\r\n# Finally leave the IOC running with an interactive shell.\r\nsoftioc.interactive_ioc(globals())\r\n\r\n```\r\n\r\nThis program prints:\r\n```\r\n...\r\niocRun: All initialization complete\r\n[]\r\n[]\r\n```\r\n\r\n\r\nIf you change the `initial_value` to `numpy.array([1])` then the program prints out the expected results:\r\n```\r\n...\r\niocRun: All initialization complete\r\n[1]\r\n[10]\r\n```\r\n\r\nApologies if this is a duplicate of an existing issue, but it certainly is a novel symptom.","author":{"url":"https://github.com/AlexanderWells-diamond","@type":"Person","name":"AlexanderWells-diamond"},"datePublished":"2021-10-15T14:49:01Z","url":"https://github.com/DiamondLightSource/pythonSoftIOC/issues/55"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:caf35c0f-3755-a0c0-1986-e0f67081044a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6C4:1FAF:1BBFF78:254415B:6B044048 |
| html-safe-nonce | 4a59c8fe5901bbb1399bd079ef32d99f2a8b70d17ef5adfaa3d105de7b3c0772 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkM0OjFGQUY6MUJCRkY3ODoyNTQ0MTVCOjZCMDQ0MDQ4IiwidmlzaXRvcl9pZCI6IjU1NjE5MjgzODc0OTg2MjMwNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2e84e2795dde9a6044ea41751b3c4385f888b8b5dbef703a653f104ce0f0bbbf |
| hovercard-subject-tag | issue:1027520514 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DiamondLightSource/pythonSoftIOC/55/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4657cd5073d5fb3c44296835f08c262a9d08652dce63bb09d51a0944dec31723/DiamondLightSource/pythonSoftIOC/issues/55 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4657cd5073d5fb3c44296835f08c262a9d08652dce63bb09d51a0944dec31723/DiamondLightSource/pythonSoftIOC/issues/55 |
| og:image:alt | When using a WaveformOut record and doing .set() and .get(), the behaviour is not as expected when the initial_value is an empty numpy array: # Import the basic framework components. from softioc i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexanderWells-diamond |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/DiamondLightSource/pythonSoftIOC git https://github.com/DiamondLightSource/pythonSoftIOC.git |
| octolytics-dimension-user_id | 1233618 |
| octolytics-dimension-user_login | DiamondLightSource |
| octolytics-dimension-repository_id | 20049394 |
| octolytics-dimension-repository_nwo | DiamondLightSource/pythonSoftIOC |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20049394 |
| octolytics-dimension-repository_network_root_nwo | DiamondLightSource/pythonSoftIOC |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width