Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kyle Sunden
    @ksunden:matrix.org
    [m]
    to install in editable mode with flit (which is what we mostly use) is flit install --pth-file (or on systems like linux/mac that have symlinks flit install -s)
    the default config file location (which uses appdirs to get) is in that AppData folder. yaqd edit-config horiba-micro-hr will open up notepad (or actually whatever is in $EDITOR) with that file directly
    Till Stensitzki
    @Tillsten
    little bit offtopic, but does anybody here has some suggestion for daily logging of e.g. laser settings and status?
    I mean i could write a gui for that myself, but I guess there should already some kind of solution
    Blaise Thompson
    @untzag:matrix.org
    [m]
    I have not used this, but it's on my personal list as something to try if I need a logging gui https://github.com/busimus/cutelog/
    Consider just logging to a file though
    Till Stensitzki
    @Tillsten
    I also found it, but I think some plotting options for numerical values would be nice to have
    Also if I don't have to I dont want to spend any time on GUI for data input
    Maybe just a spreadsheet
    Blaise Thompson
    @untzag:matrix.org
    [m]
    👍
    Pierre Schnizer
    @PierreSchnizer

    Dear all,

    how should I cite bluesky in an publication please?
    Thanks
    Pierre

    Kyle Sunden
    @ksunden:matrix.org
    [m]

    I don’t think we have set up a DOI for the project itself (via e.g. Zenodo). Here is a paper that people cite: https://www.tandfonline.com/doi/full/10.1080/08940886.2019.1608121 (DOI: https://doi.org/10.1080/08940886.2019.1608121)

    credit to mrakitin on the slack for answering a similar question a week ago

    Pierre Schnizer
    @PierreSchnizer
    Thanks for your answer!
    Pierre
    Quantum-cross
    @Quantum-cross
    hey! this is an interesting project, I was wondering if you know of any large scale experiments implementing BlueSky as a major part of their control/acquisition/analysis chain?
    besides the National Synchrotron of course
    Thomas A Caswell
    @tacaswell
    Yes, all of the US lightsources are using it on at least one beamline, SA is using it, DLS is looking into adopting it, and Pohang is using it
    and BESSY
    Pierre Schnizer
    @PierreSchnizer
    And Fritz Haber Institute (Max Planck Society) is looking into it
    yehnan
    @yehnan

    Hi, Bluesky mates. The following code:
    ThetaS = EpicsMotor('31a:DCM:ThetaS', name='ThetaS')
    print('ThetaS position', ThetaS.position)

    will cause exception DisconnectedError:
    Traceback (most recent call last):
    File "ztest_ac.py", line 69, in <module>
    print('ThetaS position', ThetaS.position)
    File "/home/chiang.lc/anaconda3/envs/py37bluesky/lib/python3.7/site-packages/ophyd/utils/epics_pvs.py", line 200, in wrapper
    raise DisconnectedError('{} is not connected'.format(self.name))
    ophyd.utils.errors.DisconnectedError: ThetaS is not connected

    In the same environment, I can use pyepics module ( motor = epics.Motor('31a:DCM:ThetaS') ) to move the motor and to read its position without any problem.

    Would you please provide hints for debugging and finding causes?

    Thomas A Caswell
    @tacaswell
    What does ThetaS.connected give you? Does it work if you do TheatS.read()?
    yehnan
    @yehnan

    ThetaS = EpicsMotor('31a:DCM:ThetaS', name='ThetaS')
    print('ThetaS.connected', ThetaS.connected)

    The above will print "ThetaS.connected False".

    ThetaS = EpicsMotor('31a:DCM:ThetaS', name='ThetaS')
    print('ThetaS.read()', ThetaS.read())
    The above code will also raise exception DisconnectedError:
    ophyd.utils.errors.DisconnectedError: ThetaS is not connected
    yehnan
    @yehnan
    By the way, I tried Bluesky some years ago and picked it up recently. I'm trying to use Bluesky to replace in-house-made scan procedures.
    yehnan
    @yehnan

    suitcase.csv.export will raise exception ValueError: I/O operation on closed file.
    The 'export' does successfully create and write to a csv file though.

    Full code and error message: https://pastebin.com/tCsTZPqj

    yehnan
    @yehnan
    In class Serializer of suitcase.csv, both methods stop() and exit() call close(). Is it the source of the error "I/O operation on closed file"?
    wakonig
    @wakonig
    Hi, I wanted to go through your tutorials, in particular the first one ("Hello Bluesky.ipynb") but I'm always getting a timeout error: TimeoutError: Failed to connect to all signals: ph.det (mini:ph:det), ph.exp (mini:ph:exp). Any ideas what I could try? Thanks!
    Wu-Cheng Chiang
    @devilkingsatan666
    Hi, I tried to subscribe to a waveform record and plot in real-time with BlueSky's callback "LivePlot" with no luck. It seems that the callback function is used for plotting real-time accumulated scalar record data. Is this functionality supported in BlueSky?
    Thomas A Caswell
    @tacaswell
    LivePlot assumes it is getting data 1 point at a time, not a vector of data all at once. In principle this is supported (the callback is being offered the vector, it just does not know what to do with it). You should either modify LivePlot to be able to deal with 1D vectors or use it as a template and write a new callback that deals with the vectors. It is not clear to me if you got N events each of which had a vector do you want to concatenate them into one line or plot them each as their own line.
    Wu-Cheng Chiang
    @devilkingsatan666
    Sorry for my ambiguous expression. I wanted to scatter-plot waveform data from a spectrometer and its fitting result in real-time. The plot is like a real-time monitor for the spectrometer.
    Thomas A Caswell
    @tacaswell
    I do not know of a callback that does exactly that off the top of my head, but in principle is possible to write one. I also suggest you join https://join.slack.com/t/nikea/shared_invite/zt-3cagfz0j-pxqKp3PAtRilvEXGcPe60g which has more active people in it
    Wu-Cheng Chiang
    @devilkingsatan666
    Thank you so much.
    Pierre Schnizer
    @PierreSchnizer

    Dear all,

      I am using bluesky / ophyd for executing measurement scripts on the BESSY II accelerator: e.g. orbit response matrix or beam based alignment measurements.

    These scripts need to configure ophyd devices dependent on the state of the machine. Personnaly I find ophyds config variables and configure() method quite convienient as long as one only has to deal with one or two devices.

    I'd like to ask if there is a tool that facilitates configuring a lot of ohpyd devices similar to e.g. epics save/restore.

    Thanks for any answer!
    Pierre

    Till Stensitzki
    @Tillsten
    Anyone here had some luck with repairing an broken h5py file?
    2 replies
    Cassiel-girl
    @Cassiel-girl
    Is anyone familiar with the nexus file format? I have three questions I would like to ask.
    1. Why the nxs file be stored separately from raw hdf5 files?
    2. Is it necessary to slice the data collected by the detector for storage? If yes, why is it necessary to slice the data collected by the detector and store it as separate hdf5 files?
    3. How do the nxs file store data when multiple detectors are collecting data at the same time?
    whs92
    @whs92
    @Cassiel-girl
    1. NeXus is hdf5 with a specific structure. Using this structure with defined names for The things in the files helps us understand what the data in the file is.
    whs92
    @whs92
    2 Data/images can be stored in seperate slices or in multidimensional arrays. Both can be included in an hdf5 or nexus structure. If you're using bluesky try out this callback from APS https://github.com/BCDA-APS/apstools/blob/main/apstools/callbacks/nexus_writer.py amoung other things it takes multidimensional images and stores them in a nexus file
    Cassiel-girl
    @Cassiel-girl
    @whs92 thank you very much.
    I would like to join the slack channel. Can someone please invite me into the NSLS-II slack channel.
    That is nikea slack which is cross facility
    Cassiel-girl
    @Cassiel-girl
    thank you very much.
    kkresock
    @kkresock
    Hi! I am having trouble installing databroker. I installed wheel after it said "failed building wheel for numcodecs", but I am still getting this error. Does anyone know how I can fix this?
    9 replies
    kkresock
    @kkresock
    Is there an easy way to change the display window of the LivePlot function? So it will show only n amount of points at one time but move as more data is received?
    Pete R Jemian
    @prjemian
    @kkresock There is support in apstools to limit the LivePlot to the last n traces. Look at either trim_plot_lines() or trim_plot_by_name()
    3 replies
    Yulien Pohl
    @YulienPohl
    Is there a databroker that works with a monitor?
    The solved broker Issue bluesky/databroker#343 works when using count() but not with sleep().
    Other callback like LiveTable() register all events.
    # python -m caproto.ioc_examples.thermo_sim
    class Thermo(Device):
        readback = Component(EpicsSignalRO, 'I')
        setpoint = Component(EpicsSignal, 'SP')
    
    thermo = Thermo("thermo:", name="thermo")
    thermo.wait_for_connection()
    
    RE = RunEngine({})
    
    cb = bcb.LiveTable([thermo], stream_name="thermo_readback_monitor")
    RE.subscribe(cb)
    
    db = dbr.Broker.named("temp")
    RE.subscribe(db.insert)
    
    sd = bpp.SupplementalData(monitors=[thermo.readback])
    RE.preprocessors.append(sd)
    
    @bpp.run_decorator(md={})
    def my_plan():
        yield from bps.sleep(5)
    
    RE(my_plan())
    
    h = db[-1]
    print(h.table())
    5 replies
    Yulien Pohl
    @YulienPohl
    Is there a way to run a plan from a file or json?
    I've looked at bluesky-queueserver but it uses a seperate server.
    2 replies