Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Eli Stavitski
    @elistavitski
    Яяяячяя._..
    ВУрюрюрци
    Eliot Gann
    @EliotGann
    @awalter-bnl thanks. that helps me understand the problem - what I'm dealing with is very much like what you describe. I really like your proposed device - it would be useful in a few cases I can think of.
    Dan Allan
    @danielballan

    This idea did not gain much support within DAMA

    Speaking for Tom and me, there were a lot of questions about the implementation that was first proposed but the idea is one we are all behind. The utility is clear. Let's make it happen soon. Thanks for providing a good use case for it, @EliotGann.

    Andi Barbour
    @ambarb
    To chime in, it is awesome to use this to change the gratings or drive to a linear diagnostic position (yag , grid, diode, or aperture). I just wish the epics motor record existed so that the positions would be handled by autosave and restore and the recorded archiver.
    Wayne's new mono control IOCs should be able to be have the offset tables etc for the ppm.locations() to work in EPICS as described above.
    Is there are way / person to contact in controls to suggest this?
    awalter-bnl
    @awalter-bnl

    For the benefit of @EliotGann, @ambarb has used a previous version of this software (that I think is still being used) that I developed at SIX back when I was helping them with their commissioning.

    In regards to moving this up to the EPICS IOC level. For simple devices (like linear diagnostic elements) this makes some sense, but this is one of many use- cases for this.

    There are more complicated use-cases: like at ESM where it is used to move multiple mirrors etc. around to move the beam from one 'endstation' to another, or like a proposed use-case at IOS where it wold be used to move through a complicated path from the 'sputtering' position to the 'measurement' position. In these cases it is not really practical to do this at the IOC level as it involves motors from multiple IOC's.

    I could however imagine that we could publish this back up to a caproto IOC which would allow CS studio to access the 'locations' which would allow the positions to be displayed and for them to be saved in the recorded archiver. Allowing for a PV to request moves between locations is more difficult, as the motion itself makes use of the run-engine (and it's error state handling) so it isn't immediately clear to me how to couple that effectively to being triggered by a PV.

    Andi Barbour
    @ambarb
    does anyone understand why I do not see matplotlib plots when I make a gist?
    I haven't had that problem before
    Thomas A Caswell
    @tacaswell
    are you using %matplotlib widget?
    Andi Barbour
    @ambarb
    yes. this is it. I forgot that the movie is in html.
    thxs
    Pierre Schnizer
    @PierreSchnizer
    Dear all,
    is there some documentation on how to use logging in ophyd devices?
    I get it running but I do not manage to get it integrated within the output emitted by Bluesky RunEngine
    Thank you in advance for any help!
    Pierre
    Andi Barbour
    @ambarb

    All the rest of the metadata for RE.md looks ok. I do not see how RE.md['scan_id'] changed to 1 from 121380

    THis is a big deal because now the user will have to keep track of some arbitrary string.

    Can I just simply change the value? Or is there some serious issue here

    I see that some has added to the startup file
    RE.md['scan_id']=db[-1]['start']['scan_id']
    Let me ask around about that. This is the startup file the user runs but isn't in the profile_collection
    Andi Barbour
    @ambarb
    I understand want happened. Someone wanted to clean up the RE.md and just used RE.md.clear() to start from clear
    Andi Barbour
    @ambarb
    just to note, that if I quit bluesky, i have to redo RE.md['scan_id']=db[-1]['start']['scan_id'] or else the scan_id us wrong again
    Thomas A Caswell
    @tacaswell
    do you have .clear in your startup files?
    what is type(RE.md)?
    Andi Barbour
    @ambarb
    historydict.HistoryDict
    Seems on the 3rd restart, without touching anything to do with RE.md, RE.md.scan_id is now what it should be.
    Thomas A Caswell
    @tacaswell
    that is very odd....
    Andi Barbour
    @ambarb
    here with user Jae. They haven't been able to proccess data for some time. I tried to start a local conda env at the workstation. Jae's account doesn't have conda installed so I switched to xf23id1. In his directory, as xf23id1 we were able to plot a single image, but the code to process (normalize) the FCCD seems to have a problem. Does anyone have any ideas? Could it be related to the C code being parralell-ized for the srv's or is it something we can fix here? using analysis-2019-3.0-csx
    here is the traceback for something that should work
    images = 121501
    darks = 121502
    flat = None
    stack = get_fastccd_images(db[images], dark_headers=(db[darks], None, None), flat=flat, tag='fccd_image')
    OUTPUUT
    Missing dark image for gain setting 2
    Missing dark image for gain setting 1
    
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-22-60e6ff70eede> in <module>
          2 darks = 121502
          3 flat = None
    ----> 4 stack = get_fastccd_images(db[images], dark_headers=(db[darks], None, None), flat=flat, tag='fccd_image')
    
    /opt/conda_envs/analysis-2019-3.0-csx/lib/python3.7/site-packages/csxtools/utils.py in get_fastccd_images(light_header, dark_headers, flat, gain, tag, roi)
        127         flat = _crop(flat, roi)
        128 
    --> 129     return _correct_fccd_images(events, bgnd, flat, gain)
        130 
        131 
    
    /opt/conda_envs/analysis-2019-3.0-csx/lib/python3.7/site-packages/slicerator.py in process(obj, *args, **kwargs)
        597             # Fall back on normal behavior of func, interpreting input
        598             # as a single image.
    --> 599             return func(obj, *args, **kwargs)
        600 
        601     if not retain_doc:
    
    /opt/conda_envs/analysis-2019-3.0-csx/lib/python3.7/site-packages/csxtools/utils.py in _correct_fccd_images(image, bgnd, flat, gain)
        194 @pipeline
        195 def _correct_fccd_images(image, bgnd, flat, gain):
    --> 196     image = correct_images(image, bgnd, flat, gain)
        197     image = rotate90(image, 'cw')
        198     return image
    
    /opt/conda_envs/analysis-2019-3.0-csx/lib/python3.7/site-packages/csxtools/fastccd/images.py in correct_images(images, dark, flat, gain)
         38     t = ttime.time()
         39 
    ---> 40     logger.info("Correcting image stack of shape %s", images.shape)
         41 
         42     if dark is None:
    
    AttributeError: 'generator' object has no attribute 'shape'
    Andi Barbour
    @ambarb
    also tried by hand on xf23id1-ws3 as xf23id1 and got the same result
    srv1 and srv2 are not accessible through ssh. i powered cycled srv2 as a last-ditch effort, but srv2 isn't pingable now
    Pierre Schnizer
    @PierreSchnizer

    Dear all,

    I have compiled a little tutorial on devices in particular focused on

    • trigger
    • read
    • status objects

    If interested, please have a look at https://github.com/TMsangohan/bact2/blob/master/tutorials/ophyd_device_drivers.ipynb or https://github.com/TMsangohan/bact2/blob/master/tutorials/ophyd_device_drivers.slides.html

    If there is interest, I could rewrite it in sphinx compatible style.
    Pierre
    Thomas A Caswell
    @tacaswell
    @ambarb The stack is likely a generator of numpy arrays, rather than an array it's self
    Andi Barbour
    @ambarb
    I tried to look at some stuff on sourceforge and git and conda to fix the widgets in the anaconda installation on my Mac so I can run jupyterlab with %matplotlib widget but nothing i have tried works. Is there some easy fix out there? I just don't know what to google at this point to figure out what I am doing wrong.
    @tacaswell ok but what I don't understand is the same notebook works on the server but not on the local workstation...at some point, i think i realized that he may have imported the wrong databroker functions but I never went back to check. In the end, matt cowan came in sunday night to fix the svr1 and srv2 problems so the users were able to process data on the server. I will try again with one of my notebooks on the local workstation and see if I am successful or not
    Pierre Schnizer
    @PierreSchnizer
    Dear all,
    I see that you are working on a new databroker.
    I'd like to ask if storing arrays is also on the list.
    Pierre
    Thomas A Caswell
    @tacaswell
    what do you mean by "storing arrays"?
    You can only not put arrays directly into the sqlite based backends, the mongo version works with arrays (under 16M) mostly correctly
    Pierre Schnizer
    @PierreSchnizer
    Dear Thomas,
    I was not clear. I only tried sqlite. I will give mongodb a try. My arrays are in the order of kb...
    Thanks for the quick answer
    Pierre