{"id":20687533,"url":"https://github.com/mrakitin/databroker-extractor","last_synced_at":"2026-05-27T18:32:43.178Z","repository":{"id":88973718,"uuid":"83564954","full_name":"mrakitin/databroker-extractor","owner":"mrakitin","description":"Tools and utilities for experiments","archived":false,"fork":false,"pushed_at":"2017-09-12T19:34:37.000Z","size":32004,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T23:58:00.999Z","etag":null,"topics":["data-acquisition","databroker","image-processing","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrakitin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-01T14:41:59.000Z","updated_at":"2017-07-11T18:02:08.000Z","dependencies_parsed_at":"2023-06-26T21:01:12.462Z","dependency_job_id":null,"html_url":"https://github.com/mrakitin/databroker-extractor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrakitin/databroker-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrakitin%2Fdatabroker-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrakitin%2Fdatabroker-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrakitin%2Fdatabroker-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrakitin%2Fdatabroker-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrakitin","download_url":"https://codeload.github.com/mrakitin/databroker-extractor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrakitin%2Fdatabroker-extractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33579665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-acquisition","databroker","image-processing","python"],"created_at":"2024-11-16T22:57:36.229Z","updated_at":"2026-05-27T18:32:43.160Z","avatar_url":"https://github.com/mrakitin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# databroker-extractor - tools and utilities for experiments\n\nThe tools are used to obtain data from beamline databroker servers and perform initial data analysis\n(e.g., calculation of the FWHM of the undulator harmonics).\n\n### Installation instructions:\n\nInstall miniconda from https://conda.io/miniconda.html. Then create the environment for databroker:\n```bash\nconda create --name databroker python=3.6 numpy scipy matplotlib\nactivate databroker\npip install -r https://raw.githubusercontent.com/mrakitin/databroker-extractor/master/requirements.txt\npip install git+https://github.com/mrakitin/databroker-extractor\n```\n\n### Remote access to data from NSLS-II beamlines using databroker.\n\nAccess DataBroker data from outside the gateway:\n- Prepare the SSH config file, e.g.:\n```bash\n$ cat ~/.ssh/config\nHost chx-srv1\n    User mrakitin\n    Hostname xf11id-srv1\n    LocalForward 27011 localhost:27017\n    ProxyCommand ssh mrakitin@box64-3.nsls2.bnl.gov nc %h %p 2\u003e /dev/null\n```\n\n- Create `/XF11ID/data/` dir on a local machine and make a current user/group to own the dir.\n\n- Datastore/filestore are configured automatically, e.g. for 5-ID (SRX) the forwarded port is 2700**5**, for 11-ID (CHX) - 270**11**, for 12-ID (SMI) - 270**12**.\n\n- Make a tunnel to go through a firewall on Linux:\n```bash\nssh -fN -o ExitOnForwardFailure=yes chx-srv1 2\u003e/dev/null \u0026\u0026 sshfs mrakitin@chx-srv1:/XF11ID/data /XF11ID/data/\n```\n\n- Make a tunnel to go through a firewall on Windows (with installed PuTTY+Plink) - execute the following batch files:\n  - [CHX_xf11id-srv1.bat](https://github.com/mrakitin/databroker-extractor/blob/master/utils/CHX_xf11id-srv1.bat)\n  - [SMI_xf12id-ca1.bat](https://github.com/mrakitin/databroker-extractor/blob/master/utils/SMI_xf12id-ca1.bat)\n  - [SRX_xf05id-ca1.bat](https://github.com/mrakitin/databroker-extractor/blob/master/utils/SRX_xf05id-ca1.bat)\n\n- Use earlier defined conda environment or use one from the databroker tutorial - https://github.com/NSLS-II/broker-tutorial.\n\n- Run the script to collect data:\n\nSMI:\n```bash\n$ databroker-extractor -b smi -s 400 420 440 460 480 -e  # saves data and plots for the provided scans\n```\n```bash\n$ databroker-extractor -b smi -p 400 420 440 460 480 -e  # plots data for the provided scans\n```\n![scans](img/smi_scan_400-480.png)\n\nCHX:\n```bash\n$ databroker-extractor -b chx -p 19008 19010 19021 19023 -e\n```\n![scans](img/chx_scan_19008-19023.png)\n\nSRX:\n```bash\n$ databroker-extractor -b srx -p 029c0d3a 705980d9 82337021 a0d35aba 54032db3 7355ac61 96957282 83d5c99d c727d916 -e\n```\n![scans](img/xf05id_scan_328-336.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrakitin%2Fdatabroker-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrakitin%2Fdatabroker-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrakitin%2Fdatabroker-extractor/lists"}